make cover fails in a fresh worktree: web/dist is empty until make web runs #95

Closed
opened 2026-08-23 05:37:56 +00:00 by a73x · 2 comments
a73x commented 2026-08-23 05:37:56 +00:00 (Migrated from git.a73x.sh)

[claude 2026-08-23] Found while working the followups to 5e59e2b (wire spec/status rename); recorded in RETRO.md at that commit but not tracked anywhere.

internal/server/web carries a coverage floor of 95 (scripts/coverage.sh:82). In a fresh worktree internal/server/web/dist holds only the "UI not built" placeholder, so the embed-serving paths the tests exercise are not the ones the floor was measured against, and make cover fails on a tree with nothing wrong in it. The fix is make web first — which the gate does not say, and make ci does not do.

Two directions, either is fine:

  • have cover (or ci) depend on the web build, so the floor is always measured against the real dist; or
  • have the web package's coverage gate detect a placeholder dist and skip its floor loudly, the way proto-check skips when protoc is missing.

Second-order: a gate that fails for a reason it does not name costs more than the gate is worth. Whatever the fix, the failure should say "web/dist is a placeholder — run make web".


Migrated from git-collab issue 104a84d904bfa6e7687129f5eb94cf53a2fee66f.

Original author: a73x dev@a73x.sh.

Linked commit: 7dd41af7672cfe2a382fe22b62c9abd5898ff437

[claude 2026-08-23] Found while working the followups to 5e59e2b (wire spec/status rename); recorded in RETRO.md at that commit but not tracked anywhere. `internal/server/web` carries a coverage floor of 95 (scripts/coverage.sh:82). In a fresh worktree `internal/server/web/dist` holds only the "UI not built" placeholder, so the embed-serving paths the tests exercise are not the ones the floor was measured against, and `make cover` fails on a tree with nothing wrong in it. The fix is `make web` first — which the gate does not say, and `make ci` does not do. Two directions, either is fine: - have `cover` (or `ci`) depend on the web build, so the floor is always measured against the real dist; or - have the web package's coverage gate detect a placeholder dist and skip its floor loudly, the way `proto-check` skips when protoc is missing. Second-order: a gate that fails for a reason it does not name costs more than the gate is worth. Whatever the fix, the failure should say "web/dist is a placeholder — run make web". --- Migrated from git-collab issue `104a84d904bfa6e7687129f5eb94cf53a2fee66f`. Original author: a73x <dev@a73x.sh>. Linked commit: `7dd41af7672cfe2a382fe22b62c9abd5898ff437`
a73x commented 2026-08-23 05:47:46 +00:00 (Migrated from git.a73x.sh)

[claude 2026-08-23] Fixed on branch wire-vocab-followups (7dd41af), pending the deploy boot-gate before merge.

cover now depends on $(WEB_DIST)/index.html, with a rule that shells out to make web. The prerequisite is the staged file rather than the web target so a dist already present is not rebuilt — web runs npm ci, and cover is not the gate that owns the SPA build.

Proven both ways: in a fresh worktree internal/server/web read 89.2% against floor 95 before, and make cover now builds the SPA itself and reports 97.3% with the whole gate green; in a tree with dist already staged, make -n cover prints only ./scripts/coverage.sh.

Deliberately NOT handled: a stale dist is not rebuilt. This prerequisite exists to make the floor measurable, not to keep the SPA current — web-test and web-check own that.

[claude 2026-08-23] Fixed on branch `wire-vocab-followups` (7dd41af), pending the deploy boot-gate before merge. `cover` now depends on `$(WEB_DIST)/index.html`, with a rule that shells out to `make web`. The prerequisite is the staged file rather than the `web` target so a dist already present is not rebuilt — `web` runs `npm ci`, and `cover` is not the gate that owns the SPA build. Proven both ways: in a fresh worktree `internal/server/web` read 89.2% against floor 95 before, and `make cover` now builds the SPA itself and reports 97.3% with the whole gate green; in a tree with dist already staged, `make -n cover` prints only `./scripts/coverage.sh`. Deliberately NOT handled: a stale dist is not rebuilt. This prerequisite exists to make the floor measurable, not to keep the SPA current — `web-test` and `web-check` own that.
a73x commented 2026-08-23 07:39:06 +00:00 (Migrated from git.a73x.sh)

[claude 2026-08-23] Merged to main (7dd41af, fast-forward). Boot gate PASS on the branch: cold_start=10s, reboot/reap/gate-SSH/exposed-port/remote-MCP/UDP all ok, integration coverage 54.2%.

[claude 2026-08-23] Merged to main (7dd41af, fast-forward). Boot gate PASS on the branch: cold_start=10s, reboot/reap/gate-SSH/exposed-port/remote-MCP/UDP all ok, integration coverage 54.2%.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
a73x/eitri#95
No description provided.