Skip to content

Shift batching, creator-style: lane handoff snapshots + supervision mode for queue lanes #2140

Open

Description

@dezren39

Queue shifts already bundle up to 10 tasks; their cost (6–13M input/run at check-in #5; the 9-lane shift family was 52% of all cron spend) is per-start state re-derivation plus in-shift supervision context — the same overhead class the creator batching change attacked (3.93M → ~1.4M input per filed issue).

Do:

  1. Per-lane handoff snapshots: persist checked state + task checkpoints between shifts so a shift starts from the snapshot instead of re-reading the full instruction/queue/GitHub/log state (fleet-watchdog's SQL-first rewrite is the template).
  2. Supervision mode: as dispatcher session↔task binding lands (the binding gap tracked on the queue pilot), lanes shift from executing tasks themselves to batch-supervising dispatched OpenCode sessions — target 15–20 supervised sessions per shift.
  3. Evaluate 40m → 2h cadence once supervision mode is real; report per-queue tokens per completed task before/after in the daily check-in.

Activity

  1. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    TOP PRIORITY (Drew, 2026-10-29 01:23 CDT): Batch 3 fleet consolidation — pick this up in the next runs, ahead of routine work. Being enqueued to repo-health-code-pilot at top priority now.

  3. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Oct 29, 2026
  4. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  5. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

    Triage verdict — premise CONFIRMED, design decided, Part 1 routed

    Premise check: verified from the inside — this triage was executed by a Lane B shift that itself re-read the full worker instruction, re-derived queue health (including one 12s health timeout + retry), and re-validated every task's GitHub state from zero, exactly the per-start overhead this issue names. The scale figures stand as filed (9-lane family = 52% of cron spend at check-in #5; 6–13M input/run; creator batching precedent 3.93M → ~1.4M per filed issue). One refinement: shifts do not start from nothing — checkpoints and progress survive in the queue itself. What is missing is a lane-level digest of everything around the tasks (infra state, in-flight PR/CI pointers, dead ends already discovered), which is what the snapshot below adds. It complements task checkpoints; it does not replace them.

    Design

    Part 1 — lane handoff snapshots (landable now)

    • Write: at shift exit (after the signal refresh, before lock release) the lane overwrites hidden_files/lane-handoff-<queue>-<lane>.json:
      {generated_at, lane, queue_health:{queued, claimed, parked, blocked}, worked:[{task, issue, outcome, pr, links}], in_flight:[{task, issue, pr, ci_state, resume_condition}], infra_notes:[{note, first_seen}], leads:[task ids worth claiming next and why]}
    • Read: the next shift of the same lane reads it right after the Step 0 gate. Leads, not truth: the snapshot replaces search (what exists, where things stand, what was already ruled out) and never verification — claims, CI state, and labels are still checked fresh before acting, and anything contradicted by a fresh check loses to the fresh check. Entries older than ~2 cadences are context only.
    • Why this shape: it is the fleet's proven digest pattern (watchdog's live-state digest, the monitor rewrite in Slim repo-fleet-monitor: snapshot/SQL-first state fetch + 2h cadence (target ≤3M/run) #2134) applied to the lane boundary; one small file per lane, overwritten, no log archaeology, no new store.
    • Success test: daily check-in reports per-lane input/run for two weeks post-landing vs the 6–13M range; success = median down with tasks/shift held or rising.

    Part 2 — supervision mode (designed, GATED — not routed for implementation)

    • Gate (both required): (a) the session conductor (Implement the session conductor: merge openchamber-dispatcher + openchamber-babysitter into openchamber-conductor #2153) is cut over, and (b) session↔task binding is recorded on queue tasks (a claimed task's progress names its OpenCode session id). Until both hold, lanes keep executing directly; a half-bound supervision mode would recreate the dispatcher/babysitter split this batch just merged.
    • Mode, once gated in: a shift batch-supervises 15–20 dispatched sessions (checkpoint reviews, stall nudges through the conductor's escalation ladder, hand-backs with reasons) and executes directly only what no session holds.
    • Cadence: the 40m → 2h evaluation happens only after the gate, and a cadence change is a rate change — it needs Drew's explicit word at that time, with before/after tokens-per-completed-task from the daily check-in as the evidence pack. Nothing in this triage pre-approves it.

    Routing

    Part 1 implementation filed as #2158 (snapshot steps in all lane shift bodies, one evidenced handoff, two-week measurement; Part 2 gate state recorded, not started) and enqueued as queue task 3183, flagged live-fleet-change. Role note: lanes stay Do in the #2131 map in both parts; supervision changes how Do works, not which role owns it.

  6. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · Part 2 gate state (recorded per #2158 acceptance, queue task 3812, 2026-10-30)

    Gate NOT satisfied on either count — no supervision mode started, no cadence change made.

    • (a) Conductor cut over? No. openchamber-dispatcher and openchamber-babysitter are both still enabled: true in the live cron roster (verified 2026-10-30); the conductor cutover for Implement the session conductor: merge openchamber-dispatcher + openchamber-babysitter into openchamber-conductor #2153 is queued as task 3806 and has not landed.
    • (b) Session↔task binding present? No. Queue task progress records stage/artifact/next only — no OpenCode session id is recorded on a claimed task (observed across this shift's claims: tasks 3311, 3557, 3415, 3559, 3647, 3696, 3733, 3797, 3808, 3812).

    Part 1 (per-lane handoff snapshots) landed today under #2158: snapshot write + read steps are in both shared lane instruction files, and the two-week input/run measurement clock starts 2026-10-30. When both gate conditions above flip, file the Part 2 activation as a fresh follow-on from this issue — the 40m → 2h cadence evaluation additionally needs Drew's explicit word even then.

  7. 52 remaining items

  8. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: triaged
    task: 16627 (repo-health-code-pilot, lane code-d)
    state: triaged — re-packet of the task 7304 triage; its routing verified and one fact updated

    This task is the cleanup-pass re-packet of the same triage task 7304 completed today (2026-11-14T10:54Z, lane any-b). That verdict stands and is re-verified here; one of its facts has already moved:

    Terminal for task 16627: triaged, naming task 7304's triage as the standing verdict and #1656 as the live remainder.

  9. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged (bulk-intake concurrence) — Parts 1 and 3 resolved; Part 2 implementation lives on issue #1656

  10. removed their assignment
    on Nov 20, 2026
  11. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Picked up by felix — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while felix posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  12. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Progress from felix: still working

  13. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: triaged
    by: agent felix (kind muse, Muse sandbox seat)
    at: 2026-11-22

    Reconciliation of #2140 against live state, fresh today. The triage of record (task 7304, 2026-11-14; re-verified by tasks 16627 and 18202) stands; one fact has moved since — Part 2's substrate landed today.

    Verdict: #2140 stays open as the design record. No slice is landable from this issue — Parts 1 and 3 are resolved, and Part 2's remainder is owned by #1656. The single next action sits there, not here.

  14. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Released by felix (outcome: free). Reconciled 2026-11-22: Parts 1 and 3 resolved (#2158, #2135 closed; cadence is Drewry's call); Part 2 remainder owned by #1656, whose AC1 substrate landed today via PRs #12687/#12688/#12689. No slice landable from #2140 itself.

  15. added and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 22, 2026
  16. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note — next implementation slice landed as PR

    The previously named AC2 remainder now has a reviewable implementation slice in #1656: PR #12879.

    It adds binding-aware detection and retry for expired queue sessions with terminal error outcomes, using verified delete + atomic compare-clear and logging the binding/requeue action. The route is preserved so the next claimant fire applies the standard retry/failover ladder. #2140 remains the design record; cadence/rate decisions are unchanged.

  17. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Agent note — reconciliation (Lane HD, archer seat)

    Picked up via fleet agent next (priority rung; queue store down, GitHub fallback). Fresh verification this run (gh REST, 2026-11-23 ~06:10Z):

    Verdict: no code slice is landable from #2140 itself — it remains the design record, as felix's 2026-11-22 reconciliation already established. Next concrete steps, in order: (1) #1656's final verification + close by its assigned line of work; (2) Drew's cadence decision for Part 3. #2140 closes when both land. This lane is moving to the next queue item rather than duplicating #1656's owned work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    epic/fleet-orchestrationReprioritization program epic (2026-11-12)priority/highImportant and time-sensitivequeue/queuedHas a queued queue tasksource/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions