F6: Headless server entry point and smoke test

`tools/godot.sh -- --server` runs a headless dedicated server with
--seed, --port, --players, --bots, --ticks, --unthrottled and
--log-every. ServerLoop drives the simulation and times every tick
without a scene tree, so tests run it directly. A placeholder WanderBot
gives smoke runs realistic load until the v0.4 bots land.

Logs are JSON lines that all carry the seed. An ErrorCounter logger
makes any engine or script error exit 1; a bad command line exits 2.

`make smoke` (now part of `make check`) runs 1,000 ticks with 24 bots,
prints min/mean/p50/p95/p99/max tick time against the 12 ms budget,
reruns to confirm the state hash reproduces, and proves a deliberate
script error and a bad config both exit non-zero.

Closes #6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 20:07:39 -05:00
co-authored by Claude Opus 5.5
parent 46b131fe84
commit d9d4c04312
18 changed files with 621 additions and 3 deletions
+6 -2
View File
@@ -1,10 +1,10 @@
# Tidewall build entry points. Everything runs headless with the repo-local engine.
GODOT := tools/godot.sh
.PHONY: check import parse test test-selfcheck binaries verify-engine
.PHONY: check import parse test test-selfcheck smoke binaries verify-engine
## Everything that must pass before a push.
check: verify-engine binaries parse test test-selfcheck
check: verify-engine binaries parse test test-selfcheck smoke
verify-engine:
@$(GODOT) --verify
@@ -25,3 +25,7 @@ test: import
## Proves the test runner detects each kind of failure.
test-selfcheck: import
@tools/test_selfcheck.sh
## Boots the headless server for 1,000 ticks and checks exit codes, logs and timing.
smoke: import
@tools/smoke.sh