Repository navigation
Implement REQ-VISUALIZATION-005: M2 Milestone Preview with tick/phase/reconciliation visibility - #244
Conversation
…/reconciliation visibility Add M2Preview JSON artifact showing canonical 0-15 phase trace, tick counter (100+ ticks), and zero-flow reconciliation health for the baseline-multistate-v1 no-op scenario. - src/diagnostics/m2Preview.ts: Generates typed M2Preview interface with phase trace, tick execution, and reconciliation health - src/diagnostics/m2Preview.test.ts: 13 comprehensive tests validating M2Preview schema, 101-tick execution, phase 0-15 proof, deterministic generation, and docs/index.html wiring - docs/m2-preview.json: Deterministic diagnostic artifact (seed 42, 101 ticks, all reconciliations pass) - docs/index.html: Added M2 milestone preview panel (no mutable WorldState exposure) - src/diagnostics/index.ts: Export m2Preview module Acceptance criteria met: - Phase trace proves exactly 0-15 (no phase 16): ✓ - 101 no-op ticks executed: ✓ - All 101 ticks pass zero-flow reconciliation within tolerance 1e-9: ✓ - Deterministic generation from baseline scenario with seed 42: ✓ - Smoke test: artifact serializable, no WorldState mutation: ✓ - TypeScript: 287 tests passed, typecheck clean, build succeeded: ✓ - C#/.NET: 45 tests passed, build clean (REQ-MIGRATION-003 maintained): ✓ Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
REQUEST_CHANGES — reviewed at head revision DefectIncomplete handoff — undeclared changed files (REQUIRED gate: policy-guard/scope-guard) The pull request modifies two files that are not listed in the "Changed artifacts" section:
Per AGENTS.md section "Handoff":
These files are required to record REQ-VISUALIZATION-005 implementation evidence and must be listed in the handoff. The runbook section 2 requires: "the pull request body does not contain the full handoff record" → REQUEST_CHANGES. How to fixUpdate the "Changed artifacts" section of the pull request body to include these two entries: Then comment on this pull request or the linked Issue confirming the handoff correction and requesting another review with |
AUTHOR response to REQUEST_CHANGESHandoff corrected per ACCEPTOR feedback. Updated "Changed artifacts" section with requested descriptions:
All seven changed files are now explicitly listed with scope-guard-compliant descriptions. No code changes; PR body update only. Tested revision: Requesting another review at this head revision. |
There was a problem hiding this comment.
Verdict: ACCEPT
Verification Complete
Mergeability: Confirmed MERGEABLE at head revision eac9d7f
Checks: All required checks measured green:
- build-and-test: passed
- typescript: passed
- policy-guard: passed
- mergeability: passed
Independent Re-execution:
npm ci && npm run typecheck && npm test && npm run build: passed (287 tests, no errors)dotnet restore && dotnet build --configuration Release --no-restore && dotnet test --configuration Release --no-build: passed (45 tests, no errors)
Issue Verification (Issue #243):
- Linked Issue present with complete Goal, Evidence, Scope, Non-goals, Acceptance criteria, Verification
- Labels correct: priority:normal, type:feature, area:visualization
- Status label: status:needs-review (ready for acceptance)
Handoff Record: Complete with all 9 required sections
- Achieved outcome: ✓
- Tested revision: ✓
- Changed artifacts: ✓ (7 files)
- Acceptance criteria: ✓ (all 9 criteria checked)
- Checks: ✓ (all passing)
- Not checked: ✓ (GitHub Pages production deployment noted as out of scope)
- Assumptions and unknowns: ✓
- Highest-risk area: ✓
- Remaining gate: ✓ (none)
Scope Verification:
- Diff matches declared scope exactly (7 files, all named in handoff)
- No policy paths mixed with product paths (policy-guard confirmed)
- No credentials, tokens, or local paths (policy-guard confirmed)
Tests: 13 new tests in m2Preview.test.ts verify:
- M2Preview schema completeness
- Phase trace 0-15 proof (no phase 16)
- 101-tick execution determinism
- Zero-flow reconciliation health (101 passed, 0 failed)
- Deterministic generation invariance
- docs/index.html wiring without mutable imports
No tests deleted or weakened.
Acceptance Criteria Met:
- Baseline scenario (baseline-multistate-v1, seed 42) executes 101 no-op ticks deterministically ✓
- M2Preview JSON interface captures phase trace (0-15), tick counter, reconciliation health ✓
- Zero-flow reconciliation: all 101 ticks PASS within tolerance 1e-9 ✓
- Unmatched delta recording in place (none found in no-op scenario) ✓
- One-way read-only diagnostic output, deterministically reproducible ✓
- docs/index.html displays M2 preview without breaking M1 layout ✓
- TypeScript: npm ci, npm run typecheck, npm test, npm run build all pass ✓
- C#/.NET: dotnet build/test remain green (REQ-MIGRATION-003 maintained) ✓
- GitHub Pages static artifact generated and valid JSON ✓
Recommendation: MERGE
This pull request satisfies REQ-VISUALIZATION-005 completely. All verification gates are clear, acceptance criteria are met, and both runtimes remain green.
PR #354 merged HTML M1/M2 preview wiring but lacked rendering regression tests. PR #362 adds 12-test regression suite (pagesRender.test.ts) verifying fetch/DOM population path and catching removal of rendering infrastructure. Updated ledger row: PR #362 with comprehensive evidence linking all three PRs (#244 artifact, #354 HTML, #362 regression tests) and expanded EVIDENCE cell with full rendering test coverage and viewport validation details.
The PR field should reference PR #244 (which earned the requirement), not PR #362 (which adds regression tests). The merge commit 5777e08... belongs to PR #244's merge, not PR #362. Both PRs contribute to the requirement as documented in the EVIDENCE field, but the ledger row must correctly identify the earning PR and its merge commit. Address SLOPSTER QA finding: keep PR and merge commit referencing the same repository event (the merge of PR #244).
Updates the sole REQ-VISUALIZATION-005 row to name this PR alongside the prior PR #244/#368 evidence, per the ledger's "name every pull request that contributed" rule. STATUS stays IMPLEMENTED: this PR strengthens the proof of an already-satisfied acceptance criterion, it does not newly satisfy one. MERGE_COMMIT is left empty since this PR has not merged yet. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…Pages smoke test (#407) * REQ-VISUALIZATION-005: execute the real M1/M2 DOM render path in the Pages smoke test The focused M1/M2 Pages regression added by PR #368 only fetched the JSON artifacts and inspected the parsed objects; it never executed docs/index.html or observed the rendered DOM, so a broken DOM-population callback would still leave every assertion green. Load the real docs/index.html into jsdom with runScripts: "dangerously", bind window.fetch to the local static server already used by this test, and wait for the M1/M2 panels to leave their loading state before asserting on rendered DOM text. Add desktop (1280px) and narrow (360px) viewport smoke cases that instantiate window.innerWidth before render. Add a negative control per milestone that bypasses only the DOM-population write (via a targeted string mutation of the render script) while the JSON artifact and its URL string stay intact, and confirms the population step is what proves the regression — the same assertion the positive test relies on. Add jsdom + @types/jsdom as devDependencies; no other runtime or build change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * ledger: record PR #407 as the current REQ-VISUALIZATION-005 evidence Updates the sole REQ-VISUALIZATION-005 row to name this PR alongside the prior PR #244/#368 evidence, per the ledger's "name every pull request that contributed" rule. STATUS stays IMPLEMENTED: this PR strengthens the proof of an already-satisfied acceptance criterion, it does not newly satisfy one. MERGE_COMMIT is left empty since this PR has not merged yet. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Updates the existing REQ-VISUALIZATION-005 row in place rather than adding a second one: STATUS stays IMPLEMENTED per the researcher's 2026-09-11 triage on #423 (the repair hardens the smoke and exposed no normal-view failure), PR moves to this pull request, MERGE_COMMIT is cleared for backfill_merge_commits.py, and EVIDENCE now names every pull request that contributed to the requirement -- #244, #368, #407, #421 and #479 -- along with what this one proves and what it deliberately leaves out of scope. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…dability smoke (#479) * REQ-VISUALIZATION-005: observe ancestor opacity in the Pages readability smoke `isReadable()` combined Playwright's `isVisible()` with the target node's own computed `opacity`. CSS `opacity` applies to an element and all of its contents but is not inherited, so `#m1-preview { opacity: 0; }` composites the populated `#m1-preview-body` away while leaving its own computed opacity at "1" and its bounding box intact. The helper reported that fully invisible body as readable. Replace the single-node read with `effectiveOpacity()`, which multiplies the computed opacity along the ancestor chain, and add the focused negative control Issue #423 specifies: inject `#m1-preview { opacity: 0; }` after navigation, leaving the JSON artifact, fetch URL and render callback untouched, and assert that DOM population still succeeded, that `isVisible()` and the body's own computed opacity both still read as before, and that `isReadable()` now returns false while the untouched M2 panel stays readable. Verified by reverting the helper to its previous single-node form: the new control fails ("expected true to be false") and passes with the fix. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * ledger: record PR #479 against REQ-VISUALIZATION-005 Updates the existing REQ-VISUALIZATION-005 row in place rather than adding a second one: STATUS stays IMPLEMENTED per the researcher's 2026-09-11 triage on #423 (the repair hardens the smoke and exposed no normal-view failure), PR moves to this pull request, MERGE_COMMIT is cleared for backfill_merge_commits.py, and EVIDENCE now names every pull request that contributed to the requirement -- #244, #368, #407, #421 and #479 -- along with what this one proves and what it deliberately leaves out of scope. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Closes #243
Achieved outcome
M2 Milestone Preview diagnostic artifact generated deterministically from baseline-multistate-v1 scenario with seed 42, capturing canonical 0-15 phase trace (no phase 16), tick counter (101 ticks executed), and zero-flow reconciliation health (all ticks pass within tolerance 1e-9). Static JSON artifact embedded in GitHub Pages without exposing mutable WorldState.
Tested revision
96088479aca5b3b37cbde2fd8715635eda2f93acChanged artifacts
src/diagnostics/m2Preview.ts— M2Preview interface with scenario/worldTopology/phaseTrace/tickExecution/reconciliationHealth fields;generateM2Preview()executes 101 no-op ticks and aggregates diagnosticssrc/diagnostics/m2Preview.test.ts— 13 tests validating schema completeness, phase 0-15 proof (no phase 16), 101-tick execution, deterministic generation, reconciliation passes, and docs/index.html wiring without mutable importsdocs/m2-preview.json— Generated diagnostic artifact (baseline-multistate-v1, seed 42, 101 ticks, all reconciliations pass within 1e-9)docs/index.html— Added M2 milestone preview panel (chart-title, chart-note, m2-preview-body div) without mutable WorldState exposuresrc/diagnostics/index.ts— Exported M2Preview type and generateM2Preview functiondocs/spec/IMPLEMENTATION_STATUS.md— Updated from generated implementation_status.csv to include REQ-VISUALIZATION-005 with head revision SHAdocs/spec/implementation_status.csv— Added row recording REQ-VISUALIZATION-005 implementation (canonical TypeScript M2 preview, reconciliation diagnostics, zero-flow validation)Acceptance criteria
Checks
npm cinpm run typechecknpm testnpm run builddotnet restoredotnet build --configuration Release --no-restoredotnet test --configuration Release --no-buildNot checked
GitHub Pages production deployment is out of AUTHOR scope per AGENTS.md and the milestone-preview boundary rule. Static artifact generation and local smoke tests are complete; production Pages deployment verification awaits ACCEPTOR/operator QA.
Assumptions and unknowns
TOTAL_PHASES = 16constant and sequential loop inexecuteTick(); no phase 16 can exist by constructionreconciliationRelativeTolerancedefaults to 1e-9 per SimulationConfig; all 101 ticks pass within this tolerance by design (no-op scenario, no transactions)generateM2Preview()reads immutableWorldState, never writes;generateM2Preview()does not consume RNG beyond the ticks it executes for ledger recordsHighest-risk area for review
The
generateM2Preview()function executes ticks within the test suite usingnoOpPhaseHandler, accumulating ledger records into projections. Review should verify: (1) TickLedger immutability is respected throughout; (2) reconciliation validation correctly applies the tolerance; (3) no accidental WorldState mutations occur during projection; (4) phase trace captures exactly 0-15 without off-by-one errors or phase 16.Remaining gate
No mandatory work remains. REQ-VISUALIZATION-005 acceptance criteria fully satisfied. Implementation status CSV row requires PR merge commit SHA (to be recorded after ACCEPTOR review and merge). No blockers or follow-up decisions required.