Repository navigation
Description
Summary
zig build test reports success while running zero unit tests. The suite has never been wired to the build's test root, so CI has been green on an empty suite.
Reproduction
zig build test -Dembed-ui=false -Dbuild-ui=false --summary allBuild Summary: 4/4 steps succeeded
+- run test success 1ms MaxRSS:4M
Note the absence of a N/N tests passed count — nothing was executed. For comparison, tests/test_backend.sh reports 12/12 tests passed for its integration target.
Root cause
build.zig:79declares the unit-test root assrc/main.zig.src/main.zigcontains zerotest { … }blocks.src/root.zig:56contains the expectedtest { _ = …; }block referencing the module tree (server,orchestrator,paths,registry,state,wizard_api, …), but it is never reached, because nothing in the test root imports it from a test scope.
Result: the test binary compiles main.zig and runs an empty set.
Scope of what is silently skipped
62 files under src/ contain test declarations. Examples: src/server.zig (72), src/core/launch_args.zig (13), src/core/integration.zig (5).
Impact
- Every green
TestCI run means "it compiled", not "it passes". - CONTRIBUTING/AGENTS (merged in docs: add CONTRIBUTING.md #87) now instruct contributors to use
bash tests/test_backend.shas the backend gate — a gate whose unit half executes nothing. - Regression risk for the instance lifecycle / supervisor work in flight (BUG: nullhub restart of a nullboiler instance leaves zombie processes and the restart command itself hangs #86).
Wiring the root exposes bitrot (15 compile errors)
Adding the obvious one-line fix to src/main.zig:
test {
_ = @import("root.zig");
}…does not simply start passing — the dormant suite fails to compile:
compile test Debug native 15 errors
src/supervisor/health.zig:184 error: expected type '…ThreadCtx', found '…__struct_461448'
src/discovery.zig:62 error: root source file struct 'fmt' has no member named 'formatIntBuf'
src/discovery.zig:125 error: no field named 'config' in struct 'core.manifest.Manifest'
src/installer/downloader.zig:184 error: no field or member function named 'metadata' in 'compat.fs.File'
src/managed_skills.zig:263 error: no field or member function named 'realpathAlloc' in 'Io.Dir'
… (10 more)
These are stdlib/API drift (std.fmt.formatIntBuf, Io.Dir.realpathAlloc) and struct-shape changes that landed after the tests were last compiled. This is almost certainly why the gap went unnoticed: since the root was never wired, nothing ever compiled the suite.
Suggested path
- Wire the test root (one line in
src/main.zig, or pointbuild.zig:79atsrc/root.zig). - Fix the 15 compile errors (stdlib/API migration + struct-shape updates), or land it incrementally with a per-module allowlist so the gate is real from day one.
- Once wired, require a non-zero test count in CI so an empty suite can never again report success.
Context
Found while reviewing #84, which correctly notes this predates that PR. Not a regression from any open change.
Activity
fix(installer): bound startup UI sync, stage builds, dedupe install p…
test(ui_modules): use tmpDir instead of hardcoded /tmp paths