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>
62 lines
2.7 KiB
Bash
Executable File
62 lines
2.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Decides whether a CI suite must run: exit 0 = run, exit 1 = nothing relevant changed.
|
|
#
|
|
# The comparison base comes from the event (review M8 P2), never from HEAD^ alone:
|
|
# - push: CI_BEFORE (the push's `before` SHA), so every commit of a multi-commit push
|
|
# counts, not just the last;
|
|
# - pull_request: CI_PR_BASE (the base SHA), diffed against the checked-out merge;
|
|
# - workflow_dispatch, schedule, a local run or any other event: always run.
|
|
# A missing, all-zero or unfetchable base, or any git failure, also runs the suite:
|
|
# uncertainty never skips validation. tools/ci/ci-paths-check.sh tests this offline.
|
|
set -euo pipefail
|
|
|
|
suite=${1:?suite required}
|
|
event="${CI_EVENT:-${GITHUB_EVENT_NAME:-}}"
|
|
case "$event" in
|
|
push) base="${CI_BEFORE:-${GITHUB_EVENT_BEFORE:-}}" ;;
|
|
pull_request) base="${CI_PR_BASE:-}" ;;
|
|
*) exit 0 ;;
|
|
esac
|
|
if [[ ! "$base" =~ ^[0-9a-f]{40}$ || "$base" == 0000000000000000000000000000000000000000 ]]; then
|
|
exit 0
|
|
fi
|
|
if ! git cat-file -e "$base^{commit}" 2> /dev/null; then
|
|
git fetch --no-tags --quiet --depth=1 origin "$base" > /dev/null 2>&1 || exit 0
|
|
git cat-file -e "$base^{commit}" 2> /dev/null || exit 0
|
|
fi
|
|
if ! files=$(git diff --name-only "$base" HEAD 2> /dev/null); then
|
|
exit 0
|
|
fi
|
|
|
|
# Every suite runs when the workflow or this selector changes.
|
|
common='\.gitea/workflows/|tools/ci/ci-paths\.sh'
|
|
native='CMakeLists\.txt|CMakePresets\.json|cmake/|include/|src/|apps/'
|
|
postgres_tools='migrations/|tools/prepare-postgres\.sh|tools/migrate-postgres\.sh|tools/backup/|tools/ci/postgres-check\.sh|tools/ci/backup-check\.sh|tools/ci/dr-check\.sh|tools/ci/upgrade-check\.sh'
|
|
case "$suite" in
|
|
client)
|
|
pattern="$common|$native|experiments/client/|tools/prepare-sdl3\\.cmake|tools/sdl3-pin\\.cmake|deploy/docker/Dockerfile"
|
|
;;
|
|
network)
|
|
pattern="$common|$native|tests/network_|tests/fuzz/dev_session|third_party/mbedtls/|tools/prepare-mbedtls\.cmake|tools/mbedtls-pin\.cmake|deploy/docker/Dockerfile"
|
|
;;
|
|
checks|tsan|ecs)
|
|
pattern="$common|$native|tests/|experiments/|tools/ci/linux-check\.sh|tools/ci/tsan-profile\.mjs|deploy/docker/Dockerfile"
|
|
;;
|
|
postgres|postgres-tools)
|
|
pattern="$common|$native|tests/|$postgres_tools|third_party/mbedtls/|tools/prepare-mbedtls\.cmake|tools/mbedtls-pin\.cmake|deploy/docker/Dockerfile"
|
|
;;
|
|
deploy)
|
|
pattern="$common|deploy/|tools/ops/|tools/backup/|tools/ci/deploy-policy-check\.py|tools/ci/monitoring-check\.sh|tools/ci/ops-lib-check\.sh"
|
|
;;
|
|
server-image)
|
|
pattern="$common|$native|migrations/|tools/prepare-postgres\.sh|tools/ci/server-image-smoke\.sh|deploy/docker/Dockerfile"
|
|
;;
|
|
image)
|
|
pattern="$common|$native|tests/|deploy/docker/Dockerfile"
|
|
;;
|
|
*)
|
|
exit 0
|
|
;;
|
|
esac
|
|
grep -Eq "^($pattern)" <<< "$files"
|