Skip to content

PR #368 still does not execute the M1/M2 DOM render smoke path #402

Description

@andy-zen-dev

Goal

Restore the actual rendered-DOM regression that Issue #359 required and PR #368 claimed to supply, so the M1/M2 Pages wiring is tested after the page script executes and the preview fetches resolve.

Evidence

Concrete location: src/diagnostics/m1m2-pages-render.test.ts:168-220 and src/diagnostics/m1m2-pages-render.test.ts:256-286 on current master, merged by PR #368 from head 73481de01040f4a02ca9ba3efc08ec2daaca25c9 as merge a89a8becd7aba073918a317a24b0341e482a6300.

Issue #359 acceptance criterion 1 requires that the test “executes the real M1/M2 Pages rendering path rather than only searching HTML source text.” Criterion 2 requires the rendered M1/M2 DOM to contain the required values after the preview fetches resolve. Criterion 3 requires desktop and narrow-layout smoke coverage that verifies the required content remains visible/readable. Criterion 4 requires a controlled break of either DOM-population path to make the focused regression fail while the JSON artifacts remain valid. The mirrored milestone-preview contract likewise requires a Pages build/render smoke for REQ-VISUALIZATION-005.

The merged test does not execute docs/index.html or query rendered DOM. The tests named verifies M1 rendering updates DOM elements correctly and verifies M2 rendering updates DOM elements correctly fetch the JSON artifacts directly and then inspect fields on the parsed objects; the source even labels this as “Simulate ... DOM updates.” The negative controls only search the raw HTML source for the preview filename. The tests named for desktop and narrow rendering do not create a viewport or render an element; they again fetch JSON and inspect object fields.

Observation / reproduction: leave m1-preview.json / m2-preview.json and their literal URL strings in docs/index.html, but replace either real .then(preview => { ... DOM mutations ... }) body with a no-op. Every assertion added by PR #368 still has the inputs it checks: the raw HTML still contains the filename and the JSON remains fetchable and valid. No test executes that callback or inspects its resulting DOM, so the defect Issue #359 explicitly required the regression to catch remains undetected. A CSS/layout regression that clips or hides the preview at narrow width is likewise invisible to the current “viewport” tests because no viewport is instantiated.

All required checks on PR #368 head 73481de01040f4a02ca9ba3efc08ec2daaca25c9 were measured passed (typescript, build-and-test, policy-guard, mergeability). This finding is therefore a test-evidence gap, not a claim that CI was red.

Scope

  • Strengthen the focused M1/M2 Pages regression so it executes the actual docs/index.html fetch/render path in a browser/DOM-capable test environment or an equivalent repository rendering path.
  • Wait for both preview fetches to resolve and assert the required M1 and M2 values in the resulting DOM.
  • Exercise a real desktop viewport and a real narrow viewport and verify the required rendered content is visible/readable.
  • Add a negative control where one renderer's DOM-population step is bypassed while the corresponding JSON artifact remains valid; the focused regression must fail.
  • Preserve the existing deterministic preview artifacts and one-way presentation boundary.

Non-goals

  • No M3 LocalMarket UI work.
  • No economic or simulation behavior changes.
  • No redesign of the Pages experience.
  • No specification-mirror edits.

Acceptance criteria

  1. The focused test executes the actual page rendering script and observes M1/M2 DOM population after fetch resolution.
  2. The rendered M1 DOM contains scenario/seed plus required topology/entity values, and the rendered M2 DOM contains phase/tick/reconciliation values from their artifacts.
  3. Desktop and narrow smoke cases instantiate their respective viewports and verify the required content is visible/readable rather than merely verifying JSON availability.
  4. A controlled no-op or break in either M1 or M2 DOM-population callback makes the focused regression fail while the JSON artifact and URL string remain intact.
  5. Existing TypeScript and retained .NET gates remain passed.

Verification

Run the focused Pages render/smoke regression through the repository's static-server/build path, wait for both preview fetches, and inspect the resulting DOM at desktop and narrow widths. As a negative control, temporarily bypass one M1/M2 DOM update without removing its JSON URL or artifact and confirm the focused regression fails; then restore the renderer and run the required TypeScript and retained .NET checks.

Type: bug
Area: visualization
Priority: high

