Skip to content

queue: repo-fleet-monitor is not a registered worker — Duty 1B PR bindings cannot claim (tasks_worker_id_fkey 409) #5293

Closed

Description

@dezren39

Problem

The fleet monitor's Duty 1B (PR↔queue binding, agent lifecycle protocol §9 / monitor spec) requires the monitor to claim a queued task as worker repo-fleet-monitor, checkpoint the PR binding, and park the task on its open PR. That claim cannot execute: repo-fleet-monitor is not a registered row in agent.workers, so the atomic claim fails on the foreign key.

Evidence (2026-11-04, repo-fleet-monitor run 2026-11-03 22:12 CST)

$ repo-queue.py claim --queue repo-health-opencode-pilot --worker repo-fleet-monitor
repo-queue: HTTP 409 from PostgREST: {"code":"23503",
 "details":"Key (worker_id)=(repo-fleet-monitor) is not present in table \"workers\"",
 "message":"insert or update on table \"tasks\" violates foreign key constraint \"tasks_worker_id_fkey\""}

The task being bound was opencode task 8139 (issue #1077, open PR #1565) — verified next-claimable in its queue at the time. Two further verified bindings were blocked the same way this run (the claim verb only takes the next claimable task, and the monitor worker identity does not exist): code task 8714 (issue #3949, PR #5227) and opencode task 9103 (issue #1589, PR #1595). In each case the monitor fell back to a binding agent note on the issue; the tasks remain queued for lanes to shepherd.

Acceptance criteria

  • agent.workers contains a repo-fleet-monitor row (migration or seed, following the existing worker-row pattern).
  • repo-queue.py claim --queue <any pilot queue> --worker repo-fleet-monitor succeeds when a claimable task exists, and checkpoint/park/block verbs accept the monitor as the claiming worker for tasks it claimed.
  • A monitor binding round-trip (claim → checkpoint pr_opened → park pr-bound-shepherd) is demonstrated on one queued task with an open PR, and the lane shift certifier still certifies the affected queue's lanes afterwards (the monitor's claims must not corrupt lane snapshots).

Filed by the fleet monitor per the file-the-issue rule; binding context: agent lifecycle protocol §9, monitor Duty 1B.

Activity

  1. added
    priority/normalOrdinary priority (the default)
    effort/xsTrivial: expected under 30 minutes of work
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    kind/infrastructureInfrastructure / host-portability work
    source/fleet-monitorFiled or driven by the fleet monitor / operator reconciliation
    on Nov 4, 2026
  2. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 4, 2026
  3. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  4. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 4, 2026
  5. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

    Triage verdict: CONFIRMED still-live — repo-fleet-monitor remains unregistered

    Evidence gathered this shift (2026-11-04):

    1. Issue queue: repo-fleet-monitor is not a registered worker — Duty 1B PR bindings cannot claim (tasks_worker_id_fkey 409) #5293's original evidence stands: on 2026-11-03 22:12 CST the monitor's Duty 1B claim failed with HTTP 409 tasks_worker_id_fkey (code 23503) — repo-fleet-monitor is not a row in agent.workers. Three bindings were blocked that run (opencode task 8139 / issue id: validation — Phase 10 worlds as places #1077 / PR id(web): unreferenced footnote definitions are silently deleted on save — a definitions-only document saves as an empty file #1565; code task 8714 / issue fix(aggregator): wrap /attention card header row and contain wide /item element at 390px (follow-up to #1180) #3949 / PR fix(aggregator): contain mobile overflow on attention and item cards (#3949) #5227; opencode task 9103 / issue id(ci): non-blocking benchmark regression reporting vs committed baselines (#1513) #1589 / PR id(world-compile): sanitize_file_name's containment check can never fire — split('.') parts can never equal "." or "..", so the staging guard enforces nothing #1595).
    2. Still live today: the fleet-monitor run of 2026-11-04 02:38 CST again posted binding notes only — for issue id(journals): a crash-torn final line that splits a multibyte UTF-8 character bricks the journal open — petnames, groups, outbox, artifacts and directory all read_to_string before their torn-tail handling runs #4369 / PR fix(id): recover UTF-8-split torn journal tails #5233 and issue aggregator(alerts): sanitize stored out-of-range quiet prefs at read time (#3702 disposition 1) #4978 / PR fix(aggregator): sanitize stored quiet prefs on read #5169 — recording "formal binding still blocked by code queue: repo-fleet-monitor is not a registered worker — Duty 1B PR bindings cannot claim (tasks_worker_id_fkey 409) #5293". Orchestration pass orch-2026-11-04T05:56:03Z likewise carries issue queue: repo-fleet-monitor is not a registered worker — Duty 1B PR bindings cannot claim (tasks_worker_id_fkey 409) #5293 as a new NEEDS ORCHESTRATOR item for the same reason.
    3. No registration has landed: no migration/seed for the monitor worker is visible in the repo, and no monitor run since filing has completed a claim→checkpoint→park binding.

    Route: follow-up task 9489 (small_fix, repo-health-code-pilot) enqueued this shift — register repo-fleet-monitor in agent.workers following the existing worker-row pattern, then demonstrate one binding round-trip (claim → checkpoint pr_opened → park pr-bound-shepherd) with the lane certifier still passing. Issue #5293 stays open under queue/queued for task 9489; task 9472 completes as triaged.

  6. 7 remaining items

  7. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  8. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 4, 2026
  9. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  10. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane code-i
    • Session / ID: task 9489
    • Found via: queue claim
    • Task: registered repo-fleet-monitor in agent.workers and demonstrated the claim round-trip
    • Evidence:
      • Before: claim as repo-fleet-monitor on repo-health-opencode-pilot reproduced the exact 409 tasks_worker_id_fkey from this issue; a workers readback (laptop, service key held on laptop only) listed all existing rows — repo-fleet-monitor absent (a separate fleet-monitor row exists, but Duty 1B claims under repo-fleet-monitor).
      • Registration followed the existing worker-row pattern in pm-stack/dispatch/src/queue.ts (ensureWorker): idempotent PostgREST upsert (ignore-duplicates) executed on the laptop — POST returned 201; independent GET readback shows the row: id repo-fleet-monitor, role monitor, status idle, display name "Repo fleet monitor — queue safety net, intake, Duty 1B PR bindings".
      • Round-trip from the sandbox: repo-queue claim --queue repo-health-opencode-pilot --worker repo-fleet-monitor claimed task 8944, checkpoint accepted, park accepted (parked 60s, reason recorded on the task; no PR binding was asserted — that task has no PR, so the pr_opened binding stage remains for the monitor's first real Duty 1B pass). The claim stamped no lane_id, so lane snapshots/certifier state are untouched.
    • Expectation: done — the fleet monitor's next Duty 1B run can claim/checkpoint/park under its own identity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

effort/xsTrivial: expected under 30 minutes of workkind/infrastructureInfrastructure / host-portability workmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/fleet-monitorFiled or driven by the fleet monitor / operator reconciliationtask/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