feat: add Zenith strategy and move latency tracing
Build and Push Docker Container / build-and-push (push) Successful in 2m18s

- Register Zenith 1.1 with balanced duel verdicts and forced-outcome overrides.
- Prioritize permanent-trail space in Constrictor and health-aware hazard routes.
- Deduct executor queue delays and return fallback directions on move timeouts.
- Correlate response headers, replay timings, and sampled structured trace logs.
- Move shared metrics publication off the response path without losing local counts.
- Allow configurable tournament opponents and add a psql helper recipe.
- Preserve empty latency values through compact replay encoding and migration.
- Update Arena game links and use default assets for missing customizations.
- Cover strategy, HTTP lifecycle, tracing, replay codecs, and dashboard behavior.
- Validate with 260 passing Python tests, 4 skips, and 2 passing JavaScript tests.
This commit is contained in:
2026-11-05 01:11:31 +01:00
parent 39a7a53873
commit a2414f0b3d
26 changed files with 758 additions and 45 deletions
+12 -2
View File
@@ -80,6 +80,16 @@ bench-snake-arena-postgres positions="100" output="":
if [ -n "{{output}}" ]; then args+=(--json-output "{{output}}"); fi
PYTHONPATH="{{justfile_directory()}}" uv run python "{{justfile_directory()}}/scripts/benchmark_snake_arena.py" "${args[@]}"
# Open the gameplay database with psql (uses GAMEPLAY_DB_PG_DSN from .env)
[positional-arguments]
db *args:
#!/usr/bin/env bash
set -euo pipefail
: "${GAMEPLAY_DB_PG_DSN:?Set GAMEPLAY_DB_PG_DSN in .env or the environment}"
command -v psql >/dev/null || { echo "Install the PostgreSQL client (psql) first." >&2; exit 1; }
exec psql --dbname="$GAMEPLAY_DB_PG_DSN" "$@"
cleanup-gameplay-postgres older_than_days="30" execute="false" vacuum="false":
#!/usr/bin/env bash
set -euo pipefail
@@ -101,11 +111,11 @@ migrate-gameplay-postgres since="" drop_legacy="false":
if [ "{{drop_legacy}}" = "true" ]; then args+=(--drop-legacy); fi
PYTHONPATH="{{justfile_directory()}}" uv run python "{{justfile_directory()}}/scripts/migrate_gameplay_to_compact.py" "${args[@]}"
bench-snake-tournament games="20" gametype="standard" map="standard" output="":
bench-snake-tournament games="20" gametype="standard" map="standard" output="" snake_a="ApexBattleSnake" snake_b="PrismBattleSnake_GPT_5_6_Sol":
#!/usr/bin/env bash
set -euo pipefail
args=(--games "{{games}}" --gametype "{{gametype}}" --map "{{map}}")
args=(--games "{{games}}" --gametype "{{gametype}}" --map "{{map}}" --snake-a "{{snake_a}}" --snake-b "{{snake_b}}")
if [ -n "{{output}}" ]; then args+=(--json-output "{{output}}"); fi
PYTHONPATH="{{justfile_directory()}}" python "{{justfile_directory()}}/scripts/run_seeded_snake_tournament.py" "${args[@]}"