Connect the graph plan-gate (B2a) to the durable ledger + Slack presentation. - setup() passes build_graph(plan_gate=True) only on the wired review path (plan_gate flag ANDed with review_node present); P1/stub paths force it off. - _post_resume_followups detects a settled interrupt by payload kind == PLAN_DECISION_KIND (NOT status, which still reads 'parked' at the gate per B2a) and posts the decision gate: opens a pending_questions row with kind='plan_decision' (24h deadline, threaded, channel_ref = root ts) and presents _summarize_plan + findings + reply instructions, truncated to a ~2700-char Slack budget. A clarify/legacy interrupt keeps the existing path. - Single-open-gate invariant: the opener skips if any open row already exists for the thread (one row, one presentation). - Expiry: _park posts a plan-decision-specific recovery notice (re-assign / force-resume) for an expired gate row. - Resume path unchanged: the decision answer flows through submit_answer → ResumeWorker → plan_gate_node with no resume-worker special-casing. notify_question has no kind param in this tree, so the opener calls ledger.post_question(kind=...) + ledger.set_channel_ref directly; the clarifier path still uses notify_question unchanged. Tests: gate row+presentation+threading, approve/request_changes/abandon via submit_answer, single-open-gate skip, expiry notice. 1412 passed. |
||
|---|---|---|
| .. | ||
| db | ||
| nodes | ||
| transport | ||
| __init__.py | ||
| api.py | ||
| billing.py | ||
| ci_fetcher.py | ||
| ci_gate.py | ||
| ci_watcher.py | ||
| coordinator.py | ||
| dashboard.py | ||
| deadline_timer.py | ||
| dispatcher.py | ||
| draft_pr_monitor.py | ||
| graph.py | ||
| invoker.py | ||
| invoker_multi.py | ||
| ledger.py | ||
| operator_cli.py | ||
| recovery.py | ||
| responder.py | ||
| resume_worker.py | ||
| state_store.py | ||
| status_page.py | ||
| task_model.py | ||
| topology.py | ||