Skip to content

ci: build and run the native ELF in CI before release - #40

Merged
espetro merged 1 commit into
mainfrom
ci/native-smoke-and-coverage-ratchet
Dec 2, 2026
Merged

espetro merged 1 commit into
mainfrom
ci/native-smoke-and-coverage-ratchet

Conversation

@espetro

@espetro espetro commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Why

The 0.7.0 daemon crash shipped because CI never built the ELF: pnpm test runs node bin/coordinate.mjs (the loose dynamic path), release.yml only ran --help on the two Linux binaries, and the darwin binaries were only file-checked. An absent optional positional arrived as null in the compiled binary and scriptc's type claim rejected it at daemon start (expected string at $[0], got null).

What changes

  • scripts/native-smoke.sh — the verb battery: every --help, root --help, no-args exit 1, unknown-verb did-you-mean, enqueue→status round trip, enqueue without -- capturing a dash-leading command, status with no id, jobs --json, events with/without --job 0, lease acquire/release/list/waits, cap show/set, dead retry --all, agent register/heartbeat/unregister, inbox with/without owner, daemon start-and-stay-up (the 0.7.0 killer), daemon restart handoff, daemon --help isolation. Validated both ways: passes on the fixed 0.7.0 binary, exits non-zero on the broken one at the daemon step.
  • ci.yml: native-smoke job — builds the linux-x64 ELF on every PR and runs the battery.
  • release.yml: darwin-smoke job — macos-latest builds the darwin-arm64 ELF (with an explicit SQLite shim archive step), runs the battery; the release job now needs it. The Linux smoke step runs the full battery on both linux-gnu and linux-musl binaries instead of just --help.
  • scripts/scriptc-gate.mjs + scriptc-coverage-baseline.json — coverage ratchet: fails on static-statement drop, dynamic-statement growth, or new diagnostics in our code. ci.yml: scriptc-coverage job.

Branch protection on main now requires all five CI contexts (ts tests, oxlint, tsc, native ELF smoke, scriptc coverage ratchet).

The library-level typed-defaults fix is sigilco/cutils#63 (merged, not yet released).

The 0.7.0 daemon crash shipped because CI never built the ELF: pnpm test
runs node bin/coordinate.mjs (the loose dynamic path), release.yml only
ran --help on the two Linux binaries, and the darwin binaries were only
file-checked. An absent optional positional arrived as null in the
compiled binary and scriptc's type claim rejected it at daemon start.

- scripts/native-smoke.sh: the verb battery — every --help, root --help,
  no-args exit 1, unknown-verb did-you-mean, enqueue/status round trip,
  dash-leading command capture, jobs --json, events, lease acquire/
  release/list/waits, cap show/set, dead retry --all, agent register/
  heartbeat/unregister, inbox, daemon start-and-stay-up (the 0.7.0
  killer), daemon restart handoff, daemon --help isolation. Validated
  both ways: passes on the fixed 0.7.0 binary, exits non-zero on the
  broken one at the daemon step.
- ci.yml: native-smoke job builds the linux-x64 ELF on every PR and runs
  the battery.
- release.yml: darwin-smoke job (macos-latest) builds the darwin-arm64
  ELF, builds the SQLite shim archive, runs the battery; the release job
  now needs it. The Linux smoke step runs the full battery on both
  linux-gnu and linux-musl binaries instead of just --help.
- scripts/scriptc-gate.mjs + scriptc-coverage-baseline.json: coverage
  ratchet — fails on static-statement drop, dynamic-statement growth, or
  new diagnostics in our code. ci.yml: scriptc-coverage job.

Branch protection on main now requires all five CI contexts (ts tests,
oxlint, tsc, native ELF smoke, scriptc coverage ratchet).
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying coordinated with  Cloudflare Pages  Cloudflare Pages

Latest commit: fedb1d9
Status: ✅  Deploy successful!
Preview URL: https://cf18f744.coordinated.pages.dev
Branch Preview URL: https://ci-native-smoke-and-coverage.coordinated.pages.dev

View logs

@espetro
espetro merged commit f9c88aa into main Dec 2, 2026
6 checks passed
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