You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rust test gate covers 2 of 9 crates: nodespace-daemon's 92 tests never run automatically #1792
The Rust test gate covers 2 of the 9 workspace crates. nodespace-daemon — where the gRPC service layer lives — has 92 unit tests that no automated gate ever runs.
package.json:58
rust:test = cargo test --lib -p nodespace-core
&& cargo test --lib --bins -p nodespace-agent
scripts/test-gate.ts:42 (pre-push, ADR-047)
adds only: cargo test -p nodespace-app # Tauri-seam integration tests
.github/workflows/
audit.yml, nightly-webkit.yml, release.yml # no test workflow at all
So bun run test:all passing tells you nothing about the daemon, and neither does the pre-push gate except indirectly, through whatever the Tauri-seam tests happen to exercise end-to-end.
nodespace-daemon is the one that matters most — it holds the service layer behind every RPC the app makes.
Why this surfaced now
Raised in the code review of PR #1791. That PR's whole value is a regression test asserting get_status cannot block on a generation. The test was verified to fail against the pre-fix code — but nothing in the normal workflow will ever run it again. A regression guard that no gate executes is a comment with extra steps.
Suggested fix
Add the daemon to rust:test:
cargo test --lib -p nodespace-daemon -- --test-threads=2
Worth checking the wall-clock cost first — the daemon suite is ~0.85s locally, so this looks close to free. nodespace-cli is likely cheap too. nodespace-nlp-engine is the one to think about, since it pulls llama.cpp bindgen.
The broader question — whether the whole workspace should be covered, and whether any of this belongs in CI rather than only in a local pre-push hook — is worth deciding deliberately rather than by accretion.
Measured the cost before deciding scope, since the issue flagged it as unknown (all warm-cache, --test-threads=2):
crate
tests
time
nodespace-daemon
92
0.93s
nodespace-nlp-engine
108
0.37s
nodespace-types
38
0.08s
nodespace-cli
6
~0s
nodespace-proto
0
~0s
The llama.cpp compile the issue worried about is a one-time 59s, not per-run — and test:all already pays it transitively through nodespace-agent. So there was no reason to exclude anything.
Going with --workspace plus explicit exclusions rather than chaining seven -p flags, so a new crate is covered by default. Silent omission is what created this issue in the first place.
nodespace-app stays excluded: it needs --test-threads=1 and NODESPACED_TEST_BIN, and the pre-push gate already runs it as its own step (ADR-048).
Result: 1,335 → 1,583 tests.
One thing worth flagging. Verifying the gate actually catches a daemon regression — by reintroducing #1779's defect — exposed a latent flake in the two regression tests that PR added. Both hung the entire suite for 10+ minutes instead of failing, but only under concurrent load; each fails cleanly in isolation. The cause is that both waited on a shared tokio runtime that the blocked call could starve of workers.
Reworked both to run on an isolated runtime on a dedicated OS thread and wait on a std::sync::mpsc channel, which tokio scheduling cannot starve. The suite now fails in 5.94s with both tests named.
That defect was invisible while the daemon sat outside the gate — a fair illustration of why this issue matters.
Activity
malibio commentedon Jul 29, 2026
Measured the cost before deciding scope, since the issue flagged it as unknown (all warm-cache,
--test-threads=2):The llama.cpp compile the issue worried about is a one-time 59s, not per-run — and
test:allalready pays it transitively throughnodespace-agent. So there was no reason to exclude anything.Going with
--workspaceplus explicit exclusions rather than chaining seven-pflags, so a new crate is covered by default. Silent omission is what created this issue in the first place.nodespace-appstays excluded: it needs--test-threads=1andNODESPACED_TEST_BIN, and the pre-push gate already runs it as its own step (ADR-048).Result: 1,335 → 1,583 tests.
One thing worth flagging. Verifying the gate actually catches a daemon regression — by reintroducing #1779's defect — exposed a latent flake in the two regression tests that PR added. Both hung the entire suite for 10+ minutes instead of failing, but only under concurrent load; each fails cleanly in isolation. The cause is that both waited on a shared tokio runtime that the blocked call could starve of workers.
Reworked both to run on an isolated runtime on a dedicated OS thread and wait on a
std::sync::mpscchannel, which tokio scheduling cannot starve. The suite now fails in 5.94s with both tests named.That defect was invisible while the daemon sat outside the gate — a fair illustration of why this issue matters.
Gate rust:test on --tests so tests/*.rs integration files run by defa…