Repository navigation
Fix Metrics panics on Security runs - #2315
Merged
Merged
Conversation
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
Security runs passed outcome classification but were missing from the separately indexed
COUNTEDlist, so reading them panicked every Metrics view.Closes #2311.
Evidence
Execution evidence
cargo test --test metrics security_and_release_outcomes_render_metrics -- --exact/metrics?window=allchanged from HTTP 500 to 200; both kind choices and outcome rows render, the API reports one failed outcome for each, and Playwright reports no browser errors or failed requests.cargo test --test console metrics::security_and_release_outcomes_render_local_and_fleet_metrics -- --exact: 1 passed. Covers local and Fleet HTML, the HTTP API, both kinds, and exclusion of an unknown kind from outcome rows.cargo test --test metrics: 49 passed, 2 ignored subprocess entry points.cargo fmt --checkandgit diff --check: passed./usr/bin/time -p scripts/affected-tests mainpassed the build (113.84s), then stopped on two Inbox visibility timeouts in the Console suite: 266 passed, 2 failed (320.58s; Fleet polling and phone Dismiss/Undo). Both exact cases passed on an isolated rerun:node --test --test-name-pattern='Fleet Inbox polls with page subscriptions, retains rows, and fits a phone|Inbox row Dismiss works in needs you with JavaScript on a phone' console/tests/fleet.test.cjs console/tests/inbox.test.cjsc3871531472ddc5ae59545079147fabd728f89fb, including full Rust coverage, Console and site checks. Reusing these successful same-head checks as documented indocs/testing.md./usr/bin/time -p cargo nextest run --test-threads 3: intentionally stopped after same-head CI passed. Before SIGINT, 2,278 tests passed with no assertion failures; 3 running tests were interrupted and 2,587 were not run locally (219 skipped by the profile). Local wall time was 3964.31s, including compilation (5m 21s). This local run was superseded by successful CI, not counted as a completed local suite.Seams under test:
thirdshift metricstext and JSON; Console/metricslocal and Fleet views;/api/v1/metrics, all against isolated Command records.Actual-host acceptance remains unverified:
ssh -o BatchMode=yes -o ConnectTimeout=5 lima-thirdshift 'thirdshift --version && thirdshift metrics'exited 255 withCould not resolve hostname lima-thirdshift: Temporary failure in name resolutionbefore running thirdshift.Visual evidence
Same faux Security and Release records,
/metrics?window=all, desktop 1440×900. No layout or responsive behavior changed.Before — Console Metrics, desktop 1440×900
After — Console Metrics, desktop 1440×900
Review coverage
Independent review against
refs/remotes/origin/main: Standards 0 actionable findings; Spec 1 acceptance follow-up. Both axes read all four changed files. Unread changed files: none. Generated-output exclusions: none.Unaddressed findings
thirdshift metricsworks on lima-thirdshift.” The SSH run above fails at DNS resolution, so someone with access must check the fixed binary against that machine's retained logs. Local regression, Console, and API checks pass. This operational follow-up remains accepted; no implementation finding was declined and no duplicate issue was filed.Security review outcome
No unaddressed introduced findings.
Merge Danger
Door: two-way
Read-only aggregation and filter choices; no stored records change.
Blast Radius: Metrics
Built with codex codex-cli 0.170.0 · gpt-6.1-sol · xhigh