Repository navigation
Record Run metrics on Review, Triage and Fix runs (#2047) - #2075
Merged
Merged
Conversation
CommandRecord::finish saved run_metrics only for Run, Spec run and Base fix, so Review run, Triage run and Fix run records kept null metrics and no Session signals. Weekly trends also skipped Code review session rows.
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
CommandRecord::finishkept Run metrics only forRun,Spec runandBase fix. So every Review run, Triage run and Fix run savedrun_metrics: null, with no Session signals. Weekly trends also skippedCode reviewsession rows.Usual ranges are unchanged: they are built from every record's stage times and never read
run_metrics. Pickup, Architect, Security and Scoring runs, Custom processes and Experiments still keep none (out of scope; Custom processes are #1655).docs/guide.mdupdated andsite/docs/index.htmlregenerated.site/index.htmlandsite/how-it-works/index.htmlcorrected. They now name these kinds, say trends split by Command kind, and say a Triage run has no Unaddressed findings (it has no Delivery).Closes #2047
Evidence
Execution evidence
Confirmed cause: the kind filter in
CommandRecord::finish(src/logs/command_record.rs). The regression test drives a Review run, a Triage run and a Fix run throughRecord::finishedwith stages, Session traces and a review summary sidecar.Before (
src/logs/command_record.rsfromorigin/main):cargo test --bin thirdshift review_triage_and_fix_runs_saveAfter: the same command
It checks
total_minutes, stage and summarysession_signals,review_findingsfromsummary.json, and the Fix run'srepairs: 2andci_rounds: 2.Before (without
CodeReviewinis_session):cargo test --test metrics review_triage_and_fixAfter: the same command
It checks
metrics <name> --jsonreadback for each kind, plus the weekly Command-kind and Session rows.Final validation:
scripts/affected-tests maingavePASS npm test --prefix site (31.82s)andPASS cargo test (894.84s)(full suite). It ran on the first commit; after the review fixes,cargo test --bin thirdshift logs::recording::testspassed (32) andcargo clippy --all-targetswas clean.Manual check:
npm run docs:check --prefix sitepassed.Visual evidence
None. The site changes only reword prose inside existing paragraphs, with no markup, CSS or layout change.
Merge Danger
Door: two-way
The change adds a field value to new Command records. Old records are not rewritten, and reverting stops writing it.
Blast Radius: metrics
Only
show --json, Console details andthirdshift metricsgain values and rows for these kinds. Ticket run, Spec run and Base fix metrics are unchanged.Review
The reviewers read every changed file except the generated
site/docs/index.html. Both reviewers confirmed excluding it: its sourcedocs/guide.mdwas reviewed andnpm run docs:check --prefix sitepassed.Addressed:
observed_sessions.Unaddressed findings
Standards
finishmatches kind strings. Declined.CommandRecord.kindis a serializedStringby design (src/logs/command_record.rs:87). This change extends the existingmatches!(self.kind.as_str(), …)at that site, and the same string kinds are read across the codebase, for examplesrc/logs/status/inbox.rs:115. A typed kind would be a separate refactor. The new tests cover the three kinds' labels, so a rename that drops metrics would fail them.Spec
None.
Security
None.
Built with claude 2.1.314 · opus · default effort
Security review outcome
No unaddressed introduced findings.