Skip to content

feat(015): enrichment coverage matrix — matrix, permutations, cross-browser, CI gate (PR B, Phase 3–7)#56

Merged
IanMayo merged 5 commits into
mainfrom
claude/pending-tasks-NGcyT-matrix
May 31, 2026
Merged

feat(015): enrichment coverage matrix — matrix, permutations, cross-browser, CI gate (PR B, Phase 3–7)#56
IanMayo merged 5 commits into
mainfrom
claude/pending-tasks-NGcyT-matrix

Conversation

@IanMayo

@IanMayo IanMayo commented May 31, 2026

Copy link
Copy Markdown
Contributor

Summary

PR B of the two-PR split for the end-to-end enrichment coverage matrix (#50), stacked on PR A (#51 — the foundational migration). This is the behaviour layer: the per-demo matrix that catches the issue-#48 mis-typing class, the permutation sweep, cross-browser execution, a new e2e CI job, and the runtime gate.

Base is claude/pending-tasks-NGcyT (PR #51), not main — so this diff shows only PR B. Merge #51 first; this retargets to main automatically once #51 lands.

Closes #50.

What's in this PR (Phases 3–7, all 43 tasks complete)

Phase 3 — Per-demo matrix (US1, the #48 catch)

  • public/demo/matrix/index.html: curated fixture with one column of each authored kind (identifier S-001…, numeric, categorical, annotated-numeric, text). Added to the welcome index + demo nav.
  • tests/e2e/enrichment-matrix.spec.ts:
    • Weak layer (SC-001): discoverDemoPages() → one test per demo, a step per offered+controllable enrichment; observedState ∈ {active, inapplicable}, aria-disabled on disabled lozenges, relative round-trip teardown.
    • Strong layer (SC-002): authored ColumnOracle — the identifier column is never summed (footer count, not sum) and offers no slider axis; numeric columns are summable; categorical/text exclude numeric-only enrichments; annotated-numeric keeps sort+filter after annotating.
    • FR-009 gap guard (SC-005) + fixture↔oracle consistency guard (12A).
    • Verified (T028): injecting the feat(014): Large-table navigation & analysis (tier 1) — freeze-panes, statistics extension, summary-row, find-in-table #48 defect (disabling the cleanNumericCell letter guard) makes the strong-oracle test fail ("identifier column was summed"); reverting restores green.

Phase 4 — Permutation sweep (US2)

  • tests/e2e/enrichment-permutations.spec.ts on the opt-in playground: all 120 pairs over the 16 controllable enrichments compose without throwing and round-trip byte-identically; a curated rich combo (10A) asserts filter recomputes the summary aggregate over visible rows (2173→1748), sort preserves it, and find-in-table highlights survive an active filter.

Phase 5 — Self-extending coverage (US3)

  • Folded the demo→effective-set precedence checks into a discovery-driven block (covers all demos, not a hand-list); removed the duplicated cases from capability-filtering.spec.ts.
  • Verified (T032): a throwaway demo auto-generated both a matrix: and a precedence: test (40→42) with zero spec edits.

Phase 6 — Cross-browser + runtime gate (US4)

  • playwright.config.ts: firefox + webkit projects (cross-engine layer scoped to the matrix + permutation specs; the ~40 migrated specs stay chromium to bound runtime).
  • T034: no src fix needed — the only cross-engine issues were test-harness actionability flakes; setEnrichment now drives the checkbox via a detach-safe page-evaluate, and the 120-pair sweep is test.slow() (WebKit ~37 s).
  • scripts/e2e-runtime-gate.mjs (FR-016): fails over E2E_BUDGET_SECONDS. Verified both ways — passes at 163 s within the 360 s default; fails when budget=1 s.
  • .github/workflows/e2e-tests.yml: a new e2e CI job (the repo had none) installing all 3 engines, building, and running the suite behind the gate.

Phase 7 — Polish

  • Helper ASCII diagrams (discovery pipeline; two-tier oracle); markdownlint clean on the enforced rules.

Verification

Check Result
Matrix spec (chromium) 46 passed
Cross-engine (chromium + firefox + webkit) 144 passed
Full suite, all 3 engines, via the gate 252 passed, 162.9 s within 360 s budget
Full Vitest suite 683 passed
#48 regression catch (T028) defect injected ⇒ fails; reverted ⇒ passes
src/ runtime change none — byte-for-byte vs main, zero bundle delta

https://claude.ai/code/session_01VHYpxXjpMZfw4zSU4rPLYB


Generated by Claude Code

@github-actions

github-actions Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

🧹 PR preview for #56 has been removed.

github-actions Bot pushed a commit that referenced this pull request May 31, 2026
Base automatically changed from claude/pending-tasks-NGcyT to main May 31, 2026 11:45
@codacy-production

codacy-production Bot commented May 31, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 98 complexity · 0 duplication

Metric Results
Complexity 98
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

claude added 5 commits May 31, 2026 11:54
…3 / US1)

The MVP coverage layer that catches the issue #48 mis-typing class.

- public/demo/matrix/index.html: curated fixture with one column of each
  authored kind (identifier S-001…, numeric, categorical, annotated-numeric,
  text); offers the full registry set with the toggle panel shown. Added to the
  welcome index + demo nav.
- tests/e2e/enrichment-matrix.spec.ts:
  * Weak layer (SC-001): discoverDemoPages() → one test per demo, a step per
    offered+controllable enrichment; observedState ∈ {active,inapplicable},
    aria-disabled on disabled lozenges, relative round-trip teardown.
  * Strong layer (SC-002): authored ColumnOracle for the fixture — identifier
    column is never summed (count, not sum) and offers no slider axis; numeric
    columns are summable; categorical/text exclude numeric-only enrichments;
    annotated-numeric keeps sort+filter after annotating.
  * FR-009 gap guard (SC-005) + fixture↔oracle consistency guard (12A).
- Helpers: activateGridSight + panelEnrichmentIds + isEnrichmentChecked;
  setEnrichment tolerates spec-only ids with no panel control; readPageProfile
  treats empty enrichments[] as the full set; normalizeForCompare collapses the
  GS-toggle button's volatile hover style + empty class='' (never gs-* output).

Verified T028: injecting the #48 defect (disabling the cleanNumericCell letter
guard) makes the strong-oracle test fail ('identifier column was summed');
reverting restores green. 26/26 matrix tests pass on chromium; src/ unchanged.
tests/e2e/enrichment-permutations.spec.ts on the opt-in playground:
- Pairwise non-interference + joint teardown: all 120 unordered pairs over the
  16 controllable enrichments enabled together (relative to an all-off
  baseline), must not throw, and round-trip byte-identically when disabled.
- Curated rich combo (10A): summary-row × filter × sort × find-in-table —
  filtering recomputes the Amount aggregate over visible rows (2173 → 1748 for
  Amount>=200 via the live visible-rows pipeline); sorting preserves that
  aggregate (multiset unchanged); find-in-table highlights 'EU' survive the
  active filter without disturbing the summary.

Reuses the proven __gridSightVisibleRows.setFilter + .gs-summary-agg/.gs-find-box
patterns from navigation-and-analysis. 2/2 pass on chromium (~30s). T029a: the
playground data already exercises the rich combo (numeric + categorical + 8
rows), no fixture change needed.
… B, Phase 5 / US3)

