[quality] e2e region attribution leaves MirrorSyncStatus.js at exactly the --check-source-file-regions 66 floor
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #1617 by @mrbobbytables — merged
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- build-system, testing-qa, tooling
Research direction
Start with tests/tools/e2e-coverage-report.mjs, especially isContradictedRegion() and isDriftedRegion(), using src/components/shared/MirrorSyncStatus.js as the reproducer. Run the end-to-end coverage reporter against the cited artifact and compare it with the unit coverage test tests/case-studies-sync-status.test.mjs. Decide between improving cross-build attribution or recording a residual and pinning the gate in tests/coverage-gate-thresholds.test.mjs; the issue requires a soundness decision before implementation.
Written by the indexing model from the issue text.
Description
Finding
src/components/shared/MirrorSyncStatus.js reports 66.67% regions in the
"End-to-end coverage" job, and ci.yml gates that job with
--check-source-file-regions 66. The file clears its own floor by 0.67 of a
point. One more uncovered region in it drops the file to 60.00% and fails the
gate.
The three regions the report calls uncovered are demonstrably executed in a
browser. This is region attribution, not missing tests.
Evidence
Unit — npm run test:unit:coverage at main 9e0a746:
src files | 100.00 | 100.00 | 9887/9887 lines | 2873/2873 regions
tests/case-studies-sync-status.test.mjs covers both return null arms
directly.
End-to-end — ci.yml "End-to-end coverage" job, merge_group run
39075166062
(headSha 9e0a746, artifact e2e-coverage, report.txt):
src/components/shared/MirrorSyncStatus.js | 100.00 | 66.67 | | 20 22 22
src files | 100.00 | 97.54 | 2157/2157 lines | 675/692 regions
Reproduced at the same revision by re-running the reporter over that
artifact:
collectE2ECoverage('<artifact>/39075166062-1')
// { file: 'src/components/shared/MirrorSyncStatus.js', regions: 9,
// coveredRegions: 6, regionPercent: 66.67, uncoveredRegions: [20, 22, 22] }
The arms run. tests/e2e/fixtures/data-variant/radar-reports.json clears
generatedAt, so line 20's !generatedAt arm runs on the variant build;
tests/e2e/fixtures/data-variant/case-studies.json sets it to a string that
does not parse, so line 22's !syncDate arm runs there too (landed in #1487).
tests/e2e/radar-reports-variant.spec.js and
tests/e2e/case-studies-variant.spec.js pin both.
Why the union does not fold them
Dumping the union for this file from the run above:
regions : 14:15-20:32 c=1 | 21:2-22:29 c=4 | 14:15-20:20 c=4 |
20:20-20:32 c=0 | 22:24-22:29 c=0 | 21:2-22:2 c=1 |
22:7-22:29 c=0 | 14:15-14:24 c=4 | 32:0-32:1 c=4
witness A: .../assets/js/b8512184.4c66b110.js (real build)
zeros = 20:20-20:32, 22:24-22:29 lines 14..32 all covered
witness B: .../e2e-coverage-variant/assets/js/b8512184.8f377042.js
zeros = 21:2-22:29 line 22 = 0, rest covered
Witness B is the build that executes the arms, and it records no zero over
line 20 and a different span over line 22. isContradictedRegion()
(tests/tools/e2e-coverage-report.mjs) only accepts a witness from a script
that itself produced the zero, so B can never retire A's zeros.
isDriftedRegion() does not reach them either: B's covering region
14:15-20:32 encloses 20:20-20:32 rather than crossing it, and enclosure
is deliberately excluded as the ordinary shape of a branch inside an executed
block.
This is the same class as the closed #1066 and #1079, on a file that did not
exist when those were filed and that now sits on the gate floor.
Recommendation
A decision is needed before any code is written, because the cross-build
inference that would fix it is not obviously sound:
- Extend the fold so a zero from script A can be retired by a witness from
script B of the same chunk. The line-granularzeroTouchesLines()test is
not sufficient on its own — #1079 showed drift that moves a skipped arm to
entirely different lines (15:19-15:80against15:70-38:15), so "B has no
zero on line 20" does not prove B executed line 20's arm. Any such rule
needs an additional constraint that makes it sound (for example, requiring
A's and B's source maps to agree on the original span of the enclosing
function), or the gate fails open. - Record the residual the way
tests/tools/coverage-report.mjsalready
records its harness residuals, and pin the resulting ceiling in
tests/coverage-gate-thresholds.test.mjsso--check-source-file-regions
can never be set above what the attribution can deliver.
Please pick one. Lowering the floor without recording why is the outcome worth
avoiding: it hides the next real regression in this file.
Priority
- Impact: high — the gate has 0.67 points of headroom on this file
- Effort: medium
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: 9e0a746
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 3
- Avg merge
- 7h 21m
- Merged PRs (30d)
- 575
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cncf/endusers
-
agent/ci-maintainer ci good first issue help wanted stage/010-actionable
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
cncf/endusers#1890 · 3 comments ·
Maintainers usually reply within 1 day
-
[guide] Public Sector User Group page names wrong Slack channelPossibly taken @hivecommons-hive claimed this 1 day ago. Openagent/guide documentation hive/claimed-by-guide stage/040-covered-by-pr
Difficulty 1/5 Under an hour Newbie friendliness 88/100
cncf/endusers#1874 · 1 comment ·
Maintainers usually reply within 1 day
-
[guide] Governance page renders an empty bullet — stray `- ` line in the reproduced ug-governance docPossibly taken @hivecommons-hive claimed this today. Openagent/guide documentation hive/claimed-by-guide stage/040-covered-by-pr
Difficulty 1/5 Under an hour Newbie friendliness 25/100
cncf/endusers#1892 · 1 comment ·
Maintainers usually reply within 1 day
-
[quality] ProjectsBorn tiles show the external-link arrow but navigate in the same tabPossibly taken @hivecommons-hive claimed this today. Openagent/quality hive/claimed-by-scanner stage/040-covered-by-pr testing
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
cncf/endusers#1891 · 1 comment ·
Maintainers usually reply within 1 day
-
[scanner] Homepage lists five End User Group verticals; two are archived upstream and three have no page in the site catalogPossibly taken @hivecommons-hive claimed this 1 day ago. Openagent/scanner documentation stage/040-covered-by-pr
Difficulty 1/5 Under an hour Newbie friendliness 30/100
Maintainers usually reply within 1 day
Similar issues
-
Link Checker ReportOpenautomated issue report
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
microsoft/playwright#43640 ·
Maintainers usually reply within 1 day
-
✏️ Editing - Tags
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
openfoodfacts/openfoodfacts-server#15127 ·
Maintainers usually reply within 1 day
-
enhancement good first issue hacktoberfest help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Andbal23/dynamic-music-pill#195 ·
Maintainers usually reply within 1 day