chore(release): enforce v* tag-ruleset drift check (flip TAG_RULESET_ENFORCED)#1129
Merged
Merged
Conversation
…ENFORCED) The v* tag-creation ruleset was applied by admin on 2026-07-10 (id 18774756 `v-tag-restricted`; active, include refs/tags/v*, creation rule, bypass User:57046 only — the release-finalize identity, confirmed not a broad role). With the ruleset live and its bypass list confirmed, flip TAG_RULESET_ENFORCED False->True so a future regression (ruleset deleted/inactive/ref-narrowed/ creation-rule-dropped/bypass-emptied) becomes a BLOCKING drift finding in release-canary.yml's ruleset-drift job instead of a non-blocking warning. The single constant drives both layers: ruleset_review_enforcement.main() and ruleset_drift_check.tag_creation_findings() (which imports it as the enforce_tag_rule default). Verified against the live rulesets: the predicate still returns OK / exit 0, so the canary stays green; enforcement only arms on a future regression. - Fill the runbook's tag live-state note with the applied ruleset id/conditions (the precondition the flag comment requires before flipping). - Update the three tests that pinned the WARN-until-applied default to the enforced default, preserving warn-mode coverage via explicit enforce_tag_rule=False / monkeypatched overrides. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
joeharris76
enabled auto-merge (squash)
July 10, 2026 23:47
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.
Pull Request
Description
Flip
TAG_RULESET_ENFORCEDFalse→Truenow that thev*tag-creationruleset is live. Admin applied
v-tag-restricted(id18774756) on2026-07-10:
active,conditions.ref_name.include=[refs/tags/v*], acreationrule, andbypass_actors=[User:57046 (always)]— therelease-finalize identity only, confirmed not a broad Write/Admin role (so
make release-finalize'sgit push origin v$(VERSION)still succeeds).The single constant in
_project/scripts/ruleset_review_enforcement.pydrivesboth consumers: the standalone predicate
main()andscripts/ruleset_drift_check.py:tag_creation_findings(), which imports it asthe
enforce_tag_ruledefault. Flipping it turns a missing/incompletev*tag ruleset from a non-blocking
WARNINGinto a blocking finding inrelease-canary.yml's ruleset-drift job — so a future regression (rulesetdeleted, made inactive, ref narrowed,
creationrule dropped, or bypassemptied) fails CI instead of merely warning.
This does not change enforcement of the tag ruleset itself (GitHub already
enforces it); it arms the drift detector to treat a regression as blocking.
Type of Change
Testing
pytest tests/unit/release/ tests/unit/test_ruleset_drift.py tests/unit/test_release_infrastructure.py— 104 passed.flag flipped:
Tag-creation ruleset - OK, exit 0 — confirms the canarystays green and enforcement only arms on a future regression.
Public Contract Check
docs/reference/public-contracts.md, or this PR does not changepublic, beta-public, deprecated, generated, experimental, or repo-only
contract surfaces. (No contract surface changed — internal release-tooling flag.)
status, wrapper facades, adapter subclassing hooks, and generated docs for
contract-map impact. (None affected.)
registry metadata, or explicitly marked editorial/non-authoritative. (N/A.)
Documentation
live-state note in
docs/operations/repo-admin-settings.md— theprecondition the flag comment requires before flipping.)
Code Quality
Notes for reviewer
main→releaserename): none. chore: rename release branch main->release in-repo (w1-w4) #1027 editsscripts/ruleset_drift_check.pyand the branch-rename prose inrepo-admin-settings.md; this PR edits_project/scripts/ruleset_review_enforcement.py,the test file, and the tag live-state note block (lines are disjoint from
chore: rename release branch main->release in-repo (w1-w4) #1027's runbook hunks), so no overlapping conflict.
DEVELOP_REVIEW_RULE_ENFORCEDflip is intentionally notincluded here — it lives in
scripts/ruleset_drift_check.py, which chore: rename release branch main->release in-repo (w1-w4) #1027also edits, so it should ride chore: rename release branch main->release in-repo (w1-w4) #1027 or land after it to avoid a conflict.
🤖 Generated with Claude Code