Repository navigation
fix(governance): preserve writable ruleset controls on updates - #105
Conversation
|
Reviewed head: A fresh-context independent reviewer inspected the complete eleven-file change through Finding and disposition:
Validation evidence:
The compatible writable PR/CI fields remain preserved, unknown or conflicting restrictions fail closed, and no live settings were changed. The remaining configured policy and retirement proposals are not owner-authorized applies. This receipt attests to the exact reviewed source and stated local evidence; remote CI, current branch freshness, unresolved PR threads, and live readiness require their separate checks. |
Dependency Review✅ No vulnerabilities or license issues found.Scanned FilesNone |
|
🎉 This PR is included in version 2.26.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
Ordinary ruleset updates currently replace live payloads with templates that omit writable GitHub PR/CI controls, while equivalent state still produces redundant writes. Preserve the reviewed compatible controls, reject unknown restrictions, and plan updates only for real managed-policy drift.
Implementation / behavior
lib/ruleset-policy.jq. Normalize the ignoredOrganizationAdmin.actor_id, supported array ordering, and the existing reviewed compatible API extensions.required_reviewers, all threeallowed_merge_methods,require_extra_approval_for_unattributed_changes: true, anddo_not_enforce_on_create: falsein replacement payloads. Other extension values, unknown fields, and additional rules such as deployment gates require manual review instead of being discarded.current_user_can_bypasswithout weakening that full-document fence. Existing specialized security-restoration fences remain in place and its compatible CI field is preserved.The inspected inventory's publisher plan drops from 50 to 8 proposed operations, eliminating 21 redundant repository PATCHes, one workflow-permissions PUT, and 20 equivalent ruleset PUTs. The remaining proposals cover Pathfinder defaults/CI, Playtester queue/CI, two shared scope changes, and two configured stale-rule retirements. The separate repository-properties proposal is outside this count.
Validation
git diff --check; lint ran in the pinned build image with read-only source and no network.bbf4aa63d2dda1aabde3b93155cd6165091e4215. The review's P2 concerning response-only bypass metadata was fixed and covered by KEEP, PUT, and concurrency regression cases.Limitations / follow-up
No live settings were changed by this work. None of the eight proposals, the separate properties change, or the configured retirements has current owner authorization for application. Review fresh identities, payloads, producer evidence, and ordering before any separately authorized apply.
The final reread detects observed races; it is not an atomic API compare-and-swap. The final-head plan replay uses captured responses, not a second live read. Remote CI and live PR readiness remain separate delivery gates.