Skip to content

[quality] e2e union: useFocusTrap.js line 51 drift survives #1163's crossing fold — the non-crossing drift shape still needs folding #1202

Closed

Description

@mrbobbytables

Finding

The fourth drift case recorded on #1079 (comment, the previousFocus operand of useFocusTrap's effect cleanup) is not folded by the crossing rule PR #1163 landed, while the issue's three primary regions are.

Verified on a full local run at main 29fd4d8 (build:e2e:coverage, 340 passed, seal, report):

src/components/hooks/useFocusTrap.js | 100.00 | 90.48 |  | 35 51
src files                            | 100.00 | 95.22 | 2099/2099 lines | 438/460 regions

Why it matters

#1079 closes with PR #1201 (floor ratcheted to 95 from the corrected 95.22%). This region is inside the new floor's headroom, but it is a measured-executed region counted uncovered — the exact defect class #1079 documented — and it is the first case on a path with no data-variant of its own, so the fix cannot be reasoned away as variant-build divergence.

Recommendation

  1. Dump the region pairs for useFocusTrap.js line 51 from the union in tests/tools/e2e-coverage-report.mjs (same instrumentation [quality] e2e region union still counts three demonstrably-executed single-line arms uncovered; their covered twin differs in START column, which #1066's proposed key would miss #1079 describes) to classify the drift shape — likely containment with differing start column, the case [quality] e2e region union still counts three demonstrably-executed single-line arms uncovered; their covered twin differs in START column, which #1066's proposed key would miss #1079's original recommendation ('fold a zero-count region into a covered one when the covered region's span contains it') was written for.
  2. Extend the fold accordingly, keeping the guard fix(coverage): fold e2e regions whose spans cross across artifacts #1163's test pins: a single-line zero region that is enclosed by a covered region over fully-covered lines must still survive when it is a genuinely independent arm (the MemberDirectory/index.js 31/34/40/43 shape, now covered by test: cover the member directory's four undriven toolbar controls #1060, remains the canonical counterexample to naive enclosure folding).
  3. Regression test in tests/e2e-coverage-report.test.mjs with two artifacts of one chunk reproducing the non-crossing drift pair.
  4. Re-derive --check-source-regions afterwards (expected: 439/460 if only line 51 folds; line 35 is a phantom guard arm with no browser path — both lightboxes always render a close button — and should not be expected to fold).

Provenance

Local pipeline at 29fd4d8, node v26, pinned Playwright chromium: npm run build:e2e:coverage; e2e-coverage-run.mjs init; npm run test:e2e:coverage (340 passed); seal; e2e-coverage-report.mjs --input <dir> --build build. Gate --check-source 100 --check-source-regions 95 --require-source-files exits 0 on the same run.

Refs #1079, #1163, #1201, #1178.

Activity

  1. added
    qualityApproved by a Hive merger/owner for auto-merge on green CI
    testingApproved by a Hive merger/owner for auto-merge on green CI
    on Oct 8, 2026
  2. added
    🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed
    on Oct 8, 2026
  3. added a commit that references this issue on Oct 8, 2026
    593b9fe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    qualityApproved by a Hive merger/owner for auto-merge on green CItestingApproved by a Hive merger/owner for auto-merge on green CI🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions