feat(gate): P7 No-Mistakes Gate adapter with authenticated merge delivery - #338
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
teseo
enabled auto-merge (rebase)
July 27, 2026 01:18
teseo
force-pushed
the
fm/combo-317-p7-gate
branch
2 times, most recently
from
July 27, 2026 06:59
fd7868d to
82d6a33
Compare
teseo
disabled auto-merge
July 27, 2026 07:02
teseo
force-pushed
the
fm/combo-317-p7-gate
branch
4 times, most recently
from
July 27, 2026 08:21
7cc08e3 to
194d10f
Compare
added 15 commits
July 27, 2026 09:21
…lthy heartbeats and produced no verdict; I’m making the single allowed retry against the same corrected diff.
…ents duplicate No-Mistakes delivery after a sealed outcome.
…y, with all seven Bash suites and lint green.
…n with durable per-run lease evidence and stale-owner recovery.
…tities before delivery, with all seven Bash suites and ShellCheck green.
…r successful No-Mistakes Gate outcomes, with all tests and lint green.
…rable one-time GitHub auto-rebase arming, with all seven Bash suites and lint green.
…otent final `merged` Gate outcome, with all tests and lint green.
…so Gate remains active until GitHub reports the exact candidate merged.
…quirements and exact-SHA app-aware check evidence, with all tests and lint green.
…authenticated GitHub CLOSED and disabled auto-merge states.
…exact-SHA required-check failures.
teseo
force-pushed
the
fm/combo-317-p7-gate
branch
from
July 27, 2026 08:23
194d10f to
9b6ea2c
Compare
added 5 commits
July 27, 2026 09:56
teseo
force-pushed
the
fm/combo-317-p7-gate
branch
from
July 27, 2026 11:09
747d32d to
202588b
Compare
teseo
force-pushed
the
fm/combo-317-p7-gate
branch
from
July 27, 2026 11:37
202588b to
b634388
Compare
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.
Intent
Fix all six P7 findings on candidate a9c5ecf in exactly one commit: enforce a top-of-loop bounded merge poll with nonnegative remaining time, one observation per iteration, and timeout only after the final observation; close stdin on merge-state gh reads; fail closed when a terminal merge outcome lacks its merge arm; retrieve all exact-SHA check-runs and commit statuses through gh api --paginate --slurp without a 100-item validator ceiling; make the fake gh API accurately accept and return slurped pagination while preserving the exact gate_ok(validated) product contract; and regress a merge completing exactly at the deadline edge. Keep operational data/ files out of the branch and publish fm/combo-317-p7-gate as one commit over a9c5ecf. Documentation is intentionally skipped because this is a corrective code-and-regression slice and the one-commit constraint must remain exact.
What Changed
bin/cb-gate.sh) implementing the full authenticated delivery pipeline: identity verification against the effective No-Mistakes config, host-global lease serialization with stale-owner recovery, exact-PR custody and verification, configurable manual/auto merge authority with one-time GitHub auto-rebase arming, bounded merge observation, durable GitHub-cancelled and required-check-failure evidence, and fail-closed terminal replay that prevents duplicate delivery after a sealed outcome.tests/gate-no-mistakes.test.sh) covering exact-PR custody, terminal replay, merge authority, auto-merge observation (immediate, delayed, deadline-edge), bounded wait with zero-poll handling, cancellation, and paginated check-runs evidence.--paginate --slurpcheck evidence without an arbitrary count ceiling, and a fail-closed guard when a terminal merge outcome lacks its merge arm.Risk Assessment
✅ Low: All six fixes are well-bounded, mechanically verified by structural tests, and preserve the existing product contract. No material defects, regressions, or ambiguous behavior were identified in the changed code.
Testing
Ran the two most relevant test suites (
test_arms_auto_merge_onceandtest_seals_github_terminal_outcomes, 22 tests total) covering all six P7 findings — bounded merge poll, stdin-close, fail-closed merge arm guard, paginated check evidence beyond 100 items, fake gh multi-page slurp, and deadline-edge merge recovery. All passed. Additionally verified the single-commit constraint, absence of data/ pollution, and each finding's source-level implementation through direct code inspection.Evidence: Test output: test_arms_auto_merge_once + test_seals_github_terminal_outcomes
Evidence: Test output: test_seals_github_terminal_outcomes
Evidence: P7 findings evidence report mapping each finding to source lines and test assertions
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
bin/cb-gate.sh- merge conflict rebasing onto origin/fm/combo-317-p7-gatetests/gate-no-mistakes.test.sh- merge conflict rebasing onto origin/fm/combo-317-p7-gate✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
tests/run.shbash tests/gate-no-mistakes.test.sh test_arms_auto_merge_once(11 tests — deadline-edge, paginated, zero-poll, bounded wait, immediate merge, interrupted recovery, loose policy, stale checks, partial checks, terminal replay, mismatched evidence replay)bash tests/gate-no-mistakes.test.sh test_seals_github_terminal_outcomes(11 tests — failed checks, closed PR, auto-merge cancelled, terminal replay, poisoned evidence, incorrect terminal schema replay)Manual verification: stdin</dev/nullon all merge-state gh reads (pr view,api --paginate --slurp,pr merge)Manual verification:fail_contract "Gate terminal merge outcome requires a merge arm" 73at bin/cb-gate.sh:1163Manual verification:git rev-list --count a9c5ecf..b634388== 1 (exactly one commit)Manual verification:git ls-tree --name-only b634388contains nodata/files⏭️ **Document** - skipped
Step was skipped.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.