feat(client): T-1132 standalone Atlas companion shell + make atlas (D-254 SS3)
New atlas_standalone scene/script: attach-or-spawn boot (one REAL
connect_to_sim attempt at SR_PORT-or-9876 — a separate throwaway TCP
probe was proven by live run to kill a pre-accept-loop server via
broken handshake pipe; never abandon a connected socket), else spawn
--port 0 via new ServerProcess.start_with_pipe + LISTENING:{port}
stdout parse, retry against the resolved port. Reader role wired end
to end: protocol.encode_startup_message optional role param (empty
omits the wire key — byte-identical for all existing callers),
sim_bridge.connection_role suppresses the post-handshake
RequestAllSettings auto-send, hud_groups skips AutoPause/AutoResume
sends for readers (all three would otherwise burn Reader violation
strikes per the T-1130 matrix — endorsed by Oscar).
Generic implant host per D-254 SS3: the shell instantiates ALL
registered implant apps; implant_app_manifest gains
available_in_companion (opt-out, default true) and
implant_registry.instantiate_all a standalone filter param (default
preserves hud.gd behavior byte-identically). Boot order is
instantiate_all THEN open_app (reverse renders a permanently black
window — app_changed fires with no listener; matches hud.gd's order).
Owned-server lifecycle: _exit_tree stops a spawned child, attached
servers survive companion close. Known engine limitation documented:
raw SIGTERM bypasses all Godot notifications and orphans a spawned
server; WM close paths verified clean.
Live-verified: spawn-mode (301 systems rendered from systems.db over
the wire), attach-mode, two simultaneous readers, clean shutdown with
zero orphan processes. 14 new gdUnit tests (port/LISTENING parsing).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
GODOT := $(shell command -v godot4 2>/dev/null || command -v godot 2>/dev/null)
|
||||
|
||||
.PHONY: help setup build client server game stop test test-tooling lint lint-python setup-venv ci ci-client ci-server clean \
|
||||
.PHONY: help setup build client server game atlas stop test test-tooling lint lint-python setup-venv ci ci-client ci-server clean \
|
||||
decisions-sync decisions-active decisions-validate \
|
||||
validate-content check-fact-ids setup-hooks install-hooks \
|
||||
audit deny atlas-verify economy-db regen-db check-systems-db \
|
||||
@@ -26,6 +26,7 @@ help:
|
||||
@echo " make setup-venv Create .venv and install Python tooling deps"
|
||||
@echo " make build Build client and server"
|
||||
@echo " make game Build and run the full game (server + client)"
|
||||
@echo " make atlas Standalone Atlas companion app — attach or spawn, read-only (D-254)"
|
||||
@echo " make stop Stop any running server instance"
|
||||
@echo " make client Run the Godot client (test mode)"
|
||||
@echo " make server Run the Rust simulation server"
|
||||
@@ -150,6 +151,20 @@ game: stop build
|
||||
@SR_LIVE=1 $(GODOT) --path client
|
||||
@$(MAKE) stop
|
||||
|
||||
# D-254/T-1132: standalone Atlas companion app. Unlike `game`, no orchestration
|
||||
# here — atlas_standalone.gd owns its own attach-or-spawn decision and child
|
||||
# server lifecycle internally (D-254 §1/§3), so this target is just "build,
|
||||
# then launch the standalone scene". build-server ensures the debug binary
|
||||
# exists for spawn-mode (atlas_standalone.gd resolves it at
|
||||
# server/target/debug/settled-reach-server, the same path the E2E test files
|
||||
# use); build-client ensures imports are current. SR_LIVE=1 is required —
|
||||
# without it SimBridge boots in test mode (instant fake CONNECTED, no network
|
||||
# at all), which would make the companion open the Atlas against a dynamic
|
||||
# test-harness snapshot instead of the real systems.db world via the wire.
|
||||
atlas: build-server build-client
|
||||
@test -n "$(GODOT)" || { echo "Godot not found. Run 'make setup' first."; exit 1; }
|
||||
@SR_LIVE=1 $(GODOT) --path client scenes/atlas_standalone.tscn
|
||||
|
||||
stop:
|
||||
@lsof -ti :9876 | xargs -r kill 2>/dev/null || true
|
||||
@echo "Stopped any running server on port 9876"
|
||||
|
||||
Reference in New Issue
Block a user