Arena merge gate (Phase 8)
- Parent: README.md
- Formal index: ../FORMAL_LEDGER.md
This document names the single TypeScript evaluation point for merge promotion when multiple Arena 5 controls apply together:
- Verification bundle — deterministic
verifyBundleclosure (src/verify-bundle.ts). - Cooling — optional block while
CoolingState.mode === 'cooling'(src/cooling-policy.ts). - Rollback replay — optional replay of a metric window on a fresh
RollbackController; any rollback decision blocks merge.
Public API: @a0n/gnosis/arena-merge-gate — evaluateArenaMergeGate(input).
Merge-bot / CI CLI: pnpm exec tsx ./scripts/evaluate-arena-merge-gate.ts path/to/gate-input.json (or - for stdin). JSON must include verificationBundle; optional cooling, rollbackReplay (same shape as ArenaMergeGateInput). Example: fixtures/arena-merge-gate.valid.json. Convenience: pnpm run evaluate:arena-merge-gate in this package runs the fixture. Root: pnpm run evaluate:arena-merge-gate.
No network, no side effects. Callers supply JSON-shaped inputs from CI or a merge bot; this module returns { ok: true } or { ok: false, reasons }.
Validation: pnpm run validate:arena-stack in open-source/gnosis exercises Lean SocioTechnicalSandbox via lean-minimal lake build ArenaSocioMinimal (no Mathlib), bundle + ecology CLIs, and gnode tests including src/__tests__/formal-ledger-basis.test.ts (families/primitives contract lock), src/__tests__/arena-merge-gate.test.ts, and related arena tests. pnpm run validate:formal-ledger-basis runs only the basis lock.
Repo daemon: scripts/start-formal-ledger-perpetual-machine.sh runs this gate before each non-dry-run agent cycle unless PERPETUAL_ARENA_STACK_GATE=0 (see .agent/workflows/formal-ledger-perpetual-machine.md). Use PERPETUAL_ARENA_STACK_FAST=1 to run validate:arena-stack-ts only (skips Lean lake build).
CI: GitHub Actions workflow .github/workflows/gnosis-arena-stack.yml runs the full validate:arena-stack on PRs/pushes that touch the arena slice.
See also
- AUTONOMOUS_MUTATION_ZERO_TRUST.md
- TOPO_COGNITIVE_EVENT_HORIZON.md
- ECOLOGY_PILOT_SPEC.md — separate ecology graph snapshot contract (
@a0n/gnosis/ecology-graph-snapshot)