- T030: fold the demo→effective-set precedence checks into a discovery-driven
  block in enrichment-matrix.spec.ts. For every discovered demo: nothing
  outside the offered ceiling is ever enabled (11A); a non-empty declared
  allow-list pins the enabled set exactly; a declared [] enables nothing at
  load (panel-driven playgrounds). readPageProfile now also returns the raw
   list so the check applies real resolution semantics, not a
  circular mirror.
- T031: remove the hand-maintained 5-demo subset list from
  capability-filtering.spec.ts (the discovery block covers ALL demos now —
  strictly more coverage). The unique US1 fixture lozenge-filtering tests stay.
  The welcome-page case is covered by welcome-per-table.spec.ts's per-table
  assertions (main's per-table model superseded the old page-level union).
- T032: verified self-extension — dropping a throwaway demo under public/demo/
  auto-generated both a matrix: and a precedence: test (40→42) with zero spec
  edits, both green (SC-004); removed cleanly.

46/46 matrix + 2/2 capability-filtering pass on chromium.
…Phase 6 / US4)

- T033: add firefox + webkit Playwright projects. The ~40 migrated specs stay
  chromium-only to bound wall-clock; cross-engine coverage (FR-015) comes
  through the matrix + permutation specs (testMatch-scoped), which exercise
  every shipped enrichment across the demos. 144 cross-engine tests green on
  all three; 252 green full-suite all-projects (~163s).
- T034: no src fix needed — the only cross-engine issues were test-harness
  actionability flakes (WebKit/Firefox stalled on setChecked/locator auto-wait
  when the panel rebuilt). Made setEnrichment drive the checkbox via a single
  page-level evaluate + bubbling change (detach-safe, faster); marked the
  120-pair sweep test.slow() (WebKit ~37s > 30s default).
- T035/T036: scripts/e2e-runtime-gate.mjs wraps the suite, fails over
  E2E_BUDGET_SECONDS. Verified both ways: passes at 163.6s within 360s default;
  fails (exit 1) when budget=1s after running all 252 tests. Budget basis
  recorded in spec.md (FR-016) + contracts/e2e-runner.md.
- T037a/T037: new .github/workflows/e2e-tests.yml (the repo had none) installs
  all 3 engines, builds, and runs the suite behind the gate (E2E_BUDGET_SECONDS
  =600 for CI). test:e2e:gate script added.

src/ unchanged — zero bundle delta.
- T041: inline ASCII diagrams — the discovery pipeline (demo-discovery.ts) and
  the two-tier weak/strong oracle (applicability.ts).
- T038: full all-projects suite green via the runtime gate (252 tests, 162.9s
  within the 360s budget); Vitest 683 green.
- T039: src/ is byte-for-byte unchanged vs main (zero bundle delta).
- T040: quickstart integration spine exercised — defect-injection fails SC-002
  and reverts; a throwaway demo auto-extends coverage (40→42) then removed;
  firefox + webkit green on the cross-engine layer.
- T042: spec docs clean on the Codacy-enforced markdownlint rules (MD004/MD032).

All 43 tasks complete.
@IanMayo IanMayo force-pushed the claude/pending-tasks-NGcyT-matrix branch from 7cc61da to 1d6a443 Compare May 31, 2026 11:58
@IanMayo IanMayo merged commit f3befc9 into main May 31, 2026
4 checks passed
@IanMayo IanMayo deleted the claude/pending-tasks-NGcyT-matrix branch May 31, 2026 12:04
github-actions Bot added a commit that referenced this pull request May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

e2e coverage gap: exercise every enrichment on every demo + per-permutation interaction tests

2 participants