Skip to content

tooling: the workbench boot check refuses a dead port; verify.sh checks tests/ - #19

Merged
itsdestin merged 2 commits into
masterfrom
chore/tooling-honesty
Sep 2, 2026
Merged

tooling: the workbench boot check refuses a dead port; verify.sh checks tests/#19
itsdestin merged 2 commits into
masterfrom
chore/tooling-honesty

Conversation

@itsdestin

Copy link
Copy Markdown
Owner

Companion to youcoded#384. Nothing here reaches users.

1. The workbench boot check was a false green

node scripts/workbench-boot-check.mjs 5999 — a port nothing was listening on — printed ok for all sixteen routes and exited 0:

ok    parent frame (toolbar)
ok    app · default
...
All 16 workbench routes mount cleanly.

Chrome renders its own ERR_CONNECTION_REFUSED page, which has no "failed to start" text, no #boot spinner, and throws no exception — so all three of the script's probes read clean. CLAUDE.md tells every session to run this after any mock-shim change, so a dead dev server read as a passing app.

Three assertions now stand between a route and ok, each proven to fire on its own:

Assertion Proof
Preflight HTTP request to the port, before Chrome is discovered or launched dead port → exit 2, nothing is serving the workbench on port N, naming run-workbench.sh
Page.navigate's errorText + the main document's HTTP status a server answering 500 → server answered HTTP 500 for the page
#root, which index.html ships inline a live server that is not the workbench → #root is not in the DOM — this page is not the workbench

No false red: against a real workbench, 16/16 routes, exit 0.

Guarded by scripts/workbench-boot-check.test.mjs — two cases, no Chrome needed (the preflight now runs before the browser launches) — and a new Workspace CI step. CLAUDE.md's route count corrected 12 → 16.

2. verify.sh

  • Runs tsc -p tsconfig.tests.json beside the src one and prints how many test files are still excluded (types in tests/ (tsc --noEmit, 57 file(s) still excluded)), so the debt is visible on every run. Its SCOPE header no longer claims the test tree is unchecked.
  • Warns loudly when desktop/node_modules is a symlink. youcoded#384 fixes the test-runner half (Vite denying the resolved path), but npm ci and Gradle's bundleWebUi still follow the link and empty the shared copy, and a green run must not imply the setup is fine.

3. Roadmap and reports, matched to what was measured

  • Closed: the boot-check entry, "the desktop test tree is neither type-checked nor linted", and the Denied ID …?inline entry. Two investigations archived.
  • Re-scoped rather than closed: the entry naming subagent-view, mcp-startup-wiring and project-watcher as the suites that flake under parallel load. None of the three failed in 27 full local runs (1 alone, 6 concurrent, 4 pinned to 4 cores, 2 × 8 concurrent). The four suites that did fail at 8-way concurrency were different files, and they are fixed in #384. A trigger nobody has reproduced is not a fixed bug, so the entry stays open with what was actually measured.
  • New entry for the 57 test files still excluded from the typecheck.
  • Fixed-sleeps investigation re-measured: 108 → 102, and the "mcp-startup-wiring blows even the 30 s budget at eight concurrent suites" claim did not reproduce in any of the 27 runs.

Items 6 and 7 of the overnight list needed no change and are recorded in the handoff instead: the audit-staleness hook fix landed on master as 5598f69 (the shared checkout was 98 commits behind, which is why it looked dead — proven firing by running the hook), and node scripts/audit-anchors.mjs is green at 394/394 with all four "already done" roadmap entries already closed.

Verification

node scripts/roadmap-check.mjs --quiet      # exit 0, structure clean, 100 claims / 0 broken
node scripts/audit-anchors.mjs --no-diff    # anchors 394/394, MAP paths 345/345, MECHANICAL PASS: OK
node --test scripts/workbench-boot-check.test.mjs .claude/hooks/context-inject.test.mjs   # 14 pass, 0 fail
bash scripts/verify.sh <worktree> --full    # all six checks PASS

🤖 Generated with Claude Code

https://claude.ai/code/session_01T9SRtMoZJNF4sJrodQa1N1

itsdestin and others added 2 commits September 2, 2026 06:48
…ks tests/

Three tooling repairs, all measured before and after.

1. `scripts/workbench-boot-check.mjs` reported "All 16 workbench routes mount
   cleanly" and exited 0 with NOTHING serving the port — reproduced against a
   deliberately dead port. Chrome renders its own ERR_CONNECTION_REFUSED page,
   which has no "failed to start" text, no #boot spinner and throws no
   exception, so all three of the script's probes read clean. CLAUDE.md tells
   every session to trust this check, so a dead dev server read as a passing
   app. Three assertions now stand between a route and `ok`, each proven to
   fire on its own:
     * a preflight HTTP request, before Chrome is discovered or launched
       (dead port -> exit 2, naming run-workbench.sh)
     * Page.navigate's errorText and the main document's HTTP status
       (a 500 -> "server answered HTTP 500 for the page")
     * #root, which index.html ships inline (a live server that is not the
       workbench -> "#root is not in the DOM")
   Verified green against a real workbench: 16/16, exit 0. Guarded by
   scripts/workbench-boot-check.test.mjs, which needs no Chrome, and by a new
   Workspace CI step. CLAUDE.md's route count corrected 12 -> 16.

2. `scripts/verify.sh` now runs `tsc -p tsconfig.tests.json` beside the src
   one, printing how many test files are still excluded, and its SCOPE header
   no longer says the test tree is unchecked. It also warns loudly when
   desktop/node_modules is a SYMLINK: the test-runner half of that is fixed in
   youcoded#384, but npm ci and Gradle still follow the link and empty the
   shared copy, and a green run must not imply the setup is fine.

3. Roadmap and reports brought in line with what was measured overnight. Two
   investigations archived; the fixed-sleeps one re-measured. The three suites
   filed as flaking under parallel load (subagent-view, mcp-startup-wiring,
   project-watcher) did NOT fail in any of 27 full local runs — that entry is
   re-scoped rather than closed, since a trigger nobody has reproduced is not
   the same as a fixed bug.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T9SRtMoZJNF4sJrodQa1N1
…y fixed, what is left

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T9SRtMoZJNF4sJrodQa1N1
@itsdestin
itsdestin merged commit ba0566c into master Sep 2, 2026
1 check passed
@itsdestin
itsdestin deleted the chore/tooling-honesty branch September 2, 2026 13:52
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.

1 participant