1---2name: control-plane3description: Control-Plane subsystem in TTA.dev: get_task, get_run, put_run and related code. 88 symbols | 15 files | Cohesion: 81%4---56# Control_plane7888 symbols | 15 files | Cohesion: 81%910## When to Use1112- Working on `control-plane`-related functionality in TTA.dev13- Modifying `get_task`, `get_run`14- Navigating `ttadev/control_plane/store.py`, `ttadev/control_plane/workflow_service.py`1516## Key Files1718| File | Symbols |19|------|---------|20| `ttadev/control_plane/store.py` | _read_map, _write_map, _lock_for, get_task, get_run (+10) |21| `ttadev/control_plane/workflow_service.py` | _emit_control_plane_span, _now_iso, _make_workflow_gate_id, _get_workflow_step, _build_workflow_gate_decision_record (+6) |22| `ttadev/control_plane/task_service.py` | _now, _now_iso, _current_agent_id, _find_gate, _ensure_gate_decider_allowed (+6) |23| `ttadev/control_plane/lease_service.py` | _now, _now_iso, _validate_lock_owner, _acquire_lock, _expire_lease (+6) |24| `ttadev/control_plane/run_service.py` | _now, _now_iso, get_run, get_lease_for_run, list_active_ownership (+5) |25| `ttadev/control_plane/models.py` | to_dict, to_dict, from_dict, to_dict, from_dict (+4) |26| `ttadev/control_plane/service.py` | list_runs, get_run, get_lease_for_run, heartbeat_run, acquire_file_lock (+2) |27| `tests/unit/test_l0_store.py` | _now, test_task_roundtrip, test_run_roundtrip, test_lease_roundtrip_and_delete |28| `ttadev/cli/control.py` | _handle_run_command, _handle_lock_command |29| `tests/unit/test_control_plane_trace_attribution.py` | test_claim_task_stamps_trace_id_on_run, test_workflow_step_round_trips_trace_fields |3031## Entry Points3233Start here when exploring this area:3435- **`get_task`** (Function) — `ttadev/control_plane/store.py:51`36- **`get_run`** (Function) — `ttadev/control_plane/store.py:66`37- **`put_run`** (Function) — `ttadev/control_plane/store.py:71`38- **`list_leases`** (Function) — `ttadev/control_plane/store.py:77`39- **`get_lease_for_task`** (Function) — `ttadev/control_plane/store.py:81`4041## Key Symbols4243| Symbol | Type | File | Line |44|--------|------|------|------|45| `get_task` | Function | `ttadev/control_plane/store.py` | 51 |46| `get_run` | Function | `ttadev/control_plane/store.py` | 66 |47| `put_run` | Function | `ttadev/control_plane/store.py` | 71 |48| `list_leases` | Function | `ttadev/control_plane/store.py` | 77 |49| `get_lease_for_task` | Function | `ttadev/control_plane/store.py` | 81 |50| `put_lease` | Function | `ttadev/control_plane/store.py` | 92 |51| `delete_lease` | Function | `ttadev/control_plane/store.py` | 98 |52| `put_lock` | Function | `ttadev/control_plane/store.py` | 123 |53| `delete_lock` | Function | `ttadev/control_plane/store.py` | 129 |54| `to_dict` | Function | `ttadev/control_plane/models.py` | 481 |55| `to_dict` | Function | `ttadev/control_plane/models.py` | 528 |56| `from_dict` | Function | `ttadev/control_plane/models.py` | 539 |57| `to_dict` | Function | `ttadev/control_plane/models.py` | 563 |58| `test_task_roundtrip` | Function | `tests/unit/test_l0_store.py` | 12 |59| `test_run_roundtrip` | Function | `tests/unit/test_l0_store.py` | 31 |60| `test_lease_roundtrip_and_delete` | Function | `tests/unit/test_l0_store.py` | 50 |61| `get_run` | Function | `ttadev/control_plane/run_service.py` | 160 |62| `get_lease_for_run` | Function | `ttadev/control_plane/run_service.py` | 167 |63| `list_active_ownership` | Function | `ttadev/control_plane/run_service.py` | 171 |64| `claim_task` | Function | `ttadev/control_plane/run_service.py` | 213 |6566## Execution Flows6768| Flow | Type | Steps |69|------|------|-------|70| `Main → Get_integration` | cross_community | 5 |71| `Main → Get_integration` | cross_community | 5 |72| `Main → Get_integration` | cross_community | 4 |73| `Acquire_workspace_lock → Release_locks_for_run` | intra_community | 4 |74| `Acquire_file_lock → Release_locks_for_run` | intra_community | 4 |75| `Finalize_tracked_workflow → _now` | intra_community | 4 |76| `Decide_gate → _get_active_session` | intra_community | 3 |77| `Decide_gate → _gate_role_matches` | intra_community | 3 |78| `Control_claim_task → To_dict` | cross_community | 3 |79| `Control_get_run → To_dict` | cross_community | 3 |8081## Connected Areas8283| Area | Connections |84|------|-------------|85| Unit | 17 calls |86| Cli | 2 calls |8788## How to Explore89901. `gitnexus_context({name: "get_task"})` — see callers and callees912. `gitnexus_query({query: "control_plane"})` — find related execution flows923. Read key files listed above for implementation details