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:
@@ -54,7 +54,14 @@ RUN cmake -P tools/prepare-sdl3.cmake \
|
||||
FROM ci-source AS ci-network
|
||||
# Explicit pinned Mbed TLS preparation (ADR-0082); codec, admission, dev grants and
|
||||
# TLS 1.3 loopback with static analysis, then again under ASan/UBSan.
|
||||
RUN cmake -P tools/prepare-mbedtls.cmake && cmake --preset network -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_C_COMPILER=clang-19 -DEVO_ENABLE_TIDY=ON && cmake --build --preset network --parallel 2 && ctest --preset network --no-tests=error && cmake --preset network -DEVO_SANITIZER=address -DEVO_ENABLE_TIDY=OFF && cmake --build --preset network --parallel 2 && ctest --preset network --no-tests=error
|
||||
RUN cmake -P tools/prepare-mbedtls.cmake \
|
||||
&& cmake --preset network -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_C_COMPILER=clang-19 \
|
||||
-DEVO_ENABLE_TIDY=ON \
|
||||
&& cmake --build --preset network --parallel 2 \
|
||||
&& ctest --preset network --no-tests=error \
|
||||
&& cmake --preset network -DEVO_SANITIZER=address -DEVO_ENABLE_TIDY=OFF \
|
||||
&& cmake --build --preset network --parallel 2 \
|
||||
&& ctest --preset network --no-tests=error
|
||||
|
||||
FROM ci-source AS ci-ecs
|
||||
# Explicit experiment preparation; normal configure/runtime remains dependency-free.
|
||||
@@ -111,14 +118,21 @@ COPY apps/ apps/
|
||||
COPY tests/ tests/
|
||||
COPY experiments/ experiments/
|
||||
COPY tools/ tools/
|
||||
COPY third_party/ third_party/
|
||||
COPY migrations/ migrations/
|
||||
# M9.7 (ADR-0083): evo-server includes the opt-in dev session listener; the pinned
|
||||
# Mbed TLS source is prepared explicitly and verified against its SHA-256.
|
||||
RUN cmake -P tools/prepare-mbedtls.cmake
|
||||
RUN cmake --preset release -B build/postgres -DCMAKE_CXX_COMPILER=g++-14 \
|
||||
-DCMAKE_C_COMPILER=gcc-14 -DEVO_BUILD_NETWORK=ON \
|
||||
-DEVO_BUILD_POSTGRES=ON -DPostgreSQL_ROOT=/source/.cache/postgres/install \
|
||||
&& cmake --build build/postgres --target evo-postgres-tests --parallel 2
|
||||
&& cmake --build build/postgres --target evo-postgres-tests evo-dev-session --parallel 2
|
||||
RUN cmake --preset analysis -B build/postgres-analysis -DCMAKE_CXX_COMPILER=clang++-19 \
|
||||
-DCMAKE_C_COMPILER=clang-19 -DEVO_BUILD_NETWORK=ON \
|
||||
-DEVO_BUILD_POSTGRES=ON -DPostgreSQL_ROOT=/source/.cache/postgres/install \
|
||||
&& cmake --build build/postgres-analysis --target evo-postgres-tests --parallel 2
|
||||
RUN cmake --preset asan -B build/postgres-asan -DCMAKE_CXX_COMPILER=clang++-19 \
|
||||
-DCMAKE_C_COMPILER=clang-19 -DEVO_BUILD_NETWORK=ON \
|
||||
-DEVO_BUILD_POSTGRES=ON -DPostgreSQL_ROOT=/source/.cache/postgres/install \
|
||||
&& cmake --build build/postgres-asan --target evo-postgres-tests --parallel 2
|
||||
|
||||
|
||||
@@ -58,7 +58,17 @@ spec:
|
||||
# Synthetic load is set only by tools/ops/fault-drill.sh (ADR-0073).
|
||||
inputs=()
|
||||
if [ -n "$REGION_INPUTS" ]; then inputs=(--synthetic-inputs "$REGION_INPUTS"); fi
|
||||
# Dev sessions are a drill-time override too (tools/ops/session-drill.sh,
|
||||
# ADR-0083): loopback only, reached by kubectl port-forward, never a Service.
|
||||
# evo-server refuses any environment but dev and needs the synthetic carrier.
|
||||
sessions=()
|
||||
if [ -n "$REGION_SESSION" ]; then
|
||||
sessions=(--session-listen 127.0.0.1:7400 --session-cert /run/session/server.pem
|
||||
--session-key /run/session/server.key --session-grant-key /run/session/grant.key
|
||||
--session-environment "$REGION_SESSION")
|
||||
fi
|
||||
exec /usr/local/bin/evo-server --profile lineage "${retained[@]}" "${inputs[@]}" \
|
||||
"${sessions[@]}" \
|
||||
--world "$REGION_WORLD" --region "$REGION_ID" --frame "$REGION_FRAME" \
|
||||
--pg-service /run/postgres/pg_service.conf --pg-passfile /tmp/pgpass \
|
||||
--objects /objects --objects-reserve-mib "$REGION_RESERVE_MIB" \
|
||||
@@ -74,6 +84,8 @@ spec:
|
||||
# Drill-only overrides; Git keeps no synthetic load and the 1024 MiB reserve.
|
||||
- {name: REGION_INPUTS, value: ""}
|
||||
- {name: REGION_RESERVE_MIB, value: "1024"}
|
||||
# M9.7 drill-only: "dev" enables the session listener; Git keeps it empty.
|
||||
- {name: REGION_SESSION, value: ""}
|
||||
ports:
|
||||
- {name: ops, containerPort: 9100, protocol: TCP}
|
||||
readinessProbe:
|
||||
@@ -97,6 +109,7 @@ spec:
|
||||
volumeMounts:
|
||||
- {name: objects, mountPath: /objects}
|
||||
- {name: connection, mountPath: /run/postgres, readOnly: true}
|
||||
- {name: session, mountPath: /run/session, readOnly: true}
|
||||
- {name: scratch, mountPath: /tmp}
|
||||
volumes:
|
||||
- name: objects
|
||||
@@ -112,3 +125,14 @@ spec:
|
||||
- {key: ca.crt, path: ca.crt}
|
||||
- name: scratch
|
||||
emptyDir: {medium: Memory, sizeLimit: 1Mi}
|
||||
# Created out of band in evolution-dev only (docs/networking/DEV_SESSION_OPERATIONS.md).
|
||||
# Optional: stage and World0 never have it, and the pod starts without it.
|
||||
- name: session
|
||||
secret:
|
||||
secretName: evolution-dev-session
|
||||
optional: true
|
||||
defaultMode: 0440
|
||||
items:
|
||||
- {key: server.pem, path: server.pem}
|
||||
- {key: server.key, path: server.key}
|
||||
- {key: grant.key, path: grant.key}
|
||||
|
||||
Reference in New Issue
Block a user