overview / rules / push-gate
push-gate
Tests must be green before push.
what it refuses, and what it lets through
push gate — if your laws demand green tests before a push, rabadon runs the suite itself at push time and decides on the real result, never on a claim.
From README.md.
push gate: rabadon runs the project's own suite here and opens the gate on the real result.
From the comment in native/gate_pre.h above the code that decides it.
pushGate — if run is declared, rabadon executes that literal command itself at push time and decides on the real result. why is the law, timeoutSec bounds it.
From docs/guard.md.
A pushGate with testPassPattern
Hold every push until the real suite is green:
{
"testCommand": "npm\\s+test",
"testPassPattern": "Tests:\\s+\\d+\\s+passed",
"pushGate": {
"why": "no push while the suite is red",
"run": "npm test",
"timeoutSec": 600
}
}
At push time rabadon runs npm test itself, checks the real output against testPassPattern, and refuses the push if it is not green. It never trusts the agent's claim that tests pass.
the refusal, as the agent reads it
rabadon BLOCKED this action.
Rule: push-gate — tests must be green before push
code was edited after the last passing test run — run the test suite first
Adjust the approach instead of retrying the same action.
(only the user can override this: they may add "push-gate" to disabled[] in .rabadon/guard.json or run `rabadon off`. If this rule looks wrong for the task, stop and ask the user; do not switch supervision off yourself.)
rabadon BLOCKED this action.
Rule: push-gate — tests must be green before push
rabadon ran the tests itself (<pushGate.run>) — it exited 0 and RAN NO TESTS.
<tail of the run>
An empty run is not a green run. Point pushGate.run at a command that executes the suite.
Adjust the approach instead of retrying the same action.
(only the user can override this: they may add "push-gate" to disabled[] in .rabadon/guard.json or run `rabadon off`. If this rule looks wrong for the task, stop and ask the user; do not switch supervision off yourself.)
rabadon BLOCKED this action.
Rule: push-gate — tests must be green before push
rabadon ran the tests itself (<pushGate.run>) — NOT GREEN.
<failing lines of the run>
Fix the failure; rabadon will re-run the suite on your next push attempt.
Adjust the approach instead of retrying the same action.
(only the user can override this: they may add "push-gate" to disabled[] in .rabadon/guard.json or run `rabadon off`. If this rule looks wrong for the task, stop and ask the user; do not switch supervision off yourself.)
Rendered from the strings in native/gate_pre.h, the rule and the envelope (Judge::refuse) both. A word in <angle brackets> is filled in from the command at the moment it is refused.
in watch mode the same verdict is recorded, and nothing is stopped
rabadon (watch) would have blocked this.
Rule: push-gate — tests must be green before push
code was edited after the last passing test run — run the test suite first
Nothing was stopped. `rabadon on` makes this a real refusal.
switching it off
Only the user can switch it off, by id, in the project's guard:
{ "disabled": ["push-gate"] }
or by pausing supervision with rabadon off, which records the change. Every other rule keeps running.
in the field
12 of the 778 records in the published field dataset (field.jsonl, 2026-07-27 to 2026-08-26) carry this id. STOP is a refusal in enforce mode; WOULD_BLOCK is the same verdict recorded in watch mode, where nothing is stopped.
| event | records |
|---|
| STOP | 7 |
| WOULD_BLOCK | 5 |
Counted from field.jsonl, the file the field page is built from.