Implement M9.7 dev region sessions with durable no-effect intentions
Run a non-blocking TLS 1.3 session server inside evo-server's loop: environment views come from the region's own field/terrain stores with an explicitly empty organism presentation; admitted intentions ride the next synthetic input (content unchanged) and return a durable no-effect outcome from the host's final acknowledgement, or not_committed when dropped. Sessions are bound to their connection, epochs close stale sessions, and connections have bounded output, input rate and deadlines. SessionClient and evo-client --connect consume one single-use grant per Hello (refusals before admission keep it), reset to a fresh baseline on every session, keep stale views visible and report in-flight intentions as unknown after loss. evo-dev-session generates dev credentials, grant bundles and runs a restart probe. The dev deployment gains a drill-time, loopback-only listener with an optional Secret, enforced by the policy check, and tools/ops/session-drill.sh. Protocol v1 gains IntentOutcome and the capacity close reason before any deployment. ADR-0083 records the maintainer-confirmed decisions; M8-dev/stage remains not passed and no cluster change was made. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Native engineering client (M9.2–M9.5)
|
||||
# Native engineering client (M9.2–M9.7)
|
||||
|
||||
This opens a resizable native window showing camera-controlled environment habitats
|
||||
and biology-derived organisms (M9.5) from a local in-memory fixture authority.
|
||||
@@ -8,6 +8,11 @@ Contract: [client architecture](../architecture/CLIENT_ARCHITECTURE.md), ADR-007
|
||||
Camera/input: [contracts and limits](CAMERA_INPUT.md), ADR-0079.
|
||||
Environment: [presentation and encodings](ENVIRONMENT_RENDERING.md), ADR-0080.
|
||||
Organisms/inspector: [encodings and budget](ORGANISM_RENDERING.md), ADR-0081.
|
||||
Remote dev region: [operations](../networking/DEV_SESSION_OPERATIONS.md), ADR-0083.
|
||||
`--connect HOST:PORT --server-name NAME --ca FILE --grants FILE` (preset
|
||||
`client-network`) replaces the local fixture with a dev session: views come from the
|
||||
region, WASD sends intentions, and chips at y=72 show the connection (green/amber/red)
|
||||
and the last intention (white admitted, green durable, red rejected, grey unknown).
|
||||
|
||||
## Build and run
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ marker left of it means organisms were not drawn because of the frame budget.
|
||||
marker). If every visible organism fits at 10 rectangles, full detail is used;
|
||||
otherwise each visible organism is a single body; beyond the budget, organisms are
|
||||
counted as visible but not drawn and the marker appears. The engineering app
|
||||
budgets 4096 - 2313 (environment) - 25 (inspector) - 3 (host UI) = 1755, so 1024
|
||||
budgets 4096 - 2313 (environment) - 25 (inspector) - 5 (host UI) = 1753, so 1024
|
||||
organisms always fit as bodies. No textures, caches or history are kept.
|
||||
|
||||
## Engineering inspector
|
||||
|
||||
@@ -3445,3 +3445,67 @@ locally. No sockets, server integration, secret provisioning or deployment exist
|
||||
yet (M9.7). TLS interoperability was tested only between Mbed TLS endpoints. No
|
||||
performance or latency measurement is claimed. Certificates in tests are
|
||||
throwaway; no dev CA or HMAC key was created or committed.
|
||||
|
||||
## M9.7 connection to one authoritative dev region — 2026-10-01
|
||||
|
||||
Implemented ADR-0083 and DEV_SESSION_OPERATIONS.md: non-blocking TCP (Winsock/
|
||||
POSIX), `SessionServer` in evo-server's loop, `SessionClient`, evo-client remote mode,
|
||||
`evo-dev-session credentials|grants|probe`, the drill-time dev deployment override
|
||||
and `tools/ops/session-drill.sh`. Maintainer decisions (2026-10-01): proceed although
|
||||
M8-dev/stage is not passed; durable no-effect intentions; explicitly empty organism
|
||||
presentation; local real-process evidence plus a dev deployment path.
|
||||
|
||||
Executed:
|
||||
|
||||
- Windows MSVC 19.44 Release: `-Preset network` 1/1 and `-Preset client-network`
|
||||
6/6 (network, client environment/organisms/lifecycle/smoke/init-failure). The
|
||||
network suite now includes four loopback session scenarios over real Winsock + TLS:
|
||||
connect/view/intent/durable/not-committed/replay/invalid vector; duplicate
|
||||
subject, reused grant, foreign key and region, capacity; stale epoch with unknown
|
||||
outcome, stale layers, fresh-grant reconnect and fresh baseline, and a server
|
||||
"restart" on the same port at a new epoch with an earlier tick; not-ready refusal
|
||||
without spending the grant, byte-rate flood closure (server-side decision),
|
||||
plaintext and silent connections dropped (the latter at the 200 ms deadline).
|
||||
- `evo-dev-session` on Windows: credentials written, overwrite refused (exit 1),
|
||||
`--environment stage` refused (exit 2), 4-grant bundle = 432 bytes.
|
||||
- Linux GCC 14 Release with PostgreSQL 18.6 + network (`build/m97-postgres`): network
|
||||
suite passed; the **full** `evo-postgres-tests` suite passed (adapter, lease,
|
||||
checkpoint, host, server process, the new region dev session test, recovery, ops,
|
||||
clone, store, load, upgrade, migration). The session process test runs real
|
||||
evo-server processes: dev-only and synthetic-carrier refusals (exit 2), TLS
|
||||
session, server-store view and empty organism layer, admitted intention whose
|
||||
`INT1...` request appears in the host's `ack` line at the reported tick/commit,
|
||||
replay rejected, duplicate session refused, SIGKILL with the client reporting
|
||||
loss and stale layers, successor on the same port ready after lease expiry,
|
||||
reconnect at epoch 2 and a second durable outcome with a higher commit.
|
||||
- End-to-end rehearsal on the development-v1 region (world 100, region 1, frame 9;
|
||||
`evo-world-clone provision`) with tool-generated credentials: probe durable ack
|
||||
(tick 11, commit 1); SIGKILL; successor Ready in 3472 ms at epoch 2 from committed
|
||||
tick 11; two `server_shutdown` refusals during recovery that did not spend grants;
|
||||
reconnect and second durable ack (tick 22, commit 3); `probe passed`. The
|
||||
**Windows** evo-client (`--connect` through WSL2 localhost forwarding, software
|
||||
renderer, 300 frames) then received `session welcome session=2 epoch=2 tick=45
|
||||
commit=42` and exited 0. (The rehearsal script's `server2 exit=127` is a `wait`
|
||||
on a non-child PID in the script, not a server exit status.)
|
||||
- Clang 19 ASan/UBSan: network suite passed. clang-tidy 19 (warnings as errors):
|
||||
network library, session tests, dev tool, evo-client and evo-server/main plus the
|
||||
session process test all clean, after consuming best-effort results explicitly,
|
||||
a `must()` test helper for required optionals, and a GCC-reported genuine
|
||||
dangling reference in the process test fixed. Format check, CI selector fixtures
|
||||
and deploy policy (67 objects, 0 failures) passed; a temporary violation
|
||||
(`REGION_SESSION=dev`, `0.0.0.0:7400`) produced exactly the two new failures.
|
||||
|
||||
Defects found and fixed during validation: grants were spent on `server_shutdown`/
|
||||
`capacity` refusals (exhausting reconnection while a successor recovered); the
|
||||
session process test reused region ids 41/42 owned by the recovery suite; Mbed TLS's
|
||||
own `-Werror` failed on a GCC 13 `-O3` false positive (upstream warnings no longer
|
||||
fatal; context serialization compiled out).
|
||||
|
||||
Limits: **no in-cluster evidence**. This workstation has no kubeconfig and Docker
|
||||
was stopped, so no image was built or pushed, nothing was applied to evolution-dev,
|
||||
and `tools/ops/session-drill.sh` has only been syntax-checked (no shellcheck
|
||||
available). The CI `network`, `client` and `postgres` stages with the new options
|
||||
were not executed remotely. Port-forward reachability of the pod-loopback listener
|
||||
is the documented design, not yet observed. M8-dev/stage remains not passed. The
|
||||
connected desktop run was hidden/software-rendered; no human visual check of remote
|
||||
mode. Intentions have no biological effect by design.
|
||||
|
||||
Reference in New Issue
Block a user