From 997303bbff87d28f56d250bcb9049251f01f0ecd Mon Sep 17 00:00:00 2001 From: Vernon Stinebaker Date: Mon, 28 Sep 2026 22:14:45 +0800 Subject: [PATCH 1/2] docs: add CONTRIBUTING.md with commit gates, CI expectations, and lifecycle hygiene rules --- CONTRIBUTING.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..d7cca4f8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,18 @@ +# Contributing to NullHub + +1. **Read [AGENTS.md](AGENTS.md)** and [README.md](README.md) first — the + architecture (embedded Svelte UI, installer, supervisor) and runtime + prerequisites are documented there. +2. One concern per PR. No drive-by refactors. +3. Build prerequisites: `npm` (UI build), `zig` 0.16.0. +4. Before every commit: + - `zig build test --summary all` — 0 failures, 0 leaks + - `zig fmt --check src/` + - UI-touching changes: `npm --prefix ui run build` must succeed +5. Every PR runs the 4-target CI matrix (linux-x86_64, linux-aarch64, + macos-aarch64, windows-x86_64) including backend tests and the e2e suite + on the native Linux target. Keep it green. +6. Bug fixes must include a regression test citing the issue number. +7. Changes to instance lifecycle (install/restart/uninstall) must account for + process-tree hygiene: the supervisor owns child processes, and restarts + must leave exactly one process per instance (see #86). From d76930e2dd0956d0b4c01e47755338508b78957c Mon Sep 17 00:00:00 2001 From: Vernon Stinebaker Date: Sun, 4 Oct 2026 00:24:48 +0800 Subject: [PATCH 2/2] docs(contributing): use tests/test_backend.sh as the backend gate (DonPrus review) --- CONTRIBUTING.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d7cca4f8..787b314b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,9 @@ 2. One concern per PR. No drive-by refactors. 3. Build prerequisites: `npm` (UI build), `zig` 0.16.0. 4. Before every commit: - - `zig build test --summary all` — 0 failures, 0 leaks + - `bash tests/test_backend.sh` — the backend gate CI actually runs; wraps + `zig build test` + `zig build test-integration`, both with + `-Dembed-ui=false -Dbuild-ui=false` — 0 failures, 0 leaks - `zig fmt --check src/` - UI-touching changes: `npm --prefix ui run build` must succeed 5. Every PR runs the 4-target CI matrix (linux-x86_64, linux-aarch64,