Skip to content

ci: real local gate scripts and deterministic smoke harness (#97, #99)#108

Open
jmcte wants to merge 3 commits into
mainfrom
claude/test-stability-and-ci-scripts
Open

ci: real local gate scripts and deterministic smoke harness (#97, #99)#108
jmcte wants to merge 3 commits into
mainfrom
claude/test-stability-and-ci-scripts

Conversation

@jmcte
Copy link
Copy Markdown
Contributor

@jmcte jmcte commented May 15, 2026

Closes #97, closes #99.

Summary

#99 — real local CI gate scripts

  • scripts/ci/run-fast-checks.sh now runs the real cheap gate: pnpm install --frozen-lockfilepnpm lintpnpm testpnpm build, shell-safe for the self-hosted Synology public runner (Corepack-activated pnpm, no sudo/extra installs).
  • scripts/ci/run-extended-validation.sh runs the fast checks plus the coverage-threshold gate (pnpm test:coverage), with a comment documenting that mutation testing intentionally stays a separate CI job.
  • New test/ci-scripts.test.ts asserts the real commands are present and the placeholder text cannot regress back in (and that the workflow keeps mutation testing as its own job).

#97 — deterministic smoke harness

  • scripts/smoke/mock-api.mjs emits a ready <host>:<port> stdout sentinel once the server is listening.
  • test/smoke-harness.test.ts waits on that sentinel event-driven and rejects immediately on child error/exit. This removes the previous 50×100ms log-file poll that raced the per-test timeout. The only remaining timeout (15s) fires solely on a genuine startup hang — it is not used to mask a slow poll. The test now completes in well under one second.

Test plan

  • pnpm lint passes (Node 24.14.1)
  • pnpm test — 46 files / 213 tests pass; smoke harness runs in <1s
  • bash scripts/ci/run-fast-checks.sh runs lint+test+build and exits 0
  • bash -n syntax-checks both scripts

https://claude.ai/code/session_01QxQ71Yrf2Cn6zVfM4LY7AR


Generated by Claude Code

Replace the placeholder run-fast-checks.sh / run-extended-validation.sh
with the project's real gates (lint + test + build, plus the coverage
threshold for extended), keeping them shell-safe for the self-hosted
Synology public runner. A new ci-scripts test asserts the real checks
are present and the placeholder text cannot regress back in.

Make the registration smoke harness deterministic: the mock API now
emits a stdout readiness sentinel and the test waits on it event-driven,
failing fast on spawn error or early exit instead of polling a log file
on a fixed interval that raced the test timeout.

Closes #97
Closes #99

https://claude.ai/code/session_01QxQ71Yrf2Cn6zVfM4LY7AR
pheidon
pheidon previously approved these changes May 15, 2026
@pheidon pheidon enabled auto-merge (squash) May 15, 2026 19:23
#108 merged main after #109 landed without the env-isolation fix, so
its doctor.test.ts missing-env/missing-host assertions failed on the
self-hosted runner (GITHUB_PAT is exported there). Wrap those cases in
withEnv to clear the relevant variables, matching the existing
missing-env test pattern. Mirrors PR #110.

https://claude.ai/code/session_01QxQ71Yrf2Cn6zVfM4LY7AR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace placeholder local CI scripts with real test gates Fix smoke harness timeout so coverage gates are meaningful

4 participants