Repository navigation
test: cover RadarReports' empty-corpus arms in the e2e variant build - #1098
Merged
Merged
Conversation
src/components/RadarReports/index.js branches on two document-level fields of data/radar-reports.json: SyncStatus returns null when generatedAt is absent (line 6), and the list falls back to [] when radarReports is absent (line 24). Neither arm is reachable against the checked-in corpus, which always carries a generatedAt and six reports -- but both are ordinary shapes, since the file is regenerated daily from cncf.io by the refresh-radar-reports workflow and a run that fetches nothing produces exactly them. Adds tests/e2e/fixtures/data-variants/radar-reports.json clearing both fields, and a spec pairing /resources/radar-reports with its variant route so the pair is evidence the arms switched rather than that one page happens to look a certain way. The browser takes both arms -- the variant chunk keeps the branches and the assertions only pass if it did -- but the two regions do not yet leave the e2e report's uncovered list: the region union keys on exact original coordinates and the two builds map back to different ones (#1066, #1079). The spec preamble records the observed keys. Refs #1097 Signed-off-by: quality <quality@hive.kubestellar.io>
Contributor
Author
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will keep the |
This was referenced Oct 5, 2026
This was referenced Oct 6, 2026
Closed
mrbobbytables
pushed a commit
to mrbobbytables/endusers
that referenced
this pull request
Oct 8, 2026
…ncf#1133) src/components/CaseStudies/index.js branches on two document-level fields of data/case-studies.json that the shipped corpus never produces: SyncStatus's `if (!data.generatedAt) return null` at line 46, and the `|| []` fallback at line 64 that supplies the list the page sorts, filters, counts and maps. Both are document-level on the one file the one /resources/case-studies page reads, so clearing them in the ordinary coverage build would swap which arm is covered rather than add a case -- it would trade the provenance line and all 215 rows, including the two undated studies the additive overlay in tests/e2e/fixtures/data/case-studies.json exists to render. They go in the variant build instead, as RadarReports' equivalent arms did in cncf#1098. Closes cncf#1132 Signed-off-by: quality <quality@hive.kubestellar.io> Co-authored-by: quality <quality@hive.kubestellar.io> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Test Improvement
src/components/RadarReports/index.jsbranches on two document-level fields ofdata/radar-reports.json:if (!data.generatedAt) return null;, soSyncStatusrenders noprovenance line;
const radarReports = data.radarReports || [];, the fallback thatsupplies the list the page maps over.
Neither is reachable against the checked-in corpus, which always carries a
generatedAtand six reports. Both are ordinary shapes: the file isregenerated daily from cncf.io by
npm run collect:radar-reportsvia.github/workflows/refresh-radar-reports.yml, so a collector run that fetchesnothing produces exactly them.
Two new files, no edits to existing ones:
tests/e2e/fixtures/data-variants/radar-reports.json— clears both fields inthe variant build. Clearing them in the ordinary coverage build would trade
the provenance line and all six rendered reports for these arms rather than
add a case, which is the same reason
AwardsTimeline's provenance paragraphlives in the variant build.
tests/e2e/radar-reports-variant.spec.js— pairs/resources/radar-reportswith
/e2e-coverage-variant/resources/radar-reports, asserting theprovenance line and all six
<li>on the first and neither on the second.Asserting the real route too is what makes the pair evidence that the arms
switched, rather than that one page happens to look a certain way.
What this does not do
It does not move lines 6 and 24 out of the e2e report's uncovered list, and
the PR does not claim to. The browser demonstrably takes both arms — the
variant chunk keeps the branches (
function i(){if(!o.ro)return null;...}andlet e=o.Gb||[], compiled against{"ro":null,...,"Gb":null}) and theassertions only pass if it did — but
getRegionCoverageintests/tools/e2e-coverage-report.mjskeys a region on its exact originalcoordinates, and the two builds map back to different ones: the real build
records
6:25:6:37count 0 and24:40:24:46count 0, while the variantrecords
7:2:21:1count 0 and21:0:29:26count 1 and emits no key matchingeither zero region. That residue is #1066 / #1079; once the union folds the two
builds' coordinates, these arms fold with no change here. The spec preamble
records the observed keys so the next reader does not have to re-derive them.
Verification
Run locally at
8afaa67:npm run test— 1941 passed, 0 failed.npm run build:e2e:coveragethennpm run test:e2e:coveragewith aPlaywright chromium run — 300 passed, 0 failed, including both new cases.
npm run report:e2e:coverage -- --check-source 100 --check-source-regions 80 --require-source-files— exit 0;src files87.79% regions, well above theCI floor of 80, so
.github/workflows/ci.ymlneeds no change.Files claimed
tests/e2e/fixtures/data-variants/radar-reports.json(new) andtests/e2e/radar-reports-variant.spec.js(new). Disjoint from every openhold-gated PR: it does not touch
tests/e2e-data-fixtures.test.mjs(#1034,#1078),
tests/e2e/data-variants.spec.js(#1034),tests/tools/e2e-coverage-report.mjs(#1040, #1070),tests/e2e/fixtures/data-variants/metrics.json(#1093), or any memberdirectory, case studies, or
svg-active-contentfile. Thecaseslists intests/e2e-data-fixtures.test.mjsare hardcoded rather than exhaustive, so anew variant overlay needs no edit there — the same reason #1093's
metrics.jsonvariant needed none.
Related Issue
Refs #1097 — the first completion box (the overlay and the spec) is what this
lands; the second (lines 6 and 24 leaving the uncovered-region list) stays open
and is gated on the region-union work in #1066 / #1079, which lives in
tests/tools/e2e-coverage-report.mjsand is occupied by #1040 and #1070.Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88