Worker unit tests, coverage floors, and an SBOM per main build #52

Merged
jared merged 3 commits from ci-sbom-worker-tests into main 2026-11-22 16:01:39 -05:00
3 Commits
Author SHA1 Message Date
jaredandClaude Opus 5.5 67a9e1c009 Integration tests: wait for a worker's WebSocket, not just its heartbeat
CI / Security (npm audit) (push) Successful in 21s
CI / Test (jest) (push) Successful in 23s
CI / Scan (secrets, workflows, shell) (push) Successful in 14s
CI / Integration (api) (push) Successful in 1m58s
CI / Lint (eslint) (pull_request) Successful in 44s
CI / UI (playwright) (push) Successful in 3m9s
CI / Test (jest) (pull_request) Successful in 42s
CI / Security (npm audit) (pull_request) Successful in 30s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 11s
CI / Integration (api) (pull_request) Successful in 1m44s
CI / Lint (eslint) (push) Successful in 13s
CI / Deploy (push) Skipped
CI / Notify (push) Skipped
CI / UI (playwright) (pull_request) Successful in 1m45s
CI / Deploy (pull_request) Skipped
CI / Notify (pull_request) Skipped
Under load a new worker's first heartbeat marked it online before its
WebSocket had connected, so a test's first command was refused, and the
cleanup in finally then threw its own error and hid the real one.
startWorker now waits until the server accepts a probe command for the
worker, and cleanup never throws (offline status has its own test).
Reproduced 1 in 6 under UI-test load before; 0 in 10 after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:54:38 -05:00
jaredandClaude Opus 5.5 394665e88a CI: build the SBOM from the lockfile (the audit job has no node_modules)
CI / Lint (eslint) (push) Successful in 17s
CI / Test (jest) (push) Successful in 18s
CI / Security (npm audit) (push) Successful in 12s
CI / Scan (secrets, workflows, shell) (push) Successful in 12s
CI / Integration (api) (push) Failing after 1m25s
CI / Lint (eslint) (pull_request) Successful in 31s
CI / Test (jest) (pull_request) Successful in 17s
CI / Security (npm audit) (pull_request) Successful in 18s
CI / UI (playwright) (push) Successful in 2m17s
CI / Deploy (push) Skipped
CI / Notify (push) Skipped
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 14s
CI / Integration (api) (pull_request) Successful in 1m19s
CI / UI (playwright) (pull_request) Successful in 1m39s
CI / Deploy (pull_request) Skipped
CI / Notify (pull_request) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:34:55 -05:00
jaredandClaude Opus 5.5 38a6d1158d Worker unit tests, coverage floors, and an SBOM per main build
CI / Lint (eslint) (push) Successful in 17s
CI / Test (jest) (push) Successful in 18s
CI / Security (npm audit) (push) Failing after 12s
CI / Scan (secrets, workflows, shell) (push) Successful in 18s
CI / Integration (api) (push) Successful in 2m58s
CI / Lint (eslint) (pull_request) Successful in 24s
CI / Test (jest) (pull_request) Successful in 15s
CI / UI (playwright) (push) Successful in 3m11s
CI / Deploy (push) Skipped
CI / Notify (push) Skipped
CI / Security (npm audit) (pull_request) Failing after 12s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 15s
CI / Integration (api) (pull_request) Successful in 1m18s
CI / UI (playwright) (pull_request) Successful in 1m31s
CI / Deploy (pull_request) Skipped
CI / Notify (pull_request) Skipped
- worker/worker.js exports PulseWorker and starts only when run directly
  (no behaviour change for the service; CT 153 needs no redeploy).
- tests/worker.test.js: success, exit code and stderr, timeout kill,
  capacity rejection, slot release after failure, ping/pong, no sends
  while disconnected.
- jest coverage floors (ratchet at today's levels): lib/ 90% lines and
  statements, 80% branches and functions; worker/ 40%.
- The audit job writes a CycloneDX SBOM of production dependencies and
  keeps it 90 days for each main build.

Part of #45 phases 3 and 4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:28:23 -05:00