ZT_CONTROLLER=1 on a box with libpq present but unconfigured compiles
clean and silently falls back, so a successful build proves nothing.
This adds the embedded controller as a buildable artifact and the check
that would have caught that failure.
ZT_CONTROLLER_NO_SQL=1 gates the SQL block and the smeeclient cargo
target, leaving the ZT_CONTROLLER=1 path byte-identical when unset.
Dropping it removes the arch-pinned ext/*/install/ubuntu22.04 prebuilts
and the rust toolchain from the build, so any Debian base works.
Dockerfile.controller builds that target into a 142MB runtime image.
Three defects surfaced while proving it, all logged in SPEC B8/B9:
- .dockerignore was inert twice over. Its patterns ran as a post-COPY
RUN printf, which the daemon has already used by then, and bare *.o
matches the root only under Docker's filepath.Match, so all 121 stale
objects were copied and linked against the image's glibc 2.36. Now
**/*.o, which is the known stale-object hazard from AGENTS.md.
- The gate asserted nm -C found nothing inside a runtime image with no
nm. sh: nm: not found made the pipeline fail, ! inverted it to a pass,
and the check went green on a missing tool. Uses grep -qaE instead.
- The container ran with -p, so every API call returned 401: OneService
gates on loopback source at OneService.cpp:1859 unless
allowManagementFrom widens it, and a DNAT'd port arrives from the
bridge gateway. The gate uses --network host, and the docs now say so.
Verified: gate passes against the image and in --local, driving network
create, member authorize, member list and the on-disk write. Identity
and controller.d survive container replacement.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>