Repository navigation
Console Metrics page: outcome stacks, daily/weekly windows, deltas and Other-account Commands (#2065) - #2078
Merged
Merged
Conversation
…ccount Commands (#2065) Turn /metrics into a server-rendered Console page (jump m) backed by metrics --json and /api/v1/metrics: daily or weekly buckets, 7d/30d/12w/all presets, preceding-window comparisons with n and observed/missing counts, per-kind Succeeded/Failed/Paused/Stopped stacks that leave out pass-through Pickup runs and skipped Passes, kind/harness/model/account filters, and readable Other-account Commands tagged by OS account.
… form keeps repeated filters (#2065) Signal rows now leave out pass-through Pickup runs and skipped Passes and count a crashed record as died, leaving missing_outcomes to live runs. The Metrics form shows one field per repeated filter value. The outcome kind list is shared with the page, Snapshot capture names its past-metrics flag, and docs/code-navigation.md points 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
/metricswas an unlinked<pre>dump of the weekly JSON. It is now a first-class Console page named Metrics (gthenm). The page,thirdshift metrics --jsonand/api/v1/metricsall read one shared document.How each Command is classified:
The bars are inline SVG
<rect>s coloured only with Theme tokens (--ready,--urgent,--look,--dim). Each segment carries its exact sub-outcomes in a hover<title>, and its counts are also in the table. There is no JavaScript and no motion, and each table scrolls inside its own region, so the page never overflows at 390px. Signal rows now leave out pass-through Pickup runs and skipped Passes, and count a crashed record asdiedrather than inmissing_outcomes.Evidence
Execution evidence
The two Spec review findings came with tests, which are kept:
Before (
bb4ab807):After (
945f5f09): both... ok.New coverage, all passing:
tests/metrics.rs:outcomes_stack_by_kind_without_pass_through_pickups_or_skipped_passesbounded_windows_compare_with_the_preceding_windowkind_harness_and_model_filters_narrow_outcomes_and_signalstests/console/metrics.rs:metrics_page_shows_outcome_stacks_and_tables_and_keeps_single_command_inspectiontests/console/other_accounts.rs:other_account_commands_count_in_metrics_tagged_by_accounttests/console/api.rs: API equals CLI forwindow7d/30d/12w/all,grain/from/through,repo,kind,harness,modelandaccount.logs::metrics::{scope,outcomes}.console/tests/metrics.test.cjs:gmscrollWidth <= innerWidthat 390pxscripts/affected-tests origin/issue-2036:npm test --prefix site: PASScargo build --locked: PASSnpm test --prefix console: PASScargo test: FAIL. On each full run, one or two different tests intests/console/idle.rsortests/process/findings.rsfailed. Each passes when re-run alone, and a different one fails on each full run. The same flakiness is on the base branch: three runs ofcargo test --test processonorigin/issue-2036each failed one or twofindings::tests (fixing_dispatches_each_reproduced_finding_and_keeps_unreproduced_findings_private,closing_rechecks_each_merged_base_and_leaves_a_failing_finding_for_the_day_shift,merged_fix_is_rechecked_after_a_later_fix_fails). After that full run, the affected suites passed when run on their own:cargo test --test console idle::,--test metrics,--test run_metrics,--test scoring,--test console -- metrics other_accounts api::and--bin thirdshift metrics.Visual evidence
/metrics, Focus light Theme, same fixture records.Desktop 1440×900:
Mobile 390×844:
The After captures were taken before the review fix commit. Since then the form shows one field per repeated filter value, which looks the same when no filter repeats.
Merge Danger
Door: two-way
This is a read-only view: it writes no records and adds no stored fields.
Blast Radius: API-consumers
Changes a
metrics --json//api/v1/metricsconsumer will see:--grain day, signal rows appear underdays.account.missing_outcomestooutcomes.died.--from/--throughreject a non-Monday by week, as before, and accept any date with--grain day.Review
Reports: Standards found 12, Spec found 2.
docs/code-navigation.md: changed by the fix commit after both reviews.site/docs/index.html: generated fromdocs/guide.md; both reviewers excluded it afternpm run docs:check --prefix siteexited 0.Unaddressed findings
None of these needs a Spec or Day shift decision, so no issue was filed.
Standards
All of these are baseline smells (judgement calls). None says behaviour is wrong.
peek.rs:297andinbox.rs:234).interruptedis Failed unless a Stop was asked (src/logs/metrics/outcomes.rsclassify), per Q2.4's human-Stop-onlyStopped.interruptedis never Failed.interruptedis always unsuccessful.outcomes::visitandtrends::collect).visitcarries the inherited Stop down to children;collectgroups by session.Filtersis the bundle the core uses.MetricsArgs(parse),Form(one field per value) and the OpenAPI loop each need the five names in their own shape.Class.name/css/countare total, exhaustive matches; the compiler flags any new variant in each.css()matching serde's names keeps the CSS hook independent of the JSON spelling.grain/presetare the serialized forms ofunit/MetricsWindow, so the JSON shows names rather than enum shapes.weeksbackward compatible.hostname()).logs::metrics).Tally::rate,Delta::rateandsegments()are pure functions of the counts.outcomes::tests).Tallyinternals to the Console.Spec
None.
Closes #2065
Built with claude 2.1.314 · opus · default effort
Security review outcome
No unaddressed introduced findings.