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:
dingo
2026-10-01 20:12:18 -04:00
co-authored by Claude Opus 5.5
parent 8fbe093cc8
commit 8e319322f4
49 changed files with 3467 additions and 130 deletions
+6 -3
View File
@@ -12,7 +12,7 @@ message re-encodes to identical bytes (fuzz-tested).
|---|---|---|---|
| 0 | magic | u32 | `0x53445645` (bytes `E V D S`) |
| 4 | version | u16 | exactly 1, otherwise `unsupported_version` |
| 6 | type | u8 | 1..7, otherwise `unknown_type` |
| 6 | type | u8 | 1..8, otherwise `unknown_type` |
| 7 | flags | u8 | 0, otherwise `reserved_flags` |
| 8 | length | u32 | payload bytes, <= 262144 (`oversized`) |
| 12 | payload | bytes | exactly `length`; short `truncated`, extra `trailing_bytes` |
@@ -30,12 +30,15 @@ Payload decoders also reject truncation, trailing bytes, out-of-range enum bytes
| 4 | IntentResult | S->C | sequence u64, status u8 (0..7), server_tick u64 |
| 5 | EnvironmentView | S->C | view header, environment presentation |
| 6 | OrganismView | S->C | view header, organism presentation |
| 7 | Close | both | reason u8 (0..8) |
| 7 | Close | both | reason u8 (0..9) |
| 8 | IntentOutcome | S->C | sequence u64, finality u8 (0 committed_no_effect, 1 not_committed), tick u64, commit_sequence u64; committed requires commit_sequence != 0, not_committed requires tick = commit_sequence = 0 |
IntentStatus: 0 admitted, 1 unknown_session, 2 stale_epoch, 3 expired,
4 invalid_vector, 5 replayed, 6 outside_window, 7 rate_limited.
CloseReason: 0 normal, 1 unsupported_version, 2 malformed, 3 unauthenticated,
4 expired, 5 duplicate_session, 6 stale_epoch, 7 rate_limited, 8 server_shutdown.
4 expired, 5 duplicate_session, 6 stale_epoch, 7 rate_limited, 8 server_shutdown,
9 capacity. Type 8 and reason 9 were added in M9.7 before any v1 peer was
deployed (ADR-0083); later changes require a new version.
View header (40 bytes): session, epoch, server_tick, commit_watermark, baseline (u64).