Skip to content

JWB-964: Supervisor-launched lanes report back and finish without nudges - #97

Merged
JarenKempton merged 3 commits into
mainfrom
task/JWB-964
Nov 13, 2026
Merged

JarenKempton merged 3 commits into
mainfrom
task/JWB-964

Conversation

@JarenKempton

@JarenKempton JarenKempton commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

Supervisor-launched lanes now report back to an orchestrator and can finish without nudges.

  • interlock run --orchestrator THREAD tells each launched lane its orchestrator and sends that thread one 🤖 message per approved-but-unmerged head and one per attention episode (with its reason), via t3 thread send, journaled as supervisor_reported. An undelivered report retries next tick.
  • Launched lane threads are titled 🔨 KEY: summary.
  • lane submit titles the PR from the ticket (or --title), takes --body-file, and a resubmit edits the existing PR's title and body (gh pr edit).
  • A submitted/reviewing lane accepts a new head (e.g. a conflict resolution) as its next round, within the round limit.
  • lane grant-round raises the limit by one, journals review_round_granted, and resumes a lane held at review_round_limit.
  • gh/git failures carry their stderr (URL credentials redacted); a lane whose reads fail 5 ticks in a row moves to attention as read_failing: … instead of retrying forever.
  • Unknown commands suggest the closest command; --only warns about a key no map lists.

Acceptance evidence

AC1 — live, scratch state DB (/tmp/agent-jwb964-*/state, never ~/.local/state/interlock): fake HTTPS Jira (scratch ticket FAKE-1 in map FAKE-100), local bare git origin, real T3 server, real lane agent, and a scratch receiver thread as the orchestrator.

$ bun src/main.ts run --project FAKE-100=$S/repo --once --state $DB --orchestrator <receiver-thread> --json
"launched": [{ "ticket": "jira:127.0.0.1:FAKE:ticket:FAKE-1", "lane": "interlock-lane:ff94ff47-…", "session": "mcp:b7d3b282-…" }]

Launched thread title: 🔨 FAKE-1: Live proof lane reports back; its prompt carries Orchestrator:\nThread <receiver-thread>. Interlock reports this lane there…. The lane agent ran lane attach, then lane attention --reason live_proof_blocked.

tick 2: {"attention":[{"lane":"interlock-lane:ff94ff47-…","reason":"live_proof_blocked"}],"reported":[{"lane":"interlock-lane:ff94ff47-…","event":"attention:live_proof_blocked:2026-11-13T19:03:03.254Z"}],"failures":[]}
tick 3: {"attention":[…same…],"reported":[],"failures":[]}

Receiver thread got exactly one message:

🤖 FAKE-1 is blocked: live_proof_blocked
Resume after fixing it with: interlock lane resume interlock-lane:ff94ff47-ef1c-476e-a735-e2bb6703fc47

The ready-to-merge report (approved head, not merged) is covered by test/execution/supervisor/tick.test.ts and was not exercised live.

AC4 + AC7 — live, same scratch DB

$ bun src/main.ts jira login
interlock: Unknown command "jira login"; did you mean "interlock login jira"?
$ bun src/main.ts run --project FAKE-100=$S/repo --once --only FAKE-1,FAKE-77 --state $DB --json | jq -c '{warnings}'
{"warnings":["--only FAKE-77 is not in any map: jira:127.0.0.1:FAKE:map:FAKE-100"]}
$ bun src/main.ts lane grant-round --ticket FAKE-1 --state $DB --json | jq -c '.value|{state,maxReviewRounds}'
{"state":"attention","maxReviewRounds":4}
$ sqlite3 $DB "select state, receipt_json from transaction_steps where state='review_round_granted'"
review_round_granted|{"lane":"interlock-lane:ff94ff47-…","reviewRound":0,"maxReviewRounds":4,"state":"attention"}

(That lane stays in attention because its reason is not review_round_limit; a lane held at the limit resumes, per the unit test.)

AC2, AC3, AC5, AC6 — tests on the real service and adapter paths with fake GitHub/T3 ports

  • AC2: submit titles the PR from the ticket, and a resubmit updates its title and body and update edits the PR title and body, then reads the PR back (exact gh pr edit … --title … --body … argv).
  • AC3: a lane in review takes a new head as the next round, up to its round limit.
  • AC5: the orchestrator hears each attention lane once, with its reason, an undelivered report is retried on the next tick, and the CLI-level run --orchestrator launches a 🔨 lane told its orchestrator, and reports its attention there once.
  • AC6: failing gh and git calls carry their stderr, with credentials in URLs redacted and a read that keeps failing stops retrying at the limit and routes the lane to attention.

Not verified live: AC2 against real GitHub (this PR was opened by the pre-change binary, so its title was the branch name; this body was set with one manual gh pr edit).

Checks at b3a50dc

$ vp check
pass: All 194 files are correctly formatted
pass: Found no warnings, lint errors, or type errors in 175 files
$ vp run typecheck
$ tsc --noEmit   (no errors)
$ vp run test
 706 pass
 0 fail
Ran 730 tests across 50 files.

Lane thread: 🔨 JWB-964: Lanes report back (mcp:daf57c7c-ba9e-4bb8-a061-9b39ef5dc7bf)

🤖 Generated with Claude Code

- interlock run --orchestrator THREAD tells launched lanes their orchestrator
  and reports each approved-and-unmerged head and each attention episode there
  once, through t3 thread send, journaled per lane.
- Launched lane threads are titled "🔨 KEY: summary".
- lane submit titles the PR from the ticket, takes --body-file, and a resubmit
  edits the existing PR's title and body.
- A submitted or reviewing lane accepts a new head as its next round.
- lane grant-round raises the round limit, journals review_round_granted and
  resumes a lane held at the limit.
- gh and git failures carry their stderr (credentials redacted); a lane whose
  reads fail five ticks in a row moves to attention instead of retrying.
- Unknown commands suggest the closest one; --only warns about a key no map
  lists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JarenKempton JarenKempton changed the title task/JWB-964 JWB-964: Supervisor-launched lanes report back and finish without nudges Nov 13, 2026
JarenKempton and others added 2 commits November 13, 2026 12:16
- Report ready only while the PR tip is the approved head.
- A lane held at its round limit cannot be resumed; grant-round is accepted
  only at the limit and not for other attention reasons.
- Attention reports use the lane's recorded reason, skip lanes that did not
  end in attention, and suggest lane resume only for attention lanes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JarenKempton
JarenKempton enabled auto-merge (squash) November 13, 2026 19:23
@JarenKempton
JarenKempton merged commit 3b3aeab into main Nov 13, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant