Skip to content

Commit e94ce22

Browse files
chitcommitclaude
andcommitted
fix(ci): unbreak build — separate workerd test pool, correct phantom dep version
The `build` job has been red on every PR opened or updated since the DO coordinator merge (c979f6a, Aug 2). The cause was not in any of those PRs. 1. vitest config overlap. vitest.config.ts globs `tests/**/*.test.ts`, which also matched tests/workers/coordinator.test.ts — a workerd-pool test that imports `cloudflare:test`. That specifier only resolves under @cloudflare/vitest-pool-workers (vitest.workers.config.mts), so the node suite died at import with ERR_MODULE_NOT_FOUND before running an assertion. Excluded tests/workers/** from the node suite, preserving vitest's default node_modules/dist excludes. 2. hono-agents "^0.19.0" never existed. a60d0e1 applied the agents-SDK version to the wrong package; the registry tops out at 3.0.12 and the lockfile already pins 3.0.7. Fresh `npm i` failed outright. Aligned the manifest to the locked version — the resolved version is still 3.0.7, so this is a manifest-only correction with no runtime change. 3. The workers suite ran nowhere in CI. `npm run test:workers` was never invoked by any workflow, so the DO coordinator tests had never executed. Excluding them from `npm test` would have converted "loudly broken" into "silently unrun", so they are now wired into the build job. Booting them required @cloudflare/vitest-pool-workers 0.22: the pinned 0.20.1 bundles a workerd supporting compatibility dates only through 2026-08-06, one day behind the 2026-08-07 date a60d0e1 set. Dev-only; the lockfile change is confined to that chain (pool-workers, miniflare, wrangler, workerd). Verified locally, full build sequence: tsc --noEmit clean; npm test 68 passed; npm run test:workers 24 passed (previously 0 — the suite could not boot). Not addressed here: the production advisories (hono, js-yaml, fast-uri, ip-address, nanoid) that fail the Dependency Audit gate are pre-existing on main and are what PR #128 already fixes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SpK3ddoHzUqgW3keYafHsD
1 parent a60d0e1 commit e94ce22

4 files changed

Lines changed: 54 additions & 45 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ jobs:
8383
run: npx tsc -p tsconfig.json --noEmit
8484
- name: Test
8585
run: npm test
86+
- name: Test (workers)
87+
# tests/workers/** runs in workerd via @cloudflare/vitest-pool-workers.
88+
# `npm test` deliberately excludes it, so without this step the DO
89+
# coordinator suite would not run in CI at all.
90+
run: npm run test:workers
8691
- name: Governance Pressure Tests
8792
run: bash scripts/pressure-test-governance.sh
8893
- name: Lint (skipped)

package-lock.json

Lines changed: 43 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
"ai": "^6.0.141",
2929
"drizzle-orm": "^0.45.2",
3030
"hono": "^4.12.23",
31-
"hono-agents": "^0.19.0",
31+
"hono-agents": "^3.0.7",
3232
"jose": "^6.2.3",
3333
"workers-ai-provider": "^3.1.8",
3434
"zod": "^4.3.6"
3535
},
3636
"devDependencies": {
37-
"@cloudflare/vitest-pool-workers": "^0.20.1",
37+
"@cloudflare/vitest-pool-workers": "^0.22.0",
3838
"@cloudflare/workers-types": "^4.20240512.0",
3939
"drizzle-kit": "^0.31.9",
4040
"typescript": "^5.5.0",

vitest.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ export default defineConfig({
66
globals: true,
77
environment: 'node',
88
include: ['tests/**/*.test.ts', 'tests/**/*.spec.ts'],
9+
// tests/workers/** runs in workerd via vitest.workers.config.mts and imports
10+
// `cloudflare:test`, which only resolves under @cloudflare/vitest-pool-workers.
11+
// Without this exclude the node suite globs those files and dies at import.
12+
exclude: ['**/node_modules/**', '**/dist/**', 'tests/workers/**'],
913
testTimeout: 15000,
1014
pool: 'threads',
1115
maxWorkers: 1,

0 commit comments

Comments
 (0)