Skip to content

Agent fleet analytics from ground truth: merge rate, review tax, rework, cost per merged PR (#375) - #424

Merged
currentbits merged 7 commits into
mainfrom
coder/agent-fleet-analytics-from-ground-truth--efe17c
Aug 17, 2026
Merged

currentbits merged 7 commits into
mainfrom
coder/agent-fleet-analytics-from-ground-truth--efe17c

Conversation

@currentbits

@currentbits currentbits commented Aug 17, 2026 •

Copy link
Copy Markdown
Owner

Closes #375.

Solenta launches every session and sees every commit, so merge rate, rework and review tax are ground truth here rather than inference. Three parallel workers built against one contract; a seam test drives the real collector into the real rollup.

Shape

Layer Path
Collector (facts only) electron/fleet.js → fleet:evidence
Rollup (pure) src/fleet.ts summarizeFleet(evidence, range, now)
View src/components/FleetView.tsx (FleetReport is a pure presenter)
Seam electron/test/fleet-seam.test.js

Evidence comes from gh pr list --state all (with reviews, through a new listPrsRaw so the unknown-field fallback is not re-implemented) joined to threads by head branch, plus per-run active time from the work log. A PR with no matching branch is a human PR and is kept — it is the baseline the review tax divides by.

Line durability uses the squash-merge shape: find the merge commit by (#N) on the default branch, git show --numstat for lines added, git blame HEAD for how many are still there. Blame is capped and the shortfall is reported in notes, which the view renders — silent truncation would read as full coverage.

Definitions that are deliberate

  • Merge rate = merged / (merged + closed-unmerged). Open PRs are out of the denominator: an open PR is not a decision, and counting it as failure would make a fleet look worse the faster it ships.
  • Close-without-merge is reported beside merge rate, not as its shame — a superseded or duplicate fix closing unmerged is the system working (the Sentry read from the issue comments).
  • Cost per MERGED PR, not per token. null when nothing merged, never $0.00.
  • Durability / rework only counts threads past the 14-day window. Nothing measurable yet renders "not enough history", never "0% durable".
  • Review tax = median agent open→first-review ÷ median human. Median, because one PR reviewed three weeks later would swallow a mean.

null and 0 mean different things throughout, and the view renders them differently.

Tests

npm test — 907 renderer, 1125/1126 electron. The one failure is the known web-integration reconnect-backoff baseline on main (120000 !== 1000), untouched by this branch.

The seam test exists because each worker was built against a fake of the other side: it asserts the numbers the view actually renders (merge rate with open PRs excluded, cost per merged PR, durable share from blame, per-run active time, agent-vs-human review tax).

Not in scope

LLM classification of threads as creating/debugging/refactoring (second issue comment) — that is model-based detection, not ground truth, and belongs on top of these numbers once they are proven.

🤖 Generated with Claude Code

  • PR created by the Claude Code agent

Willem and others added 7 commits August 17, 2026 22:19
…re (#375)

The seam three parallel workers build against: FleetEvidence / FleetPr /
FleetThread in shared/ipc.ts, coder.fleet.evidence(), and the pure
summarizeFleet signature in src/fleet.ts (stubbed empty until the rollup
lands, so an unimplemented rollup reads as no data, never as zero merge
rate).

Co-Authored-By: Claude Opus 5 <[email protected]>
Pure rollup: merge rate excludes open PRs, cost per merged PR is
null when nothing merged, durability/rework stay null until a
thread is old enough to judge, review tax is agent/human median
latency. Totals are recomputed from pooled counts.
Facts-only FleetEvidence from store + gh + git. Rates stay in src/fleet.ts.
…le (#375)

Pure FleetReport presenter plus FleetView container (7/30/90, loadGen).
Null is not zero: missing cost/durable/review-tax render as placeholders,
never $0.00 or 0%. Sidebar/App nav next to Usage. Browser fixture so
dev:browser has threads, mixed PR outcomes, a human baseline, and notes.
…into coder/agent-fleet-analytics-from-ground-truth--efe17c
…into coder/agent-fleet-analytics-from-ground-truth--efe17c
Worker A built the collector against a fake rollup and worker B the rollup
against fake evidence, so neither proved the join. fleet-seam.test.js drives
the real collector's evidence into the real summarizeFleet and asserts the
numbers the view renders: merge rate with open PRs excluded, cost per merged
PR, durable share from blame, per-run active time, and the agent-vs-human
review tax.

Co-Authored-By: Claude Opus 5 <[email protected]>
@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.

@currentbits currentbits changed the title Agent fleet analytics from ground truth (#375) Agent fleet analytics from ground truth: merge rate, review tax, rework, cost per merged PR (#375) Aug 17, 2026
@currentbits
currentbits merged commit f239cdd into main Aug 17, 2026
1 check failed
@currentbits
currentbits deleted the coder/agent-fleet-analytics-from-ground-truth--efe17c branch October 3, 2026 16:07
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.

Agent fleet analytics from ground truth: merge rate, review tax, rework, cost per merged PR

1 participant