fix: forward -- args through devbox scripts, fail serve loudly (#84)

devbox 0.17.2 runs .devbox/gen/scripts/<name>.sh with the args as positional
parameters but does not append "$@", so tools/serve.sh (and seed, bench,
mutation, import-scale, fogbench) saw an empty argv and a documented
`serve -- --image=...` silently served the default 4096 scene. End every
argument-taking script body with "$@".

serve: --dry-run parses and prints the options without building; unknown
options, non-numeric ports/tile sizes and --tile-size without --image fail
loudly; a no-image start prints the current map read from state.db; NixOS
gets security.pki.certificateFiles instead of the Debian trust steps.

Guard the faults import in worldmap/vision/markers with
`when defined(leakfault)` (it is only used inside those blocks), removing
the three UnusedImport warnings; leakfault builds still compile.

tools/devboxargs.test.mjs goes through `devbox run <script> -- <args>` for
serve (dry-run, unknown flag, tile-size without image) and seed (--help,
unknown flag), the seam the direct-tool tests missed.
This commit is contained in:
2026-11-21 21:35:39 +01:00
parent c8b5289a3d
commit 30b35592c7
9 changed files with 190 additions and 15 deletions
+4 -1
View File
@@ -30,7 +30,10 @@ what exists, what is proven, what is deliberately still open.
- **Playtest tooling (#82, closed with this note):** `?perf=1` in-app fps/frame/JS/token/zoom
overlay (off by default), `fff-vtt import` on a fresh/empty state dir, `devbox run serve --
--image=<file>`, `devbox run seed -- --url=...` for the 50 tokens, and the GM token form's X/Y
default to the viewport centre.
default to the viewport centre. #84 fixed the seam that made those `--` arguments invisible:
devbox 0.17.2 scripts must end with `"$@"` in `devbox.json`, `serve` now fails on an unknown or
unusable flag, and `devbox run serve -- --dry-run` prints the parsed options. On NixOS the serve
output prints `security.pki.certificateFiles`, not the Debian `update-ca-certificates` steps.
- **M5** - concurrency, bounded outbox/coalescing, lag tracking, SIGTERM, metrics, nginx dead-peer
timeout, stats outside the lock. `#34` heartbeat is M5.
- **Deferred:** `db_connector` -> thin sqlite3 binding (build item 13); per-token polygon cache and