Repository navigation
Metrics signal groups: kept PR survival, post-merge quality, survivorship-safe efficiency and friction (#2066) - #2081
Merged
Merged
Conversation
…ship-safe efficiency and friction (#2066) Add four paired signal groups to metrics --json, /api/v1/metrics and the Console Metrics page: per-kind kept pull-request survival read from github-inbox.json alone, confirmed Bug origins by merge, calibrated weekly Scores pass rates, Needs you and Stop counts, Succeeded-only duration, Repairs and CI rounds with first-pass clean rate, time and spend per succeeded delivery by Harness and Model and wasted share, and stages above their Usual range with per-Session friction and Security holds. Each line carries per-bucket values for a static sparkline and, when bounded, its change from the preceding window. Setup rows' means now cover Succeeded Commands only.
…Scores and merged cohorts in daily windows, n beside deltas (#2066) Open the Yield group whatever the window, filter Scores as exactly as Commands, bucket a Scoring week by its last day, date an unkept merged pull request by its Command's end, show each window's n with the changes, name intervention counts as the glossary allows, give headline values a unit, share the pull-request URL identity and a template macro, and point code navigation at the new owners.
This was referenced Nov 12, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
metrics --json,/api/v1/metricsand the Console Metrics page now carry four paired signal groups. All three surfaces read the same document, built from local files only: Command records,github-inbox.json(read from the file alone, with no quota check and nogh), and the Scoring checkpoints.Each group line holds its whole-window totals, a value for each bucket (drawn as a static SVG sparkline) and, for a bounded window,
current/prior/delta. The Change column also shows each window'sn. Raw Standards and Spec finding counts appear in no group; onlysecurity > 0holds do.Evidence
Execution evidence
Before (review findings, on 495bc84):
cargo test --test console metrics_page_heads_the_yield_group_without_a_bounded_window→panicked at tests/console/metrics.rs:296:5…test result: FAILED. 0 passed; 1 failedcargo test --bin thirdshift logs::metrics::scope::tests→panicked at src/logs/metrics/scope.rs:256:9…FAILED. 2 passed; 1 failedcargo test --test metrics confirmed_bug_origins_show_without_a_kept_answer→FAILEDcargo test --test console metrics_page_heads_the_yield_group_when_unbounded→FAILEDAfter (6cd1945):
cargo test --test metrics→test result: ok. 44 passed; 0 failed; 1 ignoredcargo test --test console metrics→ok. 9 passed; 0 failedcargo test --bin thirdshift metrics→ok. 14 passed; 0 failedAcceptance tests (
tests/metrics.rs), all pass:fast_failures_and_crashes_raise_waste_without_flattering_succeeded_means: after 2 fast failures and a crash, the Succeeded means are unchanged, failures rise to 3, and both wasted shares rise.kept_pull_requests_bug_origins_and_calibrated_scores_read_no_github:gh_calls()is empty.stage_bottlenecks_friction_and_interventions_compare_with_the_preceding_window.Parity:
tests/console/api.rsstill checks that/api/v1/metricsequalsmetrics --jsonfor every window.metrics_page_shows_the_four_signal_groups_as_the_api_reports_themchecks the page against the API.scripts/affected-tests origin/issue-2036:npm test --prefix site: PASScargo build --locked: PASSnpm test --prefix console: PASS. The Metrics browser test checks all four headings and sparkline strokes in every Theme at 390px, with no motion.cargo test: FAIL, only intests/process.rsfindings::*. Which test fails changes from run to run (merged_fix_is_rechecked_after_a_later_fix_fails,fixing_dispatches_each_reproduced_finding_…), and they pass alone. The same binary fails the same way on the base commit: in a temporary worktree atorigin/issue-2036,cargo test --test process findings:: -- --test-threads=4gaveFAILED. 17 passed; 1 failed. Every test target afterprocesspassed withcargo test --no-fail-fast --test <each>.Visual evidence
I made captures at 1440×900 and 390×844 of
/metrics?window=7dwith the same fixture: 42 Ticket and Review runs, kept PR states, and Session signals. Publishing them to a secret Gist was refused by this session's permission settings, so they are not embedded here. They are on the build machine at/tmp/before-desktop.VuQdxp.png,/tmp/after-desktop.PLooVg.png,/tmp/before-mobile.1aNEdW.pngand/tmp/after-mobile.JO7U1Z.png.Merge Danger
Door: two-way
The change is read-only. Nothing is written to records,
github-inbox.jsonor the Scoring checkpoints.Blast Radius: consumers
weeks/daysrows'repairs,ci_roundsandtotal_minutesnow cover Succeeded Commands only. A consumer that relied on outcome-blind means will see different numbers.groupsis a new required field in the OpenAPI document.Review coverage
.thirdshift-review-QXR9uO/standards.mdandspec.md. Counts: Standards 11, Spec 6.site/docs/index.html, whose source isdocs/guide.md;npm run docs:check --prefix sitepasses.src/logs/reading.rs,src/logs/reading/attribution.rsanddocs/code-navigation.md. These changed only in the review-fix commit 6cd1945, which shares the pull-request URL identity and updates the code-navigation rows.Unaddressed findings
Standards
needs_youis narrower than the glossary's Needs you. I renamed the "attention" group tointerventions. I kept the narrower count on purpose: Q1.4 indocs/grill-with-docs/2036-console-metrics.mdleaves live operational state (Needs you's Silent and Slow rows) on the existing Inbox pages.docs/guide.mdnow says the count covers Commands that entered Needs you when they ended.kept_pull_requestsrepeatsload's decode, andStore::scoresrepeatsmeasure's pair closure.loadalso asksGitHub::quota_waits(), and the issue requires thatmetricsmake zero GitHub calls, so the file-only read is the point of the separate function. I did fix the legacy row-only History keys this finding exposed:kept_pull_requestsnow skips keys without::.Weekand the narrowSampledprojection), and both now feed the one sharedcalibration::measure_pairs.command.record.run_metrics. These follow how the existing reader insrc/logs/metrics/trends.rs(collect) walks the same fields. Moving them ontoCommandwould be a refactor outside Survivorship-safe efficiency, session friction, kept PR survival, and post-merge quality signals #2066.attempt_minutesreads the filesystem, andtrends()callsread_scores()directly. This matches the existingConfirmedCounts::readinsrc/logs/metrics/bug_origins.rs, which callscrate::scoring::read_confirmed_origins()the same way. The reviewer rated it minor.Spec
cargo test --test metrics a_failed_command_without_run_metrics_still_counts_its_attempt_time→test … ok. Snapshot reading already rebuildsrun_metrics(withtotal_minutesfromended_at) for every ended record that lacks them; seesrc/logs/reading.rsRunMetrics::historical. The test stays in the suite.tests/console/api.rs(theparity(...)loop over/api/v1/metricswindows) already asserts that the API equalsmetrics --jsonfor the whole document,groupsincluded.metrics_page_shows_the_four_signal_groups_as_the_api_reports_themthen checks the page against the API.Closes #2066
Built with claude 2.1.314 · opus · default effort
Security review outcome
No unaddressed introduced findings.