Skip to content

epic(fleet): queue fleet reliability — lane workers for every queue, certified shift reporting #1233

Open
5 of 6 issues completed

Description

@dezren39

Queue fleet reliability

Purpose

The queue system that keeps the four repos healthy (Supabase agent.tasks, the repo-health queues, lane shifts, the fleet monitor) proved itself on 2026-10-26 — and showed exactly two reliability defects. This epic closes both, so the fleet runs for a week at a time without operator repairs.

Scope

  1. Claim evaporation on the non-code queues. The code queue runs two staggered lane shifts (~90-min budgets); opencode/openchamber/nix are worked by short-budget arrangements whose runs end mid-task, stranding claims. On 2026-10-26 the monitor repaired 10+ divergences and two tasks died in queue (repaired by operator cap raises + migration 0012's park/resume accounting fix). Child: Queue workers: give the non-code queues lane-style long-budget shifts (claim evaporation is a run-budget problem) #1130 — lane-style long-budget shifts for the non-code queues.
  2. Uncertified shift runs. Five runs on 2026-10-26 ended with a tool result lost, unable to certify their own completion even when the work landed; the parent re-verified from GitHub/queue state by hand each time. Child: Fleet observability: certify shift completion from queue state, not run self-report (uncertified runs) #1131 — certify completion from durable state, automatically.

Out of scope: producer jobs (new-issue-creator, pr-diff-review) and the Phase 3 sweep-producer expansion (paused by Drew 2026-10-26; separate decision).

Execution mode

Online: cron job bodies, worker instructions, monitor duties, Supabase migrations. All changes follow the fleet's isolation rules (pilot functions only; global claim/fail untouched) and the no-uncommitted-code rule.

Dependencies

Builds on migration 0012 (applied 2026-10-26: park/resume no longer consumes attempts). Measured by the queue-pilot interim check (2026-10-28) and the fleet monitor's hourly reports.

Acceptance

  • Zero dead-in-queue tasks across all four queues over a rolling 7 days.
  • Every shift delivery is certified from queue/GitHub state; no delivery rests on a run's self-report alone.
  • The monitor's evaporation-repair count trends to zero; operator cap raises are no longer a routine event.

Filed by Muse (operator) 2026-10-26, grouping #1130 + #1131 under Drew's direction that fleet work carry epics, roadmap items, and dashboard prioritization.

Activity

  1. added
    priority/highImportant and time-sensitive
    area/infraInfrastructure, deployment, and operations
    epicMeta-issue grouping multiple items (org Project Type=Epic)
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    on Oct 27, 2026
  2. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  3. added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 27, 2026
  4. added
    mode/onlineFully doable remotely: design, config, code, cloud
    on Nov 1, 2026
  5. 18 remaining items

  6. dezren39 commented on Nov 10, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · re-measurement of the certification criterion (from task 14576 / issue #7070)

    Re-measurement of this epic's criterion "every shift delivery is certified from queue/GitHub state", 2026-11-10:

    Remaining gap against the criterion as written: one full day of lane c + lane e runs certifying under the monitor's own 24h metric — lane e pending the monitor's next full-day metric, lane c blocked on the re-enable decision. Tracked on issue #7070 (task 14576 parked 24h on exactly that resume condition).

  7. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · epic update — #7070 verification complete (task 14576, lane code-a, 2026-11-11)

  8. dezren39 commented on Nov 12, 2026

    @dezren39
    MemberAuthor

    Program tending — epic completion (tracking: #1352)

    • Child progress: 2 of 2 children closed (0 open).
    • Last movement: 2026-11-12T07:03:39Z.
    • All recorded children are closed. Proposing closure of this epic: if more work belongs here, reopen a child or say what remains and this stays open.
  9. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged
    task 18093 (repo-health-code-pilot, lane code-e)

    Bulk-intake re-triage verification, 2026-11-17.

    Fresh state checked this run: epic issue #1233 is OPEN, labels epic, status/triaged, priority/high, effort/l, epic/fleet-orchestration. No status/needs-triage and no held, user/owned, do-not-merge, or do-not-auto-edit label.

    Record on the issue, re-read this run: both children (issue #1130, issue #1131) are closed - program tending recorded 2 of 2 children closed on 2026-11-12 and proposed closure of this epic, with no remainder stated since. The certification criterion was investigated to root cause on issue #7070 (task 14576, 2026-11-10/11): the lane c/e uncertified flags were a fleet-wide infra-era artifact (issues #6619, #6853), not a snapshot defect, and the monitor's 2026-11-08 reading showed lanes a-f certified. One 2026-11-11 note said lane e's worker job was disabled; that is no longer true - this note is written by a live lane code-e shift.

    Verdict: triage complete; the epic's build work is done (children closed, verification complete). This lane does NOT close the epic on this pass: its acceptance is operational and monitor-measured (zero dead-in-queue tasks across all four queues over a rolling 7 days; monitor evaporation-repair count trending to zero), and this triage did not take the monitor's current 7-day reading, so it will not certify a measurement it did not make. The closure proposed by program tending on 2026-11-12 stands as the pending action, executable by program tending (or any lane) once that current monitor reading is in hand - that reading is the only remaining step this triage names.

    Completing task 18093 as triaged.

  10. dezren39 commented on Nov 19, 2026

    @dezren39
    MemberAuthor

    Program tending — epic completion (tracking: #1352)

    • Child progress: 2 of 2 children closed (0 open).
    • Last movement: 2026-11-17T01:28:24Z.
    • All recorded children are closed. Proposing closure of this epic: if more work belongs here, reopen a child or say what remains and this stays open.
  11. removed their assignment
    on Nov 20, 2026
  12. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Lane AI pickup — slice: stop agent-next claim evaporation (the #12618 defect, this epic's defect #1 recurring on the Turso queue).

    Why this slice: both children (#1130, #1131) are closed and the 2026-11-17 triage left only an operational measurement — but today the queue produced fresh evidence that acceptance criterion 2 (every shift delivery certified from queue state; no delivery resting on self-report) is being violated in practice: tasks claimed via fleet agent next cannot be completed once the work runs past the claim lease, so completions are being recorded by fleet queue cancel --reason "<self-reported completion record>" (cancel has no claimed-by guard) while the task itself evaporates back to queued and is re-served. That is claim evaporation + uncertified delivery, this epic's two named defects, in the current tooling.

    Diagnosis (live drill on scratch queues + source read, full record on #12618):

    • A claim taken with agent-next's exact argv (queue claim --worker archer --lane archer, no --lease-seconds) and completed immediately passes the claimed-by guard and reaches the completion gate — there is no identity mismatch on a live claim.
    • The same claim completed after its lease lapses is refused (exit 5): expire_leases returns the row to queued with worker_id NULL. Agent-next passes no lease, so the broker default of 2700s (45 min) applies, and nothing in the agent-next flow heartbeats — lane work routinely runs 1–3 hours.

    Fix slice (one PR): fleet agent next takes its queue claim with an explicit lease sized for agent work instead of silently inheriting the 45-minute default, and names the lease in the claim output/instructions it hands the worker. Oracle: fleet-agent tests pinning the claim argv (failing first), plus the drill re-run. Broker-served behavior is NOT changed (client-side claim parameters only), so no broker redeploy is needed; the broker already distinguishes the expired-lease refusal in its message on current main.

  13. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · slice landed — criterion 1 becomes measurable (PR #12682)

    Slice: fleet queue health now reports failed_events_24h / failed_events_7d per queue (PR #12682). Until now health lumped failed terminal events into terminal_events_24h/7d with completed ones, so criterion 1 ("zero dead-in-queue over a rolling 7 days") could not be read off health at all — repo-health-code-pilot showed 2846 terminal events in 7d with no way to tell whether any were failures. After this PR, failed_events_7d = 0 per queue is the criterion reading off the instrument. No schema, queue, or claim-path change; the live broker serves the new columns once the PR lands and deploys.

    Fresh state this run (2026-11-22 ~14:49 CST, fleet queue health): all four pilot queues read queued 0, at_cap_queued 0, failed 0 — code, nix, openchamber, opencode. That is a point-in-time snapshot, not the rolling 7-day window, which is exactly why this slice exists.

    What remains on the epic: criteria 2–3 still need their monitor readings (shift certification 24h metric; evaporation-repair trend). No new code slice was available: both implementation children (#1130, #1131) are closed, the #2937 follow-ons are closed (#6528 at-cap, #6838 revive, #8154 claim-null diagnostic), and #7070's root cause is recorded as a fleet-wide infra-era artifact, not a code defect.

    Next slice: once #12682 is live, take the 7-day failed_events_7d reading across the four queues and post it here — if all four read 0, criterion 1 is evidenced.

  14. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    #1233 criterion 2 slice landed: the claim-evaporation defect Lane AI diagnosed under this epic (#12618; claim note comment 7085597701) is fixed — PR #12690 merged (364eee3baab), and #12618 is closed as completed with the full test + drill record on it.

    Effect on criterion 2 (every shift delivery certified from queue state; no delivery resting on self-report): fleet agent next claims now carry an explicit 4-hour lease and name it in the hand-out, so work claimed through agent-next completes through fleet queue complete's claimed-by guard instead of being recorded by a self-reported queue cancel reason. The drill on the merged tree's binary showed both halves: a completion landing on an agent-next claim (task 21080, rc=0), and the lapse refusal (broker exit 5) reproduced on a 5-second-lease control (task 21082). The cancel workaround remains only for claims taken by older binaries until seats update.

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

    area/infraInfrastructure, deployment, and operationseffort/lLarge: multi-day or open-ended; expect staged check-insepicMeta-issue grouping multiple items (org Project Type=Epic)epic/fleet-orchestrationReprioritization program epic (2026-11-12)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedmode/onlineFully doable remotely: design, config, code, cloudpriority/highImportant and time-sensitivesource/creatorFiled by the new-issue-creator jobstatus/triagedTriaged and routed (see agent note)status:in-reviewtask/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