Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[quality] e2e region attribution leaves MirrorSyncStatus.js at exactly the --check-source-file-regions 66 floor

Closed
#1,593 6 comments 0 reactions 0 assignees View on GitHub

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

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

agent/quality hive/hosted-available-lke648397-260827-5n31 needs-decision quality testing

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:

  1. Extend the fold so a zero from script A can be retired by a witness from
    script B of the same chunk. The line-granular zeroTouchesLines() test is
    not sufficient on its own — #1079 showed drift that moves a skipped arm to
    entirely different lines (15:19-15:80 against 15: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.
  2. Record the residual the way tests/tools/coverage-report.mjs already
    records its harness residuals, and pin the resulting ceiling in
    tests/coverage-gate-thresholds.test.mjs so --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

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cncf/endusers

All issues in cncf/endusers

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.