P0: CI must test Quasar in the canonical Nix dev environment #63

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

Failure that exposed this gap

A real local npm run dev/control-plane startup reached Vite successfully and then SBCL died while loading CLOG / cl-sqlite:

Unable to load any of the alternatives:
("libsqlite3.so.0" "libsqlite3.so")
...
[control-plane] exited with code 1
Shutting down all services...

This should have been caught before merge.

Root CI gap

Current .github/workflows/ci.yml installs native Lisp dependencies directly with apt (libsqlite3-dev, OpenSSL, RabbitMQ, LMDB, etc.) and then runs the Lisp/full-stack smoke tests. That proves the hand-built GitHub runner works, but it does not prove the repository's canonical declared local environment works.

flake.nix already declares the runtime library set (openssl, rabbitmq-c, libffi, sqlite, lmdb) and constructs LD_LIBRARY_PATH. CI needs to exercise that contract directly.

Child work

  • #64 — native-library preflight + hermetic negative tests
  • #65 — supervisor/full-stack startup-death smoke coverage

Required work

Add a clean CI job that uses the checked-in flake.lock + flake.nix as the environment under test and runs the real Quasar startup path from inside nix develop.

At minimum, from a clean checkout/environment:

  • enter the default flake devShell;
  • install JS dependencies from the root lockfile;
  • bootstrap Lisp dependencies using the project-supported path;
  • load every production ASDF system used by the control plane;
  • run the real control-plane load/start smoke;
  • run the combined development-stack smoke (Vite + control plane);
  • fail on any child-process early exit or FFI load failure;
  • verify the process reaches the actual health/readiness condition, not merely that a command was spawned.

Regression requirement

Add a test/guard proving that removing a required runtime library such as sqlite from the canonical environment makes this CI job fail. The test must not be satisfied by Ubuntu host libraries leaking into the Nix shell.

CI architecture

The apt-based job may remain as a portability lane if useful, but it cannot be the only runtime lane. Treat the Nix lane as the canonical local-environment contract.

Avoid maintaining two independent native dependency lists where possible; drift between the workflow and flake.nix is exactly what this issue is meant to prevent.

Acceptance

  • CI executes production Lisp load/start inside nix develop using checked-in flake.lock.
  • CI executes the real combined development-stack smoke inside that environment.
  • SQLite is actually dynamically loadable by SBCL/CFFI in the tested environment.
  • Other declared native Lisp runtime libraries are exercised or explicitly probed.
  • Early death of the control plane makes the job red even if Vite is healthy.
  • The test is isolated enough that undeclared host libraries cannot make it falsely green.
  • #64 and #65 are complete.
  • Exact-head CI is green with the fix.

Non-goal

Do not paper over this by adding another apt package to the existing workflow. The point is to prove the repository-declared environment is sufficient.

## Failure that exposed this gap A real local `npm run dev`/control-plane startup reached Vite successfully and then SBCL died while loading CLOG / `cl-sqlite`: ```text Unable to load any of the alternatives: ("libsqlite3.so.0" "libsqlite3.so") ... [control-plane] exited with code 1 Shutting down all services... ``` This should have been caught before merge. ## Root CI gap Current `.github/workflows/ci.yml` installs native Lisp dependencies directly with apt (`libsqlite3-dev`, OpenSSL, RabbitMQ, LMDB, etc.) and then runs the Lisp/full-stack smoke tests. That proves the hand-built GitHub runner works, but it does **not** prove the repository's canonical declared local environment works. `flake.nix` already declares the runtime library set (`openssl`, `rabbitmq-c`, `libffi`, `sqlite`, `lmdb`) and constructs `LD_LIBRARY_PATH`. CI needs to exercise that contract directly. ## Child work - [ ] #64 — native-library preflight + hermetic negative tests - [ ] #65 — supervisor/full-stack startup-death smoke coverage ## Required work Add a clean CI job that uses the checked-in `flake.lock` + `flake.nix` as the environment under test and runs the real Quasar startup path from inside `nix develop`. At minimum, from a clean checkout/environment: - enter the default flake devShell; - install JS dependencies from the root lockfile; - bootstrap Lisp dependencies using the project-supported path; - load every production ASDF system used by the control plane; - run the real control-plane load/start smoke; - run the combined development-stack smoke (`Vite + control plane`); - fail on any child-process early exit or FFI load failure; - verify the process reaches the actual health/readiness condition, not merely that a command was spawned. ## Regression requirement Add a test/guard proving that removing a required runtime library such as `sqlite` from the canonical environment makes this CI job fail. The test must not be satisfied by Ubuntu host libraries leaking into the Nix shell. ## CI architecture The apt-based job may remain as a portability lane if useful, but it cannot be the only runtime lane. Treat the Nix lane as the canonical local-environment contract. Avoid maintaining two independent native dependency lists where possible; drift between the workflow and `flake.nix` is exactly what this issue is meant to prevent. ## Acceptance - [ ] CI executes production Lisp load/start inside `nix develop` using checked-in `flake.lock`. - [ ] CI executes the real combined development-stack smoke inside that environment. - [ ] SQLite is actually dynamically loadable by SBCL/CFFI in the tested environment. - [ ] Other declared native Lisp runtime libraries are exercised or explicitly probed. - [ ] Early death of the control plane makes the job red even if Vite is healthy. - [ ] The test is isolated enough that undeclared host libraries cannot make it falsely green. - [ ] #64 and #65 are complete. - [ ] Exact-head CI is green with the fix. ## Non-goal Do not paper over this by adding another apt package to the existing workflow. The point is to prove the repository-declared environment is sufficient.
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#63
No description provided.