Every top-level e2e/tests suite fails at collection: retiring e2e/package.json (cec004cc) left @celilo/e2e unresolvable from that directory #1471

Closed
opened 2026-09-30 06:34:44 +00:00 by forgejo-admin · 1 comment

cec004cc ("fix(e2e): retire the stale standalone e2e install root", on main) deleted e2e/package.json on the stated reasoning that "the top-level tests run under cele2e and resolve @celilo/e2e through the root workspace node_modules — the same resolution every module e2e dir uses". That reasoning is false, and every suite in e2e/tests/ has been unrunnable since.

bun only symlinks a workspace package into the root node_modules when something depends on it. The repo root declares exactly one (@celilo/fj), so node_modules/@celilo/ contains fj and nothing else — no e2e. modules/*/e2e resolve it because each is itself a workspace whose package.json declares "@celilo/e2e": "workspace:*"; top-level e2e/tests/ has no manifest and therefore no such link. cele2e spawns bun test <abs file> with cwd: PKG_DIR (packages/e2e/src/runner.ts:341-345), and bun resolves a bare specifier from the importing file's directory, walking e2e/tests → e2e → repo root, finding nothing.

The failure is instant and total — 0s, at collection, before any container starts:

✗ container-service-deploy       0s
  └─ error: Cannot find module '@celilo/e2e' from
     '<worktree>/e2e/tests/container-service-deploy.test.ts'

Measured 2026-09-29 in a clean worktree off origin/main (00aa1ef3), management image freshly baked from that tree, cele2e doctor all green. container-service-deploy.test.ts is a tracked, long-standing suite and is the positive control here: it fails identically to a brand-new suite, so this is environmental, not a defect in any one test.

Worth noting what this costs beyond the suites themselves. container-service-deploy is the only exerciser of the container_service path — IPAM allocation, VMID assignment, the infrastructure-variable resolver, and every module's Terraform template. CLAUDE.md mandates that all new suites be written against the Proxmox simulator, i.e. into exactly this directory. So the repo's stated direction for new e2e coverage currently lands in a directory where nothing can run, and cele2e run --all skips these suites without ever reporting that it did — the absence of a signal reading as a good signal, which is the failure mode CLAUDE.md's "a check that cannot reach the thing it is checking" section is about.

Scope

  • e2e/tests/*.test.ts — every file importing @celilo/e2e or @celilo/e2e/types.
  • cec004cc — the deletion and its reasoning; 48d8995d on a side branch carries the same message.
  • packages/e2e/src/runner.ts:341-345 — the spawn (cwd: PKG_DIR).
  • packages/e2e/src/runner.ts:736-741 — the runner already auto-installs e2e/'s deps if e2e/package.json exists, so it anticipates the file the deletion removed.
  • Root package.json workspaces — apps/*, packages/*, modules/*/e2e, modules/*/site, modules/*/server, modules/*/worker. e2e is absent, which is the original bug cec004cc was fixing; adding it is one candidate fix.
  • .gitignore:96 (!**/*.json) — relevant if the fix reinstates e2e/package.json.

Note the trap that made the original manifest unsatisfiable: e2e/package.json declared "@celilo/e2e": "workspace:*" while e2e/ was not in the root workspaces, so bun install in e2e/ failed with workspace:* failed to resolve. A fix that restores the manifest must also add e2e to workspaces, or it reintroduces that.

Acceptance

  • E2E_TEST_DIR="$PWD/e2e" bash packages/e2e/bin/cele2e run container-service-deploy gets past collection in a clean worktree (it may then fail on its own merits; it must not fail on module resolution).
  • bun install at the repo root leaves @celilo/e2e resolvable from e2e/tests/, with no bun install inside e2e/ required.
  • Whatever the fix, bun install in a clean checkout succeeds — no workspace:* failed to resolve.
  • Recurrence gate: a check that fails when a file in e2e/tests/ cannot resolve its imports. Assert reach, not configuration shape — per CLAUDE.md's reach-probe method, run the real resolution against the real directory rather than asserting that workspaces contains a string. A bun build --target=bun --no-bundle (or equivalent resolve-only pass) over every e2e/tests/*.test.ts in CI would fail today and pass after the fix. Prove it fails by deleting the fix and watching it go red.
  • cele2e run --all reports these suites as run, or names them as skipped. Silently omitting them is the condition that hid this.
  • #1309 — cele2e cannot run suites outside the monorepo (publishModule shells to a source-tree CLI path). Different cause, adjacent surface.
  • #1352, #1313, #1306 — other e2e harness defects where a harness-level failure reads as a product failure.
  • #1423, #1390 — cele2e doctor certifying an image it has not really verified. Same family: doctor was fully green while every top-level suite was unrunnable, so doctor does not cover this either.
  • Found while executing Slice 3 Task 5 of projects/2026-09-28-exploratory-fleet-testing/ (bead ce-hd83), which is blocked on it: that task's boundary check is a new suite in e2e/tests/.
