feat(015): enrichment coverage matrix — matrix, permutations, cross-browser, CI gate (PR B, Phase 3–7)#56
Merged
Conversation
Contributor
|
🧹 PR preview for #56 has been removed. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 98 |
| Duplication | 0 |
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.
…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.
7cc61da to
1d6a443
Compare
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.
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.
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 (identifierS-001…, numeric, categorical, annotated-numeric, text). Added to the welcome index + demo nav.tests/e2e/enrichment-matrix.spec.ts:discoverDemoPages()→ one test per demo, a step per offered+controllable enrichment;observedState ∈ {active, inapplicable},aria-disabledon disabled lozenges, relative round-trip teardown.ColumnOracle— the identifier column is never summed (footercount, notsum) and offers no slider axis; numeric columns are summable; categorical/text exclude numeric-only enrichments; annotated-numeric keeps sort+filter after annotating.cleanNumericCellletter guard) makes the strong-oracle test fail ("identifier column was summed"); reverting restores green.Phase 4 — Permutation sweep (US2)
tests/e2e/enrichment-permutations.spec.tson 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)
capability-filtering.spec.ts.matrix:and aprecedence: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).srcfix needed — the only cross-engine issues were test-harness actionability flakes;setEnrichmentnow drives the checkbox via a detach-safe page-evaluate, and the 120-pair sweep istest.slow()(WebKit ~37 s).scripts/e2e-runtime-gate.mjs(FR-016): fails overE2E_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
Verification
src/runtime changehttps://claude.ai/code/session_01VHYpxXjpMZfw4zSU4rPLYB
Generated by Claude Code