Skip to content

dasweb-verify: emscripten's run-dependency watchdog is not a page error - #4097

Merged
borisbat merged 1 commit into
masterfrom
bbatkin/playground-dep-wait
Sep 22, 2026
Merged

borisbat merged 1 commit into
masterfrom
bbatkin/playground-dep-wait

Conversation

@borisbat

Copy link
Copy Markdown
Collaborator

Why. The nightly playground verifier failed wasm rows whose programs ran. When an artifact download takes more than 10 s, Emscripten's run-dependency watchdog prints still waiting on run dependencies: to console.error, and the verifier counted every console error as a page error. This turned the nightly red on 9/17 (5 rows) and 9/20 (1 row); the failure screenshots show the programs rendering.

What changes.

  • isConsolePageError in protocol.mjs decides which console messages are page errors; it drops the watchdog's three lines, as well as failed requests and program stderr echoes, which were already dropped.
  • Both pages collect page errors through one runner.mjs helper, collectPageErrors, instead of two copies of the same listeners.
  • A new per-PR lane, dasweb-verify-browser.yml, runs the browser leg's node:test suite; until now only the nightly ran it.
  • browser/REVIEW.md: the probe.mjs rule is now a ban, and the placement lines name console-message classification and what runner.test.mjs may not assert.

Observable behavior.

  • A slow artifact load: FAIL page error: still waiting on run dependencies: -> PASS, or FAIL rafs 0/N if the load never finishes.
  • A sample added to data.json without an expectations.json row: red nightly -> red PR.

Where to look. protocol.mjs isConsolePageError, and runner.mjs collectPageErrors.

Validation, claims, ledger

Validation

  • The new lane's command, npm ci && node --test in utils/internal/dasweb-verify/browser, on Linux x86_64 (WSL Ubuntu 24.04, node v22.23.2, a git archive of the head commit): 35 pass, 0 fail. The same on Windows 11: 35 pass, 0 fail. Negative controls: removing the watchdog filter, the type filter, the failed-request anchor, or the --console echo each fails its named test.
  • Live run of the changed runner against daslang.io: node runner.mjs --mode wasm -f "River Run" - PASS (rafs 803, draws 27720).
  • Full preflight not run: the diff is JS, YAML and docs, and reaches no daslang CI lane. The make-pr cheap gates are green (sync, stamp-reach, review-md; jit-smoke skipped, no JIT surface).

Claims - stated, not tested

  • The one line in Playground.open that calls collectPageErrors has no unit test: Playground is not exported. The Artifacts.open call is tested, and so is the helper itself. If the Playground call were dropped, a playground page error would stop failing interpreter rows; the nightly is the only check that would notice.

Not done

  • The self-review of utils/internal/dasweb-verify/REVIEW.md, utils/REVIEW.md and .github/workflows/REVIEW.md found rule defects whose fixes delete, split, move, or re-scope rules. They wait for the owner's ruling, and this PR does not touch those three files.

…or - a slow artifact download printed it as console.error and failed rows whose programs ran

Both pages collect their page errors through one runner.mjs helper, collectPageErrors, which
asks one pure predicate, isConsolePageError: console errors only, minus failed requests,
program stderr echoes, and the watchdog's three lines. The browser leg's node:test suite now
also runs per PR (dasweb-verify-browser.yml), path-filtered to the leg and the playground
manifest, so a sample added without an expectations row fails its PR instead of the nightly.
browser/REVIEW.md: the probe.mjs rule is a ban, and the placement lines name console-message
classification and what runner.test.mjs may not assert.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 22, 2026 15:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

It changes the failure-detection/error-suppression logic that gates the nightly production verifier, where an over-broad filter could silently turn the nightly green, warranting human confirmation of the watchdog matchers' scope.

Review effort: Balanced
Findings: None

What changed in this PR

This PR fixes a false-positive in the nightly playground verifier (dasweb-verify): Emscripten's run-dependency watchdog (still waiting on run dependencies:, printed to console.error when an artifact load exceeds ~10 s) was being counted as a page error, turning the nightly red for programs that actually rendered. It centralizes console-message classification into protocol.mjs, deduplicates the two page-listener setups into one collectPageErrors helper, and adds a per-PR CI lane so the browser leg's node:test suite runs before nightly, not only in it.

Changes:

  • Add isRunDependencyWait, isFailedRequest, and isConsolePageError to protocol.mjs, dropping the watchdog lines (plus already-dropped failed requests and program-stderr echoes) from the page-error channel.
  • Replace the two duplicated pageerror/console listener blocks in runner.mjs with a single exported collectPageErrors helper, and cover it plus the new classifiers with tests.
  • Add the dasweb-verify-browser.yml per-PR lane and document it in preflight.md; update browser/REVIEW.md placement/ban wording.
File Description
utils/​internal/​dasweb-verify/​browser/​protocol.mjs Adds pure console-message classifiers, including the emscripten watchdog filter that fixes the false FAIL.
utils/​internal/​dasweb-verify/​browser/​runner.mjs Extracts the two duplicated page-error listener blocks into one collectPageErrors helper.
utils/​internal/​dasweb-verify/​browser/​protocol.test.mjs Tests the new watchdog / failed-request / console-error classification.
utils/​internal/​dasweb-verify/​browser/​runner.test.mjs Tests collectPageErrors wiring and the --console echo via a stubbed page.
.github/​workflows/​dasweb-verify-browser.yml New per-PR lane running node --test for the browser leg.
skills/​internal/​preflight.md Documents the new lane, its triggers, and local mirror command.
utils/​internal/​dasweb-verify/​browser/​REVIEW.md Turns the probe.mjs rule into a ban and updates placement lines for console-message classification.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@borisbat
borisbat merged commit ee55fe8 into master Sep 22, 2026
31 checks passed
@borisbat
borisbat deleted the bbatkin/playground-dep-wait branch September 22, 2026 16:24
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.

2 participants