Skip to content

ci: fix scheduler test in CI + gate image publish on tests#13

Merged
StrandedTurtle merged 1 commit into
mainfrom
claude/fix-ci-test-gate-publish
Jun 26, 2026
Merged

ci: fix scheduler test in CI + gate image publish on tests#13
StrandedTurtle merged 1 commit into
mainfrom
claude/fix-ci-test-gate-publish

Conversation

@StrandedTurtle

Copy link
Copy Markdown
Owner

Fixes the red CI on main and the "it published anyway" surprise.

Why CI failed

scheduler.test.js imports scheduler.jsdb.js, which runs fs.mkdirSync(DATA_DIR) at load. In CI that defaults to /data, which the runner can't create → EACCES, crashing the file. (It passed locally only because /data happened to be writable.) Fix: set DATA_DIR to a temp dir before importing, exactly like settings.test.js.

Why it published despite the failure

ci.yml (tests) and release.yml (publish) are independent workflows on the same push — publish builds the image and doesn't run the tests, so it succeeded on its own. Now the publish job needs a verify job (server tests + client build), so a red test blocks the image from shipping.

Note: the previously-published :edge is actually fine — the failure was test-environment-only (the running container's /data is a writable volume), not a product bug.

Test plan

  • cd server && node --test → 76/76
  • CI green on this PR; on merge, verify runs before publish

Generated by Claude Code

- scheduler.test.js imported scheduler.js (→ db.js, which mkdirs DATA_DIR
  at load); in CI that's /data and mkdir is denied (EACCES), crashing the
  test file. Set DATA_DIR to a temp dir before importing, matching
  settings.test.js. (Passed locally only because /data was writable here.)
- Gate the publish workflow on a verify job (server tests + client build)
  so a red test never ships an image — previously CI and Publish were
  independent workflows and the image published even when CI failed.
@StrandedTurtle StrandedTurtle merged commit 87c1176 into main Jun 26, 2026
4 checks passed
@StrandedTurtle StrandedTurtle deleted the claude/fix-ci-test-gate-publish branch June 27, 2026 21:07
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