Spaces:
Running
Running
Download nodes/passthrough.py from Sdm0/opencodereview: direct link, hf CLI and curl.
- Browser
- Download file 808 Bytes
-
https://huggingface.co/spaces/Sdm0/opencodereview/resolve/main/nodes/passthrough.py
- Command line
-
hf download hf://spaces/Sdm0/opencodereview/nodes/passthrough.py
-
curl -L -o passthrough.py https://huggingface.co/spaces/Sdm0/opencodereview/resolve/main/nodes/passthrough.py
808 Bytes
| from __future__ import annotations | |
| import logging | |
| from state import OpenCodeReviewState | |
| logger = logging.getLogger(__name__) | |
| def passthrough_node(state: OpenCodeReviewState) -> dict: | |
| """Log the current state and return unchanged. | |
| This is a placeholder node that proves the graph wiring and checkpointing | |
| work before any real review logic is added. | |
| """ | |
| logger.info("=== Passthrough Node — %s#%d ===", state.repo, state.pr_number) | |
| logger.info("Files: %d | Chunks: %d | Findings: %d", | |
| len(state.changed_files), | |
| len(state.context_chunks), | |
| len(state.findings)) | |
| logger.info("Verdict: %s", state.verdict.model_dump() if state.verdict else None) | |
| # Return empty dict — no state mutations in this placeholder | |
| return {} | |