Skip to content

fleet-queue: claim-link rollup — repo-queue models over the #9046 link (#10357) - #10560

Merged
dezren39 merged 1 commit into
mainfrom
feat/claimlink-models-rollup
Nov 15, 2026
Merged

dezren39 merged 1 commit into
mainfrom
feat/claimlink-models-rollup

Conversation

@dezren39

@dezren39 dezren39 commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

What this is

The claim-stamp task↔session link Drew asked for (twice, 2026-11-12). Research first: the recording machinery already landed with #9046 (2026-11-12) — model_stamp / session_bound / session_unbound events in the queue store, the tasks-row latest stamp, and repo-queue timeline <task> rendering the per-task chain joined to route_attempt. What was missing is the inversion: nothing answered "which tasks did model Y touch" across the fleet, so per-model quality accounting still needed hand-rolled SQL. This PR builds exactly that inversion, and nothing else.

Store choice, per #10357: that design names the claimant/queue as a capture point and says the task↔session link "should be absorbed" into its general form. No new store, no new schema — the rollup reads the events #9046 already writes.

Changes (fleet-queue, 2 files)

  • Broker /events-list: task_id is now optional. Without it, the verb lists across tasks inside a since window (kind-filtered), rows always carry their task_id, and the limit clamps wider (50,000 cross-task vs 1,000 per-task — a 7-day window of link/outcome kinds is ~10k rows). With a task_id the behavior is unchanged.
  • Client repo-queue models [--days N] [--json]: aggregates the window into two sections, reusing timeline_event / collapse_timeline / binding_windows / dominant_model_for_session:

Proof

  • cargo test -p fleet-queue --all-features: 334 lib tests + integration suites, all green, including 5 new tests (cross-task /events-list source oracle, row task_id parsing, per-model task dedup, served aggregation, ISO window formatting). cargo fmt clean.
  • Live-data proof of the new verb (new client binary run against the real production event rows for the last 7 days, served through a local read-only shim because the production broker is still the previous build — the verb activates fleet-wide when the broker next deploys, the same staging queue: per-task session binding history + model timeline — session_id join to raw opencode data (extends #8176) #9046's timeline shipped with):
model rollup — last 7d (since 2026-11-08T22:25:42Z)
stamped (claim/bind stamps):
  muse-lane/muse-lane  tasks=1519 sessions=0 stamps=2016 completed=1193
  opencode-route/summit  tasks=4 sessions=4 stamps=6 completed=2
  opencode-route/workhorse  tasks=2 sessions=2 stamps=2 completed=2
served (dominant leaf per binding window):
  _muse/muse-spark-1.3-contributor#high  tasks=98 windows=99 calls=5702
  openai.main/gpt-6-luna#xhigh  tasks=160 windows=180 calls=7959
  opendesign/deepseek-v4.1-flash#high  tasks=76 windows=198 calls=3301
  opencode-go.drewrypope/beam-free  tasks=2 windows=2 calls=26
  ... (22 leaves total)

The completed=1193 for muse-lane matches the independently measured claim-stamp completion count for the same window. --json emits the same sections with full task_ids arrays — the literal answer to "which tasks did model Y touch".

  • The per-task direction is already live on the production binary: repo-queue timeline 17126 shows task 17126 → session ses_e5e24f390ddffe8qOcDiZCywYe → stamp opencode-route/workhorse (transfer, 2026-11-14T17:13:09Z) → served by opencode-go.drewrypope/beam-free (the same chain the rollup counts above).

Honest limits (in the PR, not buried)

  • Stamped coverage is thin for routed models — only 8 session_bound events exist all-time. That is a data problem, not a recording problem: both launch paths bind (claimant main flow, launch_one, dispatch_batch all verified), but claimant launches collapsed with the fleet stall + quota walls. The rollup gets more useful as launches recover; it does not manufacture coverage.
  • muse-lane stamps carry no session id (the lane claimant stamps provider/model literally as muse-lane, session NULL) — visible above as sessions=0.
  • No per-model PR count, deliberately. The store's pull_request events are a GitHub webhook mirror whose task_id is always NULL (verified: 2,480 events in-window, 0 with a task_id), tasks.result is empty, and merge_intents links PRs to issues/sessions, not tasks. There is no task-linked PR signal to count yet; shipping a permanently-zero column would invite false conclusions. The follow-on is a merge_intents↔task-payload (issue number) join — separate build.
  • One wart noticed in passing: some session_unbound events carry the literal string "None" as session_id (lane park/release appends). Not fixed here; the rollup's window logic ignores unbound rows without a matching bound session.

Refs #10357, #9046, #9408.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

#10357)

The task-session-model link itself landed with #9046 (model_stamp /
session_bound events + repo-queue timeline per task). What was missing
is the inversion: nothing answered "which tasks did model Y touch"
fleet-wide, so per-model accounting still needed hand-rolled SQL.

- /events-list (broker): task_id becomes optional; without it the verb
  lists across tasks inside a since window (kind-filtered), rows always
  carry their task_id, cross-task limit clamps to 50000.
- repo-queue models [--days N] [--json] (client): aggregates the
  window into a stamped section (per provider/model/variant: distinct
  tasks, sessions, stamps, completions) and a served section (dominant
  route_attempt leaf per binding window: tasks, windows, calls),
  reusing timeline_event / collapse_timeline / binding_windows /
  dominant_model_for_session. Against an older broker it says the
  rollup activates with the broker build and exits 3.

No new store: #10357 names the claimant/queue as the capture point and
absorbs the link there; the events store is that place. No per-model
PR count: pull_request events are a GitHub webhook mirror (task_id
always NULL) and merge_intents link PRs to issues/sessions, not tasks,
so no task-linked PR signal exists to count yet.
@dezren39
dezren39 requested a review from a team as a code owner November 15, 2026 22:26
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-15T22:26:58.892539Z
We couldn’t complete this review. Comment @codex review to try again.
453cdb7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@dezren39
dezren39 merged commit 9b014d9 into main Nov 15, 2026
@dezren39
dezren39 deleted the feat/claimlink-models-rollup branch November 15, 2026 22:27
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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