`cec004cc` ("fix(e2e): retire the stale standalone e2e install root", on `main`) deleted `e2e/package.json` on the stated reasoning that "the top-level tests run under cele2e and resolve `@celilo/e2e` through the root workspace node_modules — the same resolution every module e2e dir uses". That reasoning is false, and every suite in `e2e/tests/` has been unrunnable since. `bun` only symlinks a workspace package into the root `node_modules` when something **depends** on it. The repo root declares exactly one (`@celilo/fj`), so `node_modules/@celilo/` contains `fj` and nothing else — no `e2e`. `modules/*/e2e` resolve it because each is itself a workspace whose `package.json` declares `"@celilo/e2e": "workspace:*"`; top-level `e2e/tests/` has no manifest and therefore no such link. `cele2e` spawns `bun test <abs file>` with `cwd: PKG_DIR` (`packages/e2e/src/runner.ts:341-345`), and bun resolves a bare specifier from the **importing file's** directory, walking `e2e/tests` → `e2e` → repo root, finding nothing. The failure is instant and total — 0s, at collection, before any container starts: ``` ✗ container-service-deploy 0s └─ error: Cannot find module '@celilo/e2e' from '<worktree>/e2e/tests/container-service-deploy.test.ts' ``` Measured 2026-09-29 in a clean worktree off `origin/main` (`00aa1ef3`), management image freshly baked from that tree, `cele2e doctor` all green. `container-service-deploy.test.ts` is a tracked, long-standing suite and is the positive control here: it fails identically to a brand-new suite, so this is environmental, not a defect in any one test. Worth noting what this costs beyond the suites themselves. `container-service-deploy` is the **only** exerciser of the `container_service` path — IPAM allocation, VMID assignment, the infrastructure-variable resolver, and every module's Terraform template. `CLAUDE.md` mandates that all new suites be written against the Proxmox simulator, i.e. into exactly this directory. So the repo's stated direction for new e2e coverage currently lands in a directory where nothing can run, and `cele2e run --all` skips these suites without ever reporting that it did — the absence of a signal reading as a good signal, which is the failure mode `CLAUDE.md`'s "a check that cannot reach the thing it is checking" section is about. ## Scope - `e2e/tests/*.test.ts` — every file importing `@celilo/e2e` or `@celilo/e2e/types`. - `cec004cc` — the deletion and its reasoning; `48d8995d` on a side branch carries the same message. - `packages/e2e/src/runner.ts:341-345` — the spawn (`cwd: PKG_DIR`). - `packages/e2e/src/runner.ts:736-741` — the runner already auto-installs `e2e/`'s deps *if* `e2e/package.json` exists, so it anticipates the file the deletion removed. - Root `package.json` `workspaces` — `apps/*`, `packages/*`, `modules/*/e2e`, `modules/*/site`, `modules/*/server`, `modules/*/worker`. `e2e` is absent, which is the original bug `cec004cc` was fixing; adding it is one candidate fix. - `.gitignore:96` (`!**/*.json`) — relevant if the fix reinstates `e2e/package.json`. Note the trap that made the original manifest unsatisfiable: `e2e/package.json` declared `"@celilo/e2e": "workspace:*"` while `e2e/` was not in the root `workspaces`, so `bun install` in `e2e/` failed with `workspace:* failed to resolve`. A fix that restores the manifest must also add `e2e` to `workspaces`, or it reintroduces that. ## Acceptance - [ ] `E2E_TEST_DIR="$PWD/e2e" bash packages/e2e/bin/cele2e run container-service-deploy` gets past collection in a clean worktree (it may then fail on its own merits; it must not fail on module resolution). - [ ] `bun install` at the repo root leaves `@celilo/e2e` resolvable from `e2e/tests/`, with no `bun install` inside `e2e/` required. - [ ] Whatever the fix, `bun install` in a clean checkout succeeds — no `workspace:* failed to resolve`. - [ ] Recurrence gate: a check that **fails** when a file in `e2e/tests/` cannot resolve its imports. Assert reach, not configuration shape — per `CLAUDE.md`'s reach-probe method, run the real resolution against the real directory rather than asserting that `workspaces` contains a string. A `bun build --target=bun --no-bundle` (or equivalent resolve-only pass) over every `e2e/tests/*.test.ts` in CI would fail today and pass after the fix. Prove it fails by deleting the fix and watching it go red. - [ ] `cele2e run --all` reports these suites as run, or names them as skipped. Silently omitting them is the condition that hid this. ## Related - `#1309` — cele2e cannot run suites outside the monorepo (`publishModule` shells to a source-tree CLI path). Different cause, adjacent surface. - `#1352`, `#1313`, `#1306` — other e2e harness defects where a harness-level failure reads as a product failure. - `#1423`, `#1390` — `cele2e doctor` certifying an image it has not really verified. Same family: doctor was fully green while every top-level suite was unrunnable, so doctor does not cover this either. - Found while executing Slice 3 Task 5 of `projects/2026-09-28-exploratory-fleet-testing/` (bead `ce-hd83`), which is blocked on it: that task's boundary check is a new suite in `e2e/tests/`.
Author
Owner

Closing as fixed on main by 532e8716 (fix(e2e): make @celilo/e2e resolvable from top-level e2e/tests (ce-v9kp)).

Read at f9df2078, 2026-10-01: Root package.json:31 declares @celilo/e2e workspace:*; scripts/e2e-tests-resolve.test.ts asserts it and resolves every bare import in e2e/tests. Commit message cites celilo#1471. Not checked: whether cele2e run --all reports/names these suites.

This was a read of the code, not a run. Reopen if any of it is wrong. Closed by spec-desk on an issue-log pass.

Closing as fixed on `main` by `532e8716` (fix(e2e): make @celilo/e2e resolvable from top-level e2e/tests (ce-v9kp)). Read at `f9df2078`, 2026-10-01: Root package.json:31 declares @celilo/e2e workspace:*; scripts/e2e-tests-resolve.test.ts asserts it and resolves every bare import in e2e/tests. Commit message cites celilo#1471. Not checked: whether cele2e run --all reports/names these suites. This was a read of the code, not a run. Reopen if any of it is wrong. Closed by spec-desk on an issue-log pass.
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
celilo/celilo#1471
No description provided.