Repository navigation
prove-it-ship-gate: the same-command rule reads only the current edit cycle - #1405
Draft
EdbertChan wants to merge 1 commit into
Draft
EdbertChan wants to merge 1 commit into
EdbertChan wants to merge 1 commit into
Conversation
… cycle The rule collected every product command the session ever ran, so after an edit followed by a test run it demanded reruns of programs from hours earlier and never cleared. It now reads the commands between the previous file edit and the last one (subagent transcripts stay whole), so the demand names the repro of this edit only. Co-Authored-By: Claude Fable 5.1 <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.
Summary
The ship gate has a rule: an edit checked only by a test runner must be followed by a rerun of the real product command.
The problem: the rule gathered every product command the session had ever run, so a long session got an unclearable demand for unrelated programs on every reply.
The fix: the rule now reads only the commands between the previous file edit and the last one. Subagent transcripts beside the session still count whole.
Review Claim
The same-command rule names only the repro of the current edit cycle, so a long session no longer accumulates every program it ever ran into one demand.
Review Lane
behavior
Review Unit
engine-runtime
Safety Invariant
The change only narrows which commands the rule asks for. The hook still never edits files or runs commands, the fail-open path on an unreadable transcript is untouched, and a new test fails before and passes after.
Slice Rationale
One rule in one hook. The earlier surface-key false positive (shell assignments read as programs) is a separate claim and stays in its own PR.
Non-goals
Measured
Command:
source scripts/test/hermetic_env.sh; python3 -m unittest discover -s engine/hooks/prove-it-ship-gate/tests -p "test_*.py"with this commit's tests, against the parent'sdetect.py(base) and this commit's (head).Ran 41 tests, FAILED (failures=1)(the new test: the demand still namedinvoker-cli doctorfrom the earlier edit cycle)Ran 41 tests, OKOn a real transcript where the old rule listed 12 unrelated programs on every reply,
same_repro_gap()with the new rule returns[].Test Plan
Test Plan
source scripts/test/hermetic_env.sh; python3 -m unittest discover -s engine/hooks/prove-it-ship-gate/tests -p "test_*.py"-> Ran 41 tests, OKpython3 scripts/ci/check_hook_test_coverage.py engine/hooks/prove-it-ship-gate-> check_hook_test_coverage: OK (1 hook(s) checked)python3 engine/skills/make-pr/scripts/preflight.py --base origin/main --commit-only --dry-run-> ok preflight passedRevert Plan
Revert Plan
git revert <merge commit of this PR>🤖 Generated with Claude Code