Skip to content

T-BT9H-router-send-to-native-to-resume-to-open-delivery-chain

State: closed/done · Impact: high · Complexity: large

Build the Router that delivers PR feedback (and, later, other messages) into whatever session already holds a subject’s lease, before falling back to a fresh headless dispatch — the capability the fold-in decision calls out as genuinely new from simple-dispatch. It rides on the prs tick’s PR-action path (P2, #2296) rather than replacing the orchestrate loop, which P2 already ships.

  1. Define DeliveryIntent/DeliveryOutcome and createRouter(deps) per simple-dispatch-interfaces.html’s Router section.
  2. Implement the delivery chain in order: live-terminal send (via Host.send plus status/waitIdle), harness native send, resume (close + reopen with the message as the prompt), fresh open (worktree ensure + lease acquire + open with the message as the prompt).
  3. Wire recovery.ensureServing/recovery.tick() ahead of delivery so a gone session is restarted before the message is attempted.
  4. Hook the Router into the prs tick (lib/services/orchestrator/, P2) as the delivery mechanism for NEEDS-RESPONSE PRs, in place of always dispatching /sdlc:pr-respond cold.
  5. Cover the outcomes table (delivered/unconfirmed/held/failed per situation) with tests.
AreaNote
solutions/ontological/lib/services/dispatch/New: Router, DeliveryIntent/Outcome
solutions/ontological/lib/services/orchestrator/prs tick integration point
solutions/ontological/lib/services/host/Consumes Host.send / harness nativeSend
  • AC-1: A NEEDS-RESPONSE PR with a live session gets its feedback delivered via send/native/resume without opening a duplicate session.
  • AC-2: A PR with no live session falls back to a fresh open with the message as the prompt.
  • AC-3: The busy policy (queue/send) and queue_max are honored per simple-dispatch-interfaces.html’s outcomes table.
  • DeliveryRecord persistence (T-9Q4A), though the Router depends on it to avoid re-sending
  • the PR-subject lease that lets a PR have no task behind it (T-KMPU)
  • T-CPJI
  • T-UU2N
  • the prs tick from P2 (#2296)

T-CPJI, T-UU2N


← Back to Tasks