PROP-3: durable-at-propose via a bounded push to prop/* refs only - #6
Merged
Conversation
…p-refs-only Analysis recorded at propose time, status AWAITING IMPLEMENTATION. Implementation, if any, happens on prop/3 behind a human merge.
Implemented by `quantlab implement`. Gates: all passed. Merge is human-only: Daniel merges via PR after Quant Lead review.
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.
Implemented through the pipeline. Proposal + full implementation report in
docs/proposals/PROP-3-*.mdon this branch.The gap PROP-3 closes. PROP-2 made the proposal durable by committing it at propose time — but only locally. Under protect-main that commit can never reach
origin, so a proposal written and never implemented still had no off-machine trace. Demonstrated live during this very run:proposereportedcommitted 540b1cc on main, a commit that is unpushable by construction.The change.
proposecommits where it is (unchanged), then pointsprop/{n}at that commit and pushes it — durable on the remote the moment the analysis is made.assert_prop_refis the single chokepoint and raisesUnsafePushTargetfor anything outsideprop/*, including the traversal caseprop/../mainthat a prefix check alone would accept.implementopens the PR once every gate passes — the first moment "please merge this" is meaningful. A red branch stays a branch: pushed as evidence, not queued.implementnow joins an existingprop/{n}instead ofcheckout -Bresetting it, which would have discarded propose's commit and then failed to push as a non-fast-forward.The guard test. A recording runner captures every git invocation and executes none. For nine unsafe targets (
main,origin/main, ``,prop/, `prop/../main`, `refs/heads/main`, `prop/3:main`, `prop/3 --force`, `propose/3`) it asserts both that `UnsafePushTarget` is raised and that the recorder captured exactly zero invocations — making "before any git call" an observable property rather than a claim about statement ordering a refactor could silently invert.Also fixed: the no-auto-merge source test now strips docstrings via
astinstead of a line/split heuristic. It was flagging the phrasegh pr mergeinside a function docstring explaining that no such call exists — a test firing on its own subject's documentation. Re-verified non-vacuous: it still catches both a directgit mergeand agh pr merge --auto.Gates: ruff PASS, mypy PASS, pytest 691 PASS. Frontend and verify-dist correctly SKIPPED.
Bootstrap note: this run could not open its own PR —
implementhad already imported the pre-patch module — so this PR was opened by hand. From PROP-4 onwardimplementopens it. Stacked on #5 (docs).Merge is human-only; the required CI check must be green first.