break-glass sweep: actually remove the block, and say so when it does not - #143
Merged
Merged
Conversation
…lure The sweep reused whatever local branch of the same name it found. A sweep branch holds one edit against what main declares, so a leftover from an earlier run makes a pull request whose diff is the inverse of its title, where the base has moved on and the stale branch reads as adding back the very grant the sweep means to retire. It succeeds and it lies, which is worse than the same bug in reconcile, where it at least failed. It now starts from the base every time, forces the push under the desk prefix guard for the reason reconcile does, and says so when a push fails instead of sending the next command off to fail for an unrelated reason. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013JoNB9iUGjsiwRAJvyZPrt
… not The sweep has never removed anything. It cd'd to the repository root and then called blocks and revoke_in_file, which resolve their paths from the access root, so the guard matched nothing, no block was ever revoked, and the sweep committed an empty tree and opened a pull request with no diff in it. It reported success every time, and the pull requests it left behind read as adding the very grant they were meant to retire, because a stale branch of the same name was being reused as the base. Three changes. The edit happens first, from the access root, so the helpers resolve. A file where nothing was still expired says so and opens nothing rather than filing an empty pull request. And a branch left over from an earlier sweep is deleted rather than reused, by deletion rather than by checking out a start point, because a switch with a start point rewrites every file in the tree including this script while bash is still reading it. Proven on the class stack. A grant whose expiry had passed, sitting on main, now produces a pull request that removes it, which is the opposite direction from a reconcile pull request and the whole distinction lesson 13 turns on. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013JoNB9iUGjsiwRAJvyZPrt
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.
The sweep has never removed anything, in any run, since it was written.
It
cds to the repository root and then callsblocksandrevoke_in_file, which resolve their paths from the access root. The guard matched nothing, no block was ever revoked, and the sweep went on to commit an empty tree and open a pull request with no diff. It reported success every time.Worse, the pull requests it left behind read as adding the grant they were meant to retire, because a stale branch of the same name was reused as the base and the base had moved on. A burndown pull request whose diff is the inverse of its title is the most dangerous shape in this repo.
Three changes. The edit happens first, from the access root, so the helpers resolve. A file where nothing is still expired says so and opens nothing. And a leftover branch is deleted rather than reused — by deletion rather than by checking out a start point, because a switch with a start point rewrites every file in the tree including this script while bash is still reading it.
Proven: a grant past its expiry sitting on
mainnow produces a pull request that removes it, which is the opposite direction from a reconcile pull request and the distinction lesson 13 turns on.🤖 Generated with Claude Code
https://claude.ai/code/session_013JoNB9iUGjsiwRAJvyZPrt