Skip to content

Slim repo-fleet-monitor: snapshot/SQL-first state fetch + 2h cadence (target ≤3M/run) #2134

Closed

Description

@dezren39

repo-fleet-monitor's function is load-bearing (queue↔GitHub reconciliation: claim/label divergence repair, dead-in-queue alerts, PR↔queue binding — the duty that ended the duplicate-PR class of failure). Its cost is not: 7.2M input per run, hourly (108M per 15h at check-in #5), because it re-derives state from GitHub lists and the queue helper every run.

Rebuild the fetch on the fleet-watchdog template (its 2026-10-28 rewrite cut state fetch to two SQL queries): precompute a compact state snapshot (queues, claims, labels, open PRs) deterministically, let the agent judge only the divergences, and move cadence 1h → 2h. No duty may be dropped. Target ≤3M input/run measured over the following three check-ins.

Activity

  1. developing-today commented on Oct 29, 2026

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

    @dezren39
    MemberAuthor

    Progress 2026-10-29 ~01:2x CDT: the cadence half is LIVE — repo-fleet-monitor now runs every 2h (definition edited in the git copy + posted as a replacement job; scheduler verified interval@2h, next run 03:12 CDT). Remaining on this issue: the snapshot/SQL-first state-fetch rewrite (the larger half of the saving, target ≤3M/run). Issue stays open for that work.

  3. 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.

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

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  6. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

    Triage verdict — premise CONFIRMED with one correction, design decided, implementation routed

    Premise check (live state, 2026-10-29):

    • ✅ Cadence half is already done: repo-fleet-monitor is enabled at 2h in the live scheduler — the 1h → 2h move in this issue's text already happened, so the remaining work is the fetch rewrite only.
    • ✅ The cost mechanism is as described: the monitor re-derives state from GitHub lists + the queue helper each run (7.2M input/run at check-in Bump build/buck/preludes/buck2-prelude from 3a02ea3 to 370cd4d #5).
    • ⚠️ Correction to the "rebuild from scratch" framing: snapshot prototypes already exist in the goal workspace (hidden_files/monitor-fetch.py, monitor-query.py — PostgREST pulls of live queue tasks), but they are not wired into the monitor's run, and their saved outputs (monitor-gh-snapshot.json, monitor-tasks-snapshot.json) are stale from 2026-10-28. The implementation extends and wires these prototypes; it does not start from zero, and it must never judge from those stale files.

    Design (fetch rewrite)

    1. Deterministic precompute at run start. A script extends the prototypes above and emits ONE compact digest: live tasks from all four pilot queues (one PostgREST query per queue, live statuses only), joined against a bounded GitHub pull — only issues carrying queue/*/work/* labels and PRs bound to live tasks. Divergences are pre-flagged mechanically (claimed-but-unlabelled, labelled-but-no-live-task, expired lease still claimed, expired park, PR merged/closed but task open, issue closed but task open, dead-in-queue at max_attempts).
    2. The agent judges only the digest. Full lists stay out of context; a flagged item gets a targeted single-item fetch. Intake enrichment stays bounded/newest-first but draws candidates from the digest.
    3. Freshness is binding (the watchdog's rule, applied here): the digest is generated inside the run; a snapshot older than the run is not evidence.
    4. No duty dropped — duty → digest field mapping: reconciliation/auto-repair → divergence flags; dead-in-queue alerts → attempts flag; intake enrichment → unenriched-issue list; in-progress tracker → claimed-task/label join; protocol checks → work/* items whose latest agent note is stale or missing.
    5. Guardrail metric: success is ≤3M input/run over the following three daily check-ins and divergence-repair counts at or above the pre-rewrite run average — a cheaper run that quietly repairs less is a failure, not a saving.

    Routing

    Implementation filed as #2154 (instruction rewrite to the digest flow, script wiring, one evidenced full run, three-check-in measurement) and enqueued as a follow-on queue task in this same pass. Role note: repo-fleet-monitor stays Tend in the #2131 map; this rewrite is its slimming child in everything but name.

  7. 73 remaining items

  8. added and removed
    status/blockedQueue or user escalation state
    on Nov 13, 2026
  9. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    Released to the queue under Drew's 2026-11-13 unblock-all order (main chat, 23:53 CT). Task(s) 15253 moved from blocked/parked to queued in the fleet unblock-all pass (worker main-unblock-all-2026-11-13). Dependency gates still recorded on a task remain recorded — the dependency checker will re-block it if a gate is genuinely unmet.

  10. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: blocked

    Triage verdict (fresh, 2026-11-14): this issue's premise is stale in two checkable ways, and what remains is a Drew decision, not a build.

    1. The 2h cadence already happened: the archived monitor definition (~/workspace/cron.d/_archive/repo-fleet-monitor__interval@2h.md) is interval 2h, titled "every 2h".
    2. The monitor no longer runs at all: no live repo-fleet-monitor schedule exists (checked the full cron list today); its definition sits in cron.d/_archive/, file timestamp 2026-11-08 22:08 UTC — archived during the 2026-11-08 fleet reorganization, the same window in which Drew disabled 12 queue lanes. On its last day the fleet watchdog repeatedly reported it clear/healthy, so it was not archived for failing.
      There is therefore no live fetch to slim: the ≤3M/run rebuild has no target until the revive question is answered. Adjacent duties are partially covered meanwhile by queue-hygiene-sweep (4h), dropped-thread-catcher (1h), fleet-minder (15m), and the hourly orchestration-pass — but the issue calls the monitor's queue↔GitHub reconciliation duty load-bearing, and only Drew can rule on whether that duty is (a) revived — as the slimmed snapshot/SQL-first job this issue specifies, at 2h — or (b) formally retired, its duties assigned to the covering jobs and this issue closed.
      Escalated to Drew via the pending-decisions ledger (item fleet-monitor-2134). Nothing for the fleet to fix first; no other gate.
  11. added
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    user/escalatedRequires a Drew decision or access
    and removed on Nov 14, 2026
  12. dezren39 commented on Nov 16, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: done (retired formally — close-out bookkeeping per the answered decision)

    Decision: pending-decisions ledger item fleet-monitor-2134 was ANSWERED 2026-11-15 (orchestrator-audit): "Retire repo-fleet-monitor formally — its reconciliation duties are already absorbed by running jobs (queue-hygiene-sweep, dropped-thread-catcher, fleet-minder), and the monitor itself was archived 2026-11-08 with no live schedule. Fleet process design; no Drew ruling required." The audit's execution follow-up was exactly this: fleet close-out bookkeeping on this issue naming the absorbing jobs.

    Close-out verification, fresh 2026-11-16 (this shift):

    • Live cron list (checked this shift, enabled + disabled): NO repo-fleet-monitor schedule exists — there is no live job to slim, disable, or delete. The archived 2026-11-08 definition is not a schedule.
    • All three absorbing jobs ARE present in the live cron list: queue-hygiene-sweep, dropped-thread-catcher, fleet-minder.
    • The original slimming premise is moot (prior triage, note 6877029456: monitor already at 2h cadence in its archived definition when archived).

    Action this shift:

  13. dezren39 commented on Nov 16, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: done (already_done — verified fresh this shift)

    Verified fresh 2026-11-16: issue #2134 is CLOSED (stateReason COMPLETED, closedAt 2026-11-16T09:08:46Z, label status:done). The closing note from task 15253 (lane code-b, 2026-11-16T09:08:39Z) records the answered decision: retire repo-fleet-monitor formally — no live repo-fleet-monitor schedule exists, its archived 2026-11-08 definition is not a schedule, and its reconciliation duties are absorbed by queue-hygiene-sweep, dropped-thread-catcher, and fleet-minder. There is no live fetch to slim and no remaining fix for task 17442, which was created at 09:08:49Z as an automatic triage follow-on of task 15253 after that close-out. Completing task 17442 as already_done with this evidence.

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

Metadata

Metadata

Assignees

Labels

epic/fleet-orchestrationReprioritization program epic (2026-11-12)priority/highImportant and time-sensitivesource/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions