Spaces:
Sleeping
Sleeping
Download orchestrator/state.py from refaelz/legacy-code-challenge: direct link, hf CLI and curl.
- Browser
- Download file 1.79 kB
-
https://huggingface.co/spaces/refaelz/legacy-code-challenge/resolve/main/orchestrator/state.py
- Command line
-
hf download hf://spaces/refaelz/legacy-code-challenge/orchestrator/state.py
-
curl -L -o state.py https://huggingface.co/spaces/refaelz/legacy-code-challenge/resolve/main/orchestrator/state.py
1.79 kB
| """OrchestratorState β shared state for the Challenge Orchestrator LangGraph.""" | |
| from typing import TypedDict | |
| class OrchestratorState(TypedDict): | |
| # ββ Input (set by challenge.py CLI) βββββββββββββββββββββββββββββββββββββββ | |
| github_url: str | |
| difficulty_level: int | |
| num_bugs: int | |
| port: int | |
| share: bool | |
| # ββ Filled by node_run_bug_generator ββββββββββββββββββββββββββββββββββββββ | |
| workspace_path: str # absolute path to the cloned workspace directory | |
| target_file: str # relative path of the sabotaged file (e.g. boltons\formatutils.py) | |
| original_code: str # file content BEFORE sabotage (used for diff scoring) | |
| sabotaged_code: str # file content AFTER sabotage (what the student receives) | |
| function_name: str # public surface function reported as broken | |
| bug_func_name: str # internal helper where the bug was actually injected | |
| bug_func_source: str # exact source of the buggy helper function | |
| test_cases: list # [{"args": str, "expected": str}, ...] verified cases | |
| bug_description: str # architect-only description (never shown to student) | |
| # ββ Filled by node_save_challenge_state βββββββββββββββββββββββββββββββββββ | |
| challenge_state_path: str # absolute path to the saved challenge_state.json | |
| # ββ Filled by node_launch_student_gui ββββββββββββββββββββββββββββββββββββ | |
| launch_status: str # "Launched on port N" or error message | |