Repository navigation
feat(ready): judge whether a change is finished before it is pushed (0.2.17) - #146
Merged
Merged
Conversation
…0.2.17) `bouncer ready` reads the commits ahead of the base branch and asks four questions in two sets: of the whole change, whether the messages describe it and whether behaviour changed with no test; of each file, whether a debugging statement or an unfinished marker was added. Countable facts are computed and handed over as fields. It observes: exit 0 unless --enforce, and never a hold on its own failure. It sends commit messages and diff text to the backend after redaction, which the gate never does, and lists every file it did not read. Real runs go to readiness.jsonl with the head commit, for a later comparison with CI. A consumer of the engine, not a part of it: plain items for the item state builder and a policy file of its own (policy/push.yaml). Refs #93 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found by running the check on its own change: the debug_leftover fixtures are lines of console.log, and the question fired on the file at 0.96. Refs #93 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A push-readiness check (#93): the first consumer built for what a judgment model is for, taking a review pass off a reasoning model, and not for the safety gate.
What it does
Reads the commits ahead of the base branch and asks four questions in two sets (
policy/push.yaml):pushmessage_mismatch,untested_behaviourpush_filedebug_leftover,unfinishedPrints
READY, orHOLDwith the file and the question that fired, in the question's own words./bouncer:readyis the slash command for it.How it is built
src/io/git.tsreads the change,src/push.tsturns it into plain items for the existingitemstate builder, andsrc/commands/ready.tsruns the existing judge runner over two policy sets. Nothing belowsrc/commands/learns what a push is.calibratescores these questions andmeasurecan compare them with a reasoning model with no new code.tests_changed,docs_only, line counts and file kinds are fields. The model is asked only what is left over, per the classifier's documented limits.Behaviour worth reviewing
--backend mocksends nothing.--enforce, where a HOLD exits 1.--enforce.readiness.jsonlin the data directory: head commit, verdict, answers, no diff text. Mock runs are not recorded.Evidence, and its limits
jev-1.13.0, answers committed): the verdict matched the label on 25 of 26. The miss is a commit called "tidy the upload settings" that changes two behavioural constants;untested_behaviourread 0.31. Left as a miss rather than tuned until one fixture passed.docs/calibration/2026-10-12-push-1.md.debug_leftoverfired at 0.96 onfixtures/push-file.jsonl, whose contents areconsole.loglines. Fixed in the second commit by treating fixture and test-data directories as a path fact. Second run:READY, having read 8 of 20 files. The other 12 are listed, includingtest/ready.test.tsand the bundle, which are too long for one item.readiness.jsonlagainst CI is for.Checks
bench --againstthe base bundle, six paired runs: medians −0.9 to +0.6 ms on a noisy machine. Bundle 543.5 → 558.2 KB (The hook pays for CLI-only code: bundle size is now a measurable per-call cost #134).policy/default.yaml.Refs #93
🤖 Generated with Claude Code