Application map / References / Push gate
The Push Gate (no-mistakes)
The operating model for the nine-step pre-share validation pipeline that gates every substantive push to the product monorepo.
Posture: prefer mature, proven mechanisms (GitHub branch protection, managed runners, launchd, upstream configuration) over custom glue. Optimize for correctness-gate value per wall-clock hour, not for making the pipeline merely feel fast.
Provenance note: the corpus doc this page replaces deferred its "present state" to a NoMistakesNow.md that never existed — that pointer dangled from the start. This page is the operating doc; run records live with the tool.
What it is
A locally-installed git-push gate: pushing a branch to it intercepts the push and runs a nine-step serial pipeline before the change reaches the shared remote as a PR. It is the sole correctness gate for the two-app monorepo and it catches real defects across parallel agent-driven branches.
Behavioral properties that shape everything else
- A clean end-to-end run is inherently bounded at roughly half an hour to an hour of step work — multi-hour "hangs" are stalls, not normal runs.
- Gate model: with review auto-fix disabled, review findings park the run at an approval gate; a run never advances past a gate on its own.
axi runandaxi respondblock by design until the next gate,checks-passed, or a terminal outcome — there is no webhook or notification mechanism. - The CI step babysits the open PR after checks pass, re-arming an idle timeout whenever the base branch advances; the lingering "running" status after
checks-passedis cosmetic. - The CI monitor treats any failing check as fixable (log-collect → fix agent in a worktree → force-push-with-lease, bounded attempts); there is no per-check ignore list, so a chronically red check burns every attempt.
- There is no built-in agent watchdog: a hung agent stays hung until something kills it.
rerunreuses nothing; re-pushing a branch supersedes its active run;axi abort --run <id>reaps an orphaned monitor from anywhere. Gates are answered from a checkout on the run's branch.
The operating model
- CI executes exactly once. The mirrored second CI system's workflows are deleted; GitHub Actions is the single orchestrator. Managed runners participate as runners (a label swap that keeps check names), never as a second CI system.
- Cadence: one run per PR-ready branch push. Not per commit (runs cost tens of minutes and a re-push supersedes anyway) and not per merge (nothing new exists at merge time). "Every merge is validated" is enforced by branch protection on main — required checks, PRs required, no direct pushes — a mature GitHub feature, not glue. Both workflows drop their
paths:filters on PR triggers so every required check reports on every PR (a required check that never reports blocks the merge forever).
Monitoring is two layers
- The driving protocol for the live session: start with a rich
--intent; poll status non-blocking; on a parked gate, respond — fixing findings you can judge and escalatingask-userfindings to a human (the permission layer blocks agents from self-answering them); treatoutcome: checks-passedas done — report the PR link and hand the merge to the human, never wait for the merge. - The structural backstop: a launchd babysitter, session-independent, that reaps hung CI-fix agents (safe — the kill burns one retry attempt) and surfaces parked runs and hung non-CI steps for a human/agent decision. This babysitter is deliberately the only custom glue in the design.
Configuration and deliberate redundancy
- Configuration: bounded idle CI timeout; review auto-fix disabled (findings are judgment calls); fully unattended
--yesruns only on explicit per-conversation consent; concurrent runs on different branches allowed. - Deliberately kept: local test/lint duplicating CI (catching before sharing is the point), the document step, and a redundant independent build signal as an honest cross-check.
- The test step is provisioned, not improvising: deterministic step commands from committed pipeline config, real credentials at runtime through the machine-authed secrets manager, the proven test framework as both test framework and browser tool, and standing guidance inlined verbatim into every pipeline agent (injection is the only reliable channel — "see the other file" pointers are weak links).
Stall taxonomy (how to read a "hung" run)
| Looks like | Actually is | Owner |
|---|---|---|
| Running for hours, no progress | A genuinely hung fix agent — no built-in watchdog will unwedge it | Babysitter kills CI-fix agents; humans/agents abort-then-rerun other steps |
| Stuck at "awaiting response" | A gate parked waiting for a respond nobody is giving | Whoever picks it up drives it; babysitter surfaces it |
| A terminal that never returns | A blocking client process left behind by an ended session — the run itself kept working | Kill the client; the daemon runs rounds in the background |
| "Running" long after green | The post-checks-passed babysit window — cosmetic | Nobody; merge the PR and the monitor retires |