P0: harden full-stack smoke CI against child-process startup death #65

Open
opened 2026-08-27 05:34:28 +00:00 by lost-rob0t · 0 comments
lost-rob0t commented 2026-08-27 05:34:28 +00:00 (Migrated from github.com)

Parent: #63

Problem

The observed failure pattern is especially bad because Vite successfully reports itself ready while the Common Lisp control plane crashes immediately afterward. A smoke test that only sees the frontend listener or waits a fixed delay can falsely imply the development stack is healthy.

Quasar needs explicit supervisor-level CI coverage for the combined startup contract.

Required work

Harden the real npm run dev / combined-stack smoke path and its CI test so readiness means all required child services are alive and usable.

Cover at minimum:

  • Vite starts and serves its expected readiness endpoint/page;
  • the Common Lisp control plane starts and reaches its real readiness condition;
  • an early non-zero exit from either required child immediately fails the parent command;
  • a child that starts and then dies before readiness fails deterministically;
  • frontend readiness alone cannot satisfy the smoke test;
  • control-plane readiness alone cannot satisfy the smoke test;
  • startup has a bounded timeout with useful captured logs;
  • signal/CI cancellation tears down all child processes without orphans;
  • the parent returns the causal child failure status where practical.

Failure injection tests

Add deterministic test seams/fixtures rather than relying on flaky timing. CI should prove at least:

  1. control plane exits 1 immediately while Vite remains healthy -> smoke fails;
  2. Vite exits early while control plane remains healthy -> smoke fails;
  3. one child hangs before readiness -> bounded timeout + cleanup;
  4. both become ready -> smoke passes;
  5. after a passing smoke, teardown leaves no bound test ports/processes.

The exact mechanism may use injected commands/ports/environment variables, but do not duplicate the production supervisor in a test-only implementation.

Diagnostics

On failure, surface a compact summary identifying which child failed and preserve both service logs as CI artifacts or inline grouped logs. The SQLite/CFFI crash from #64 should therefore present as a control-plane startup failure, not as a generic timeout.

Acceptance

  • Combined readiness requires both Vite and the Lisp control plane.
  • Early child death always makes the top-level smoke command non-zero.
  • Deterministic failure-injection tests cover both children and timeout behavior.
  • Teardown is verified; no orphaned services or occupied smoke ports remain.
  • CI runs this against the real production/dev supervisor path.
  • This smoke also runs in the canonical Nix environment from #63.
  • Exact-head CI is green.

Non-goal

Do not solve this with a longer sleep. Readiness and liveness must be observed explicitly.

Parent: #63 ## Problem The observed failure pattern is especially bad because Vite successfully reports itself ready while the Common Lisp control plane crashes immediately afterward. A smoke test that only sees the frontend listener or waits a fixed delay can falsely imply the development stack is healthy. Quasar needs explicit supervisor-level CI coverage for the **combined** startup contract. ## Required work Harden the real `npm run dev` / combined-stack smoke path and its CI test so readiness means all required child services are alive and usable. Cover at minimum: - Vite starts and serves its expected readiness endpoint/page; - the Common Lisp control plane starts and reaches its real readiness condition; - an early non-zero exit from either required child immediately fails the parent command; - a child that starts and then dies before readiness fails deterministically; - frontend readiness alone cannot satisfy the smoke test; - control-plane readiness alone cannot satisfy the smoke test; - startup has a bounded timeout with useful captured logs; - signal/CI cancellation tears down all child processes without orphans; - the parent returns the causal child failure status where practical. ## Failure injection tests Add deterministic test seams/fixtures rather than relying on flaky timing. CI should prove at least: 1. control plane exits `1` immediately while Vite remains healthy -> smoke fails; 2. Vite exits early while control plane remains healthy -> smoke fails; 3. one child hangs before readiness -> bounded timeout + cleanup; 4. both become ready -> smoke passes; 5. after a passing smoke, teardown leaves no bound test ports/processes. The exact mechanism may use injected commands/ports/environment variables, but do not duplicate the production supervisor in a test-only implementation. ## Diagnostics On failure, surface a compact summary identifying which child failed and preserve both service logs as CI artifacts or inline grouped logs. The SQLite/CFFI crash from #64 should therefore present as a control-plane startup failure, not as a generic timeout. ## Acceptance - [ ] Combined readiness requires both Vite and the Lisp control plane. - [ ] Early child death always makes the top-level smoke command non-zero. - [ ] Deterministic failure-injection tests cover both children and timeout behavior. - [ ] Teardown is verified; no orphaned services or occupied smoke ports remain. - [ ] CI runs this against the real production/dev supervisor path. - [ ] This smoke also runs in the canonical Nix environment from #63. - [ ] Exact-head CI is green. ## Non-goal Do not solve this with a longer `sleep`. Readiness and liveness must be observed explicitly.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/quasar#65
No description provided.