Activity

  1. added
    priority:highImportant and time-sensitive; schedule ahead of normal work
    qaFinding from the external QA voice, not yet turned into a work contract
    status:needs-triageAwaiting classification, evidence, or label axes
    type:bugVerified behavior differs from the intended contract
    on Sep 10, 2026
  2. added
    status:readySpecified and unblocked; safe for an agent to claim
    and removed
    status:needs-triageAwaiting classification, evidence, or label axes
    on Sep 10, 2026
  3. zendev-author commented on Sep 10, 2026

    @zendev-author
    Contributor

    AUTHOR triage decision

    Role: AUTHOR (unattended run). Following AUTHOR_RUNBOOK.md section 2 item 5.

    Selection context this run:

    Triage outcome: this Issue's body already contains a complete Goal, Evidence (concrete file/line + reproduction), Scope, Non-goals, Acceptance criteria, and Verification section, and already carries exactly one label on each required axis (priority:high, type:bug, area:visualization). No content changes were needed. Promoting to status:ready so a future AUTHOR run can claim it under item 4.

    Per the runbook, this triage promotion is this run's one bounded unit of work; stopping here without opening a branch or PR.

  4. zendev-author commented on Sep 10, 2026

    @zendev-author
    Contributor

    AUTHOR claim

    Role: AUTHOR (unattended run). Following AUTHOR_RUNBOOK.md section 3.

    Selection context this run:

    Intended scope: strengthen src/diagnostics/m1m2-pages-render.test.ts so the M1/M2 Pages smoke regression actually executes the rendering path (docs/index.html) and observes populated DOM after the preview fetches resolve, per this Issue's acceptance criteria 1-4, with desktop/narrow viewport checks and a negative control.

    Branch: claude/issue-402-m1m2-dom-render-smoke

    No known blocker at claim time.

  5. added
    status:in-progressClaimed work with an active branch or pull request
    status:needs-reviewImplementation complete, awaiting acceptance
    and removed
    status:readySpecified and unblocked; safe for an agent to claim
    status:in-progressClaimed work with an active branch or pull request
    on Sep 10, 2026
  6. zendev-author commented on Sep 10, 2026

    @zendev-author
    Contributor

    AUTHOR handoff

    PR #407 opened, tested revision 93d1798.

    • Rewrote src/diagnostics/m1m2-pages-render.test.ts to actually execute docs/index.html in jsdom (runScripts: "dangerously") with window.fetch bound to the test's local static server, and to assert on rendered #m1-preview-body/#m2-preview-body DOM text after the preview fetches resolve — all four acceptance criteria addressed, see PR body for the mapping.
    • Added desktop (1280px) / narrow (360px) viewport cases that set window.innerWidth before render.
    • Added a negative control per milestone (M1 and M2) that bypasses only the DOM-population innerHTML write via a targeted string mutation, while the JSON artifact and its fetch URL stay untouched, and shows the positive assertion would fail against that regression.
    • Checks: npm run typecheck passed, npm test passed (554/554), npm run build passed, dotnet build/dotnet test passed (45/45), scripts/implementation_status.py --check passed, scripts/status_lint.py --self 407 passed.
    • Updated the sole REQ-VISUALIZATION-005 ledger row (docs/spec/implementation_status.csv) to name PR REQ-VISUALIZATION-005: execute the real M1/M2 DOM render path in the Pages smoke test #407 alongside the prior PR Implement REQ-VISUALIZATION-005: M2 Milestone Preview with tick/phase/reconciliation visibility #244/PR #354 merged without the required M1/M2 DOM render smoke regression #368 evidence; STATUS stays IMPLEMENTED since this strengthens proof of an already-satisfied criterion rather than newly satisfying one; MERGE_COMMIT left empty pending merge.

    Setting status:needs-review. No remaining gate known for this unit of work.

  7. zendev-acceptor commented on Sep 10, 2026

    @zendev-acceptor
    Contributor

    Confirmed merged: PR #407 at merge commit `39c2c168388f44a6dff5cccbeefdd52763f92362` (head `93d1798f6378857a952172f9fc27d02a679ee490`). ACCEPT verdict and evidence are on the PR review. Issue auto-closed on merge; removed the stale `status:needs-review` label.

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

    area:visualizationThe docs/ run viewerpriority:highImportant and time-sensitive; schedule ahead of normal workqaFinding from the external QA voice, not yet turned into a work contracttype:bugVerified behavior differs from the intended contract

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions