Repository navigation
Record Session-trace signals and Harness-version trends - #1158
Merged
Merged
Conversation
This was referenced Oct 23, 2026
Closed
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
Closes #1037.
Keep tokens by observed Model (input, output, cache read/write), reported USD cost, tool errors, permission denials, killed work and repeated tool calls separate. Unknown measurements stay missing. Late amendments and companion task/agent events count the same work once. Update the guide and site pages.
Evidence
cargo test --test metrics converted_session_traces_supply_signals_without_rewriting_past_metricsfailed with missing Session signals; the completion regression also failed before wiring the recorder.After: focused metrics and completion tests passed; six real Harness fixture traces and permission/repetition regressions passed.
python3 /tmp/thirdshift-1037-spec-repro.py target/debug/thirdshift killedreturned 0 instead of 2;python3 /tmp/thirdshift-1037-spec-repro.py target/debug/thirdshift session-modelreported a null Model.After: both identical commands passed, with equivalent Rust regressions retained in
tests/metrics.rs. The original standalone repro is retained with the local review artifacts.cargo test --bin thirdshift session::recording::tests::claude_stopped_background_agent_is_one_killed_work_item -- --exactreturned 2 instead of 1.After: the identical command passed; the regression stays in
src/session/recording/tests.rs.cargo checkandcargo clippy --all-targets -- -D warningspassed.cargo test --test metrics non_regular_session_traces_are_missing_without_blocking -- --exactpassed in 0.17s and the originalcargo test --test progress_lines a_log_failure_still_recovers_and_reports_warnings_and_usage -- --exactpassed in 1.58s. Non-regular trace paths now stay missing.cargo testsuite, formatting, Clippy and generator checks.cargo testtook 12m25s, including 38.85s compilation; this excludes queue time. Site and Console browser CI also passed.NEXTEST_TEST_THREADS=4 scripts/affected-tests 0d186a3a67077358703eaf95f716671d21f6b7d3passed all 44 site tests. Its duplicate Rust run was stopped after exact-head CI passed, asdocs/testing.mdpermits: 643 passed before cancellation, four running tests interrupted, no assertion failures. The local attempt took 994.98s total, including site checks and 22.61s Rust compilation. No repeat full-suite run was started after successful CI.Test seams
thirdshift metrics --json: sums by session kind, historical missing data, retention and Harness-version trends.Review coverage
Independent Standards and Spec reviews used issue-981 fixed at
0d186a3a67077358703eaf95f716671d21f6b7d3, with one coverage follow-up each. Standards: 3 maintainability findings addressed. Spec: 3 P2 findings reproduced and fixed. Both axes read 20 of the final 21 changed files, including generated HTML; no generated-output exclusions. Unread by both independent reviewers:tests/console/metrics.rs, added after their single allowed follow-up to update the expected JSON for the two additive nullable Session-signal fields. The parent read it and rancargo test --test console metrics::peek_shows_retained_run_metrics_and_marks_missing_signals -- --exactsuccessfully. The stopped-agent and FIFO corrections touched already-read files and were tested by the parent after the follow-up.Reports and each axis's final files-read list are saved locally in
.thirdshift-review-uxq9pe/standards.mdand.thirdshift-review-uxq9pe/spec.md.Unaddressed findings
Standards
None.
Spec
None.
Security
None. Guidance-mode review of
git diff 0d186a3a67077358703eaf95f716671d21f6b7d3...HEAD(Session-trace signals reader, Run/trend aggregation, cache-inclusive input refactor, tests and prose docs) found no introduced Security finding: inputs are the operator's own local trace files, outputs are the operator's own CLI JSON and retained metrics, parse errors degrade to missing signals, and no trust boundary is crossed. No pre-existing findings are recorded in this review.Security review outcome
No unaddressed introduced findings.
Merge Danger
Door: two-way
Additive metrics fields; historical reconstruction does not rewrite records. Revert the code to roll back.
Blast Radius: metrics
Run completion records and local metric views, including Session usage interpretation. No Harness pricing table or external metrics requests.
Built with codex · gpt-6.1-sol · xhigh