TRT-3006: Sippy: restore historical test-details links for closed regressions #4221
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.52) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #4221"
general
weight: 0.35
sosiouxme
Summary
TRT-3006: once a Component Readiness regression closed and rolled off the current report, its
test_detailslink disappeared. This PR restores it as a historical link, anchored to the regression's last failure, for every closed regression and every closed view association.Whether a link is historical is decided per regression and per view. The triage's resolved flag and Jira status are not used, so a triage like 811 with mixed open and closed rows shows each row correctly.
| Regression | View association |
test_details:<view>link ||---|---|---|
| Open | Active | Current report (unchanged) |
| Open | Inactive | Historical, labeled "Closed in this view" |
| Closed (incl. force closed) | Any | Historical, labeled "Closed regression" |
Backend
InjectRegressionHATEOASLinks(pkg/api/componentreadiness/triage.go) now covers every recorded view association. Historical links are built from the persisted regression and the view config. No historical report is run, and nothing is synthesized intoregressed_tests.HistoricalSampleWindow): whole UTC days. It starts at 00:00 seven calendar days before the last-failure date, and the end is the following UTC midnight (exclusive), so the failure itself is included. Regression 49971 (last_failure 2026-09-29T01:33:26Z) gets2026-09-22T00:00:00Zto2026-09-30T00:00:00Z.utils.GetViewReleaseOptionsAt, anchored at the last failure. Sonow-60d..now-30dfollows the anchor, whilega-30d..gaand absolute dates are unchanged (5.0-main: 4.22,2026-05-10T00:00:00Zto2026-06-09T23:59:59Z). ThetestBasisReleaseoverride still works.regressionId=<id>.historical_link_unavailable: when a closed view association gets no link, the regression record maps that view to a readable reason: no last failure, spot-check, view no longer configured, or a generic basis failure. The UI shows this reason and doesn't work it out again. Expected gaps arehistoricalLinkGapErrors that wraperrNoHistoricalLink, so they are logged at debug level.GET /regressions/{id}now preloadsTriages.Bug, matchingListOpenRegressions, so a historical report's triage table shows Jira details.GetTriageandListTriagestake aRegressionLinkConfig(whichInjectRegressionHATEOASLinksnow also takes) and add these links to embedded regressions. The server wires this up inregressionLinkConfig. If releases can't be loaded, it logs one warning and returns nil, which skips the links. The list endpoint skips the release lookup whenfieldsomitsregressions. Internal potential-match callers passnil. Triages returned by POST/PUT are not enriched.util.ParseCRReleaseTimeAt): an explicit RFC 3339 time on today's UTC date used to be rounded to the cache boundary even if it was already in the past. That moved a historical exclusive end of "today 00:00" (and could pull it back to yesterday 16:00). Now only boundaries at or afternoware rounded, so "now"-like requests still get stable cache keys. A round-trip test (TestHistoricalURLSurvivesRequestParsing) fails without this fix.Frontend
TriagedRegressionTestList(triage details and the shared CR modal table): view columns are built from current reports plus views where a listed regression closed, so triage 792's5.0-maincolumn appears even whenregressed_testsis empty.- Closed rows show a clock/history icon with a green check badge. The tooltip and accessible name read, e.g., "Closed regression. View historical test details for September 22–29, 2026."
- Rows closed in only one view say "Closed in this view".
- Rows with no available link show a disabled icon with the reason from
historical_link_unavailable(or "no readable sample window" when the UI can't parse the link).- History controls use the grid's managed tab index, so arrow-key navigation reaches the link. Status columns are keyed by view name, so a sort stays on its view when a historical column is added.
- Open rows keep their severity icons. The recorded closure wins over report data: a cached report built before a closure can still list the regression, but its cell shows the historical link. Filtering, sorting (new comparator), selection and the Test Analysis link still work.
TestDetailsReport+ newHistoricalRegressionNotice: whenregressionIdis in the URL, the page fetches/api/component_readiness/regressions/<id>alongside the report, without going through the report cache.- It shows the closure context only after checking the record matches the test ID, release, variants and view.
- The notice lists the regression ID, closure date, last failure, and sample/basis windows. The statistical assessment is left as computed.
- The "more than 48 hours ago / View latest" banner is still shown alongside the notice.
- Mismatched, missing or failed lookups show warnings. A report without a view (for example after Generate Report clears it) cannot check per-view closure, so an open regression gets neutral wording instead of being called open. If the window has no data, the closure details still appear with an explicit "no test results" message.
- Regression-tracking middleware is unchanged, so viewing history never alters tracking state.
HistoricalRegressionUtils.jsx: the closure, link, window and notice helpers shared by the table, redirect, and notice. A single closure rule (historicalClosure), one URL date parser (parseUrlDate), and exportedClosureScope/LookupStatus/CellKindconstants. General CR helpers (viewControls/viewControlDefaults, variant parsing,compareViewNames,TEST_DETAILS_LINK_PREFIX) live inCompReadyUtils.jsx.RegressionRedirect:/regressions/:idprefers a view where the regression is still open (main view first) and opens a historical report only when every association has closed.CompReadyVars: explicit URL parameters now override view defaults (viewControlDefaults), matching the API. An exclusive midnight end shows as the last included day (Sept 29 23:59:59). Generate Report keeps the original URL value unless the user edits that date.regressionIdsurvives Generate Report and is cleared when switching views.Seed data
sippy seed-datanow adds two closed regressions to the existing network triage (OCPBUGS-40002, triage 1), which also has an active regression, so historical links can be reached from the triage list:[sig-arch] Check build pods use all cpu cores(gcp/amd64): tracked in4.22-mainand4.22-gcp-only, so it has two historical links.[sig-cli] oc adm should handle upgrades gracefully(aws/amd64): tracked in4.22-main.They are recorded in the seed sample release (
clock.sample.Name, currently 4.22) with the basis release of their first view (currently 4.21), so the seed follows the views to a new release instead of failing on a hardcoded release. Each test gets extra failing sample release runs in a five day window that ends two days before the current sample window. Its last failure falls in that window, so the historical report shows it as an extreme regression against the basis. Both tests pass in the current report, so regression tracking does not reopen them. The definitions arehistoricalRegressionSeedsincmd/sippy/seed_data.go.Screenshots
These screenshots were taken before the seed included historical regressions. They used the seed DB with regression 4 temporarily closed and regression 6's
4.22-gcp-onlyassociation deactivated, and the seed rows were restored afterwards.Mixed triage: open rows keep severity icons, the closed regression and the closed-in-view association get historical links:
!Triage table with historical links for closed regressions
Following the historical link. The controls show the historical sample and basis, and the rolling basis is resolved from the last failure (Sep 15 to Oct 15, while the view currently resolves to Sep 18 to Oct 18). Triages come from the regression record:
!Closed regression notice on historical test details
Tests
cmd/sippy/seed_data_test.gocovers building the historical regressions (release from the seed clock, basis from the view, variants limited to the view's DB grouping, closed view associations, failure counts), invalid seed definitions, guards that the seeded tests are regressed in their failure window but not in the current report, and that the historical report window covers every seeded failing run without reaching the current sample window.triage_history_test.gocovers the sample window, GA/rolling/absolute basis, basis override, cross-compare, force closed, missing last failure, unresolvable basis, multiple views, closure in one view, removed views, a spot-check regression open elsewhere,historical_link_unavailablereasons, gap errors wrappingerrNoHistoricalLink, triage enrichment, and the parse round-trip (today / yesterday / long ago). Also newParseCRReleaseTimeAtcases, updatedTestInjectRegressionHATEOASLinks, andTestFieldSelectionIncludes.TestQuerySampleJobRunTestStatus/historical_regression_window_includes_the_last_failurechecks exact success, flake, and failure counts per run: a pass at the window's first instant, the failure at the last-failure time, and nothing at the following midnight.Test_TriageAPI/embedded_regressions_carry_current_and_historical_test_details_linkscovers GET and list triage plus the regression endpoint, with a closed regression, a closed regression withoutlast_failure(including itshistorical_link_unavailablereason), and an open regression. It also checks that the regression endpoint's triages include their bug.HistoricalRegressionUtils.test.jsx: closure scope, column names, cell state and unavailable reasons (API-supplied, missing, unreadable link), sort rank, redirect link choice, URL date parsing, date-range formatting, end-time control conversion, and regression identity validation.CompReadyUtils.test.jsxcovers URL-over-view precedence (including cross-compare), variant parsing, and view ordering.historical-regressions.feature(12 scenarios) covers the closed-only triage, the mixed triage, status column sorting (ascending and descending), the test details notice (including triage Jira columns and the stale banner shown alongside it), Generate Report keeping dates andregressionId, the closed-in-this-view notice with and without a closure time, no-view wording, mismatched record (stale banner still shown), missing record, failed lookup, and the no-data window.Validation
| Check | Result |
|---|---|
|
make lint(MCPrun_lint) | Pass (golangci-lint 0 issues, ESLint, npm audit) ||
make test(MCPrun_tests) | Pass: BDD 138 passed, Go 16650 tests in./pkg/...(32 skipped), Vitest 270 passed, MCP pytest 289 passed ||
go test ./cmd/sippy/| Pass, including the seed data tests (make testcovers only./pkg/...) ||
make e2e(MCPrun_e2e, BigQuery off) | Pass: 155 tests, 2 skipped. Log read: thecomponentreadiness/triagepackage passed, including the historical link subtest ||
go test ./test/integration/| Not run on the latest commit: no container runtime socket was available, so testcontainers could not start PostgreSQL. The package compiles and passesgo vet. An earlier revision ofTestQuerySampleJobRunTestStatuspassed || Manual, local seed data | On the previous commit (before the seed release was derived from the clock; the seeded data is unchanged), seeded a scratch database and ran
sippy serveagainst it. Triage 1 returned historicaltest_detailslinks for all three closed view associations. Each link reported an extreme regression from its seeded failure-window sample (45/60 passing vs 97/100 basis, and 30/60 vs 160/200). Neither test is regressed in the current4.22-mainor4.22-gcp-onlyreport. The triage table and test details screenshots above are from an earlier revision |Not verified / limitations
prowjob_start >= @From AND < @Toas PostgreSQL. No BigQuery run was done.< endfilters.Docs
pkg/api/README.md: new Component Readiness Regressions section (includinghistorical_link_unavailable), notes on triage response links, and test_details date/regressionIdparameters.docs/features/component-readiness-triage.md(added on main by #4230): new "Reviewing closed regressions" section describing the user-facing behavior, notice titles (including an open regression's historical report) and warnings, redirect preference, limitations, and the seeded historical regressions for local testing.HistoricalSampleWindowandgenerateHistoricalTestDetailsURLcomments inpkg/api/componentreadiness/triage.go.🤖 Generated with Claude Code
---
Generated with Claude Code
<!-- coderabbit-review -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Closed regressions can link to historical test reports, with notices showing closure details and the report’s sample and comparison periods.
Triage tables show historical or unavailable report indicators for closed regressions, with sorting by status.
Historical report links preserve regression context and use the selected view’s settings. Report time controls handle date boundaries consistently.
Reports explain when regression details do not match or historical data is unavailable.
Added sample data for exploring historical regressions.
Documentation
* Added guidance on reviewing closed regressions and understanding historical reports, unavailable links, and closure notices.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->