Gates and proof

A green run is not a feeling; it is a printed receipt. Ståge is proven by 36 shell programs in script/, each of which compiles the shipped sources beside a harness and runs it on the local JVM — no JUnit, no Gradle, no emulator.

How a gate works

script/check-*.sh
   ├─ script/kotlinc.sh        drives the compiler Gradle already cached — it fetches nothing
   ├─ Harness.kt               the harness, compiled beside the shipped sources
   ├─ fixtures                 every gate has a NEGATIVE fixture: the case that must be refused
   └─ proof/transcripts/…      the receipt it writes, quoted by the proof document

Three rules make a gate worth having:

The suite

GateSubject
check-wire.shthe codec round-trips; strict refusals; the credential gate over a real socket
check-reducer.shthe real reducer against a scripted host on loopback
check-loom.shthe host-side journal and surface: retention, eviction, the attach race
check-loopback.shthe real client against the real surface, over 127.0.0.1
check-determinism.shsame input, byte-identical output across two JVMs; the no-clock gate
check-gates.shthe client's refusal contract, with a positive control per gate
check-cli.shthe reference client: command table, in-process loop, the v3 create → run loop, the real program as a second JVM
check-daemon-store.shour schema and store: migrations, keyset pagination, abort/delete, one writer
check-daemon-loop.shthe turn loop and its state machine; every gate has a negative fixture
check-daemon-loopback.shthe already-proven client against our daemon, over the loopback
check-daemon-provider.shthe model plug: both real adapters over recorded SSE, no network and no keys
check-daemon-v3.shwire v3: roster, create, search, models, activity — eight gates, plus mutations
check-daemon-tools.shthe tool-calling loop: batch boundary, one result per call, abort/unknown results, caps, duplicates, truncation, the registry — G1–G12
check-daemon-files.shthe file instruments: the sealed outcome vocabulary, the digest anchor, confinement, the re-read receipt — F1–F11
check-daemon-find.shthe search instruments: glob listing, content search, named bounds and cursors, locate-before-read
check-daemon-skills.shthe skills: the index and its sort, the description rule, the verbatim body, unknown names, empty/missing roots
check-daemon-bash.shthe command tool: the sandbox modes, the approval, what the box may not reach
check-daemon-boot.shthe boot's floor — the report a stranger reads, named and stable
check-daemon-compact.shthe request projection — compaction as a lens, not a summary
check-daemon-delegation.shthe child contract: the envelope's shape, the budgets, the named ends
check-daemon-librarian.shthe librarian: one hunt, a manifest, the merge by slug
check-daemon-rails.shthe rails: fail-closed declarations, the credential report, --require-rails
check-daemon-release.shthe release shelf's routes and the file's measure
check-daemon-senses.shthe Senses journal
check-daemon-steer.shsteering at the safe checkpoint
check-daemon-profile.shthe turn's tool profile: the wire carries the flag
check-worker.shthe workforce state machine's grid
check-team-fixtures.shthe team's configuration corpus
check-standin.shthe stand-in: first sight, the posture's class rule
check-license.shthe offline entitlement verifier
check-store-roles.shone explicit store path per role
check-hygiene.shno shipped file names internal tooling; no credential fails before serving; the bearer is never argv

Not gates, and never in check-all:

ProgramWhat it is
check-all.shthe pool runner and the summary
check-size.shthe size report — list over 400, ~500 the soft target. A guideline
check-summary.shthe per-gate timing table for one run
check-stability.shis this a flake? — one gate N times from a single compile: check-stability.sh check-daemon-loop 50 --load 6
mutation-*.shthe proof that the gates can fail, each mutation run against exactly its own gate, in throwaway copies
smoke-*.shthe live runs: a real credential and a real socket. smoke-provider, smoke-daemon, smoke-files, smoke-find. Never in check-all

Proof

proof/ holds one document per unit, in order, from 01-contract.md to the highest numbered reading: what was claimed, what was proven, and which receipt proves it. The message grammar and the reasoning behind each shape is proof/01-contract.md; the wire's receipt is 02; determinism is 04; the tool-calling loop is 19; the file instruments 32; the search instruments 33.

probes/ is the other half: a reproduced question lives there with a five-week TTL and leaves or becomes a gate.

The one habit

[object Object]

A red gate is not a failure of the tool, it is a reading: the change is wrong, or the gate is, and which one is decided by reading the receipt — never by re-running until it goes green.