Repository navigation
Govern ref updates outside refs/heads/ - #25
Closed
Deep-Sixed wants to merge 1 commit into
Closed
Deep-Sixed wants to merge 1 commit into
Deep-Sixed wants to merge 1 commit into
Conversation
Claims only coordinate branches, so tags, notes, and custom refs could be created or moved with no governance at all. The predecessor Codex_Kernel gate only accepted refs/heads/ updates; this restores that boundary in QuorumGit's approval model. - Any update to a ref outside refs/heads/ is a non_branch_ref_update and needs an approval bound to the exact update (protected, delete, and force still take precedence as operation types). - `repo namespace open|close|list` lets a repository opt a namespace such as refs/tags/ out of that rule. refs/heads/ cannot be opened; deletes, forced moves, and explicitly protected refs stay governed. Changes are audited. Migration 004_open_ref_namespaces.sql adds the table. - `approve request --push` resolves non-branch refs without peeling, so an annotated tag's operation names the tag object the hook sees. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mc44WsAZx9hzZdWEihDk5a
Owner
Author
|
Closing as superseded by #23, now on The one difference: this PR let a push to a non-allowed namespace through with an exact approval, while Generated by Claude Code |
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.
4 of 4 restoring ideas from the retired Codex_Kernel repo. This is a draft, stacked on #22. It will be rebased onto
mainonce #10 merges, because #10 rewrites the same gate code. At that point the migration will also be renumbered, sincemainnow has its own004_approval_authority.sql.Problem
Claims only coordinate
refs/heads/*. Anything else a push creates or moves (a tag, a note, a customrefs/…ref) went through ungoverned unless it was explicitly protected, deleted or force-moved. Codex_Kernel's gate only acceptedrefs/heads/updates.Change
governed_operation: an update to a ref outsiderefs/heads/is anon_branch_ref_update, and needs an approval bound to the exact update. Protected, delete and force operations still take precedence as the operation type.quorumgit repo namespace open|close|list <repo> <refs/prefix/>lets a repository open a namespace, for examplerefs/tags/for release tooling. Updates there then skip the rule.refs/heads/can't be opened.004_open_ref_namespaces.sqlstores the list.approve request --pushdoesn't peel non-branch refs down to a commit. An annotated tag's derived operation therefore names the tag object, which is what the hook sees.Tests
tests/test_ref_namespaces.pyadds 11 tests:tests/test_authorization_binding.py: the list of migrations expected after001now includes004.Local results:
pytest165 passed,ruffclean,pyright0 errors.🤖 Generated with Claude Code
https://claude.ai/code/session_01Mc44WsAZx9hzZdWEihDk5a
Generated by Claude Code