Skip to content
This repository was archived by the owner on Oct 13, 2026. It is now read-only.

fix: self-contained dispatch packet, dispatcher network, safe baseline proof (#144) - #145

Merged
lukemaj merged 2 commits into
mainfrom
fix/144-routing-only-dispatch
Sep 29, 2026
Merged

lukemaj merged 2 commits into
mainfrom
fix/144-routing-only-dispatch

Conversation

@lukemaj

@lukemaj lukemaj commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What: Prism dispatch starts its first worker in 26 s instead of 16 min on a small real job, dispatchers and reviewers can reach GitHub, and the baseline proof no longer runs release checks.
Why: Dispatchers had no network (T3 auto = Codex workspace-write, network off), so they spent minutes on gh failures, tool discovery, and target-repo reads; a dispatcher-chosen baseline proof included release-check, which cannot pass on a WIP base (the #164 rc=19 block).
So what: The user decides whether dispatch and review keep full-access or move to a Chromeria network-only auto (open Luna P1), then merges and installs 0.42.0; AgentsMD role scoping is separate planner work.

Part of #144 (not #143; its cause is stated below).

Changes

  1. Self-contained packet. submit fetches every Issue the task names (owner/repo#N, Issue URL, gh issue view N -R owner/repo) with comments into outputs/<id>/issue-context.md. The dispatcher prompt carries it between TASK and the reply protocol. The protocol says to use it and make no tool calls unless a routing fact is missing. AgentsMD instructions and skills are untouched.
  2. Dispatcher and reviewer network. runner/t3exec.py T3_RUNTIME_MODES for dispatch and review moves from auto to full-access. Evidence from the T3 fork (chromeria main + PR Make release proof independent of installed agent plugins #70):
    • Codex: auto -> thread workspace-write, approval on-request, auto_review, turn policy {type: "workspaceWrite"} whose networkAccess defaults to false (CodexSessionRuntime.ts:522-547, 570-580; generated schema networkAccess ... default: false). It overrides sandbox_mode = "danger-full-access" in ~/.codex/config.toml.
    • Claude Code: auto -> permission mode auto (classifier), network works (ClaudeAdapter.ts:4867-4871).
    • OpenCode: auto -> every bash, webfetch, websearch is ask, with no reviewer (opencodeRuntime.ts:504-538), so gh waits on an approval nobody grants.
    • Grok: only full-access auto-approves; auto sends every permission request to a person (GrokAdapter.ts:1166).
    • T3 has no network-without-writes mode (Codex readOnly + networkAccess exists in the schema, but T3's approval-required maps to readOnly without network and with untrusted approvals). So the smallest fix is full-access, as workers already run. Both roles are told not to edit, and the review gate already discards a verdict whose reviewer changed the workspace.
  3. Safe baseline proof. The base run leaves release-check steps out of a plain && chain (task or dispatcher-bound proof; recorded as excluded); every candidate still runs the full command. Baseline ordering is unchanged: it already runs before dispatch when the task carries proof. Classification was already exit-status based; new tests pin it (the rc=19 was versionctl release-check failing TAG_CONFLICT after 311 tests passed, not a misread).
  4. Dispatcher effort is unchanged, per the user. No review routing and no merge handling were added.
  5. After Luna review: a resubmit with an existing request id never replaces the stored Issue context, Issues over the 5-Issue limit are named instead of silently dropped, and the Issue block is fenced (<<<ISSUES>>> ... <<<END_ISSUES>>>) as GitHub data, not instructions; Issue text cannot close the fence.

Proof

  • python3 scripts/test.py on 4097455: Ran 374 tests ... OK; python3 -m compileall -q runner scripts tests: OK; CI proof passes.
  • New tests/test_issue144.py: exit-status classification (warnings plus OK is pass; OK then exit 19 is failed rc 19; failure text with exit 0 is pass), release-check exclusion for task and dispatcher-bound proofs (the #164 shape passes with the release step excluded), Issue refs, fetched Issue body and comments in the prompt before the protocol, unreadable Issue recorded, resubmit keeps context, over-limit Issues named, and full-access for dispatch and review.

Submit-to-first-worker timing, one small real job

Same plain-text packet (one sentence in RUNNER.md, referencing #144), lane small, dispatcher t3:codex:gpt-6-luna@max both times. Each job was cancelled once its first worker thread started. The disposable worktrees were removed, and nothing was pushed.

Run Runner Baseline Dispatcher returns First worker Dispatcher tool calls
measure-144-before installed 0.41.0 after dispatch 16 min 16 s 16 min 19 s (978.7 s) 7 batched execs: project-direction inspect, hashes, gh issue view (no network), operations refs, VISION/MISSION/OBJECTIVE, repo workflows, git ls-remote
measure-144-after2 this branch before dispatch (1.6 s) 25 s 26.1 s 0

A first after run (measure-144-after) had the Issues after the protocol. There, the dispatcher routed in 40 s, but twice in a row it ended its envelope with a stray } (luna_missing_action: Extra data), a failure never recorded in the runner DB before. Moving the Issues ahead of the protocol fixed it in the timed run. This is one sample per side, so the timings are indicative, not a median. The after run used an intermediate build that also read a Proof: text line, so its 1.6 s baseline ran before dispatch; that parsing was later dropped from scope. It accounts for about 2 s, not the gap.

Not fixed here: #143 cause

runner/core.py:3293 verify_pr_for_completion refuses every PR whose live state is not OPEN ("only an open PR completes a job"). Task completion requirements know only draft_pr_allowed and have no notion of merge authority, so an authorized merge can never complete.

Review

Luna max (gpt-6-luna, reviewer thread) on 4cf075e: REQUEST_CHANGES.

  • Fixed: a conflicting resubmit overwrote Issue context (P2); Issues over the limit were silently dropped (P2).
  • No change: "Issue context disappears on resume" (P1). _resume_luna_via_t3 only posts into the same saved dispatcher thread (never forks), so the first prompt with the Issues stays in its history, like the task text.
  • Kept as a stated tradeoff: reviewer full-access allows external side effects that the workspace check cannot see (P1). Workers already run full-access over the same diff, so the added exposure is small. The tighter alternative is a Chromeria change (auto -> workspaceWrite with networkAccess: true), which covers Codex only; OpenCode and Grok would still wait on approvals.

Luna max re-review on 4616eca: REQUEST_CHANGES. It cleared both fixes, the resume disposition, and the reviewer tradeoff as described. One P1 is open: fetched Issue text reaches a full-access dispatcher, and the only boundary is prompt text. 4097455 adds the data fence, which is still prompt-level. A technical boundary needs a network-without-writes mode in Chromeria (Codex only). That is a user decision between:

  • (a) keep full-access for dispatch and review, as workers already run over the same Issue and diff; or
  • (b) change Chromeria so auto gets networkAccess: true and revert these roles to auto, leaving OpenCode and Grok dispatchers waiting on approvals.

Not re-reviewed after 4097455 pending that decision.

Elon record

  • Requirements and who asked: the user (2026-09-29, Baseline proof misreads a passing suite (rc=19) and dispatchers cannot reach GitHub #144 and this task): fast dispatch with a self-contained packet fetched at submit; dispatchers never stuck on gh without network; baseline before dispatch without final-candidate checks (user correction); keep AgentsMD on the dispatcher and keep effort at max (user corrections).
  • Deleted: lowering dispatcher effort; stripping AgentsMD orientation from the dispatcher (belongs to AgentsMD role scoping); a classifier "fix" for a non-bug; moving the baseline (already before dispatch with a task proof); review routing and merge handling; a Chromeria change for a network-only mode.
  • Bottleneck: the dispatch turn (6-16 min of exploration because the dispatcher had no network and no Issue text), before any worker starts.
  • Checked myself: read the #164 baseline log (tests OK, then release-check exit 19), traced auto through the T3 fork's four adapters, confirmed the after dispatcher's Codex session reports danger-full-access and made 0 tool calls, timed both runs from jobs.db events, and ran the full suite.

🤖 Generated with Claude Code

@lukemaj
lukemaj force-pushed the fix/144-routing-only-dispatch branch from 4cf075e to 4616eca Compare September 29, 2026 14:20
@lukemaj lukemaj changed the title fix: self-contained dispatch packet, dispatcher network, baseline before dispatch (#144) fix: self-contained dispatch packet, dispatcher network, safe baseline proof (#144) Sep 29, 2026
…e proof (#144)

- submit fetches the Issues a task names (with comments) into the
  dispatcher prompt, between the task and the reply protocol; the
  dispatcher makes no tool calls unless a routing fact is missing.
  A resubmit never replaces the stored context; Issues over the limit
  are named; the block is fenced as data, not instructions. AgentsMD
  instructions and skills are unchanged.
- Dispatcher and reviewer threads run full-access: T3 auto is Codex
  workspace-write without network, and an unanswered approval on
  OpenCode and Grok.
- The baseline proof leaves release-check steps out of a plain && chain
  (task or dispatcher proof); candidates still run the full command.
- Tests pin exit-status classification of the baseline.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Keep 0.42.0 as the next minor above main's 0.41.1 and keep both
CHANGELOG entries.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@lukemaj
lukemaj merged commit 5745323 into main Sep 29, 2026
1 check passed
@lukemaj
lukemaj deleted the fix/144-routing-only-dispatch branch September 29, 2026 16:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant