rsr-template-repo Base ruleset repaired — and what still blocks, measured
Closes the #16 workstream. Ruleset 23218684 on hyperpolymath/rsr-template-repo
has been repaired per the owner's ruling. This issue records what was written,
what it fixed, what it did not fix, and one new finding.
What was written — two writes, guard satisfied rather than bypassed
The owner's earlier ruling was "apply the planner output", but the sanctioned
planner refuses on this ruleset:
scripts/plan-ruleset-constraint-repair.rb:31:in 'plan':
Missing pull-request protection (ArgumentError)
Ruleset 23218684 had no pull_request rule, and the planner requires one. The
owner chose to satisfy that precondition legitimately rather than hand-craft a PUT
around it:
| # |
Write |
Effect |
| 1 |
Add a pull_request rule, using the parameters from the committed config/rulesets/base.json verbatim |
Planner precondition satisfied; live ruleset moves toward the committed template |
| 2 |
Run the sanctioned planner (rc=0), then hand-trim code_scanning thresholds |
code_quality + code_coverage stripped; thresholds lowered |
Nothing routed around the guard. The planner validated the real post-write-1
live state, re-fetched from the API — it was not handed a locally-constructed
fiction.
Before → after:
BEFORE deletion, required_signatures, code_scanning,
code_quality, code_coverage, copilot_code_review
AFTER deletion, required_signatures, code_scanning,
copilot_code_review, pull_request
code_scanning thresholds, all three tools retained per the standing ruling
("keep all three tools, trim thresholds"):
CodeQL alerts_threshold: all → errors security_alerts_threshold: all → high_or_higher
Hypatia alerts_threshold: all → errors security_alerts_threshold: all → high_or_higher
Scorecard alerts_threshold: all → errors security_alerts_threshold: all → high_or_higher
⚠ Correction to a figure I published earlier
I previously said the trim would clear "10 of 17 alerts, leaving 1 error + 4 high".
Measured, that was wrong. The repo has 17 open alerts; by the severity field
that alerts_threshold actually keys on, they split 9 warning / 8 error. So
the trim cleared 9, and 8 remain blocking — not 5.
What still blocks, and why that is correct
All four open PRs are still BLOCKED. The causes are now fully measured, and they
are not the ruleset defect:
#193 and #192 — unsigned heads. Both head commits are
verified: false, reason: unsigned, and required_signatures is active. This
block is independent of content and would survive any change. Both PRs are also
fully superseded (every file byte-identical to main), so they are for closing,
not fixing.
#197 and #194 — real security findings. Both heads are verified: true/valid
and both have zero unresolved review threads, so required_signatures and
required_review_thread_resolution are satisfied. What remains is the
8 error-severity code-scanning alerts:
| Alert |
Tool |
Security severity |
Rule |
| 148 |
Scorecard |
high |
TokenPermissionsID |
| 66 |
Scorecard |
high |
CodeReviewID |
| 65 |
Scorecard |
high |
MaintainedID |
| 6 |
Scorecard |
high |
BranchProtectionID |
| 64 |
Scorecard |
medium |
SASTID |
| 63 |
Scorecard |
medium |
FuzzingID |
| 67 |
Scorecard |
low |
CIIBestPracticesID |
| 147 |
Hypatia |
— |
hypatia/root_hygiene/missing |
These are real findings and the gate is working. Per the standing instruction,
they are reported for triage — the trim was not widened further, and
code_scanning was not deleted to force green. A gate that blocks on genuine
findings is doing its job; the previous all threshold was the defect, because
9 warnings held the repo shut.
🆕 New finding — copilot_code_review may be a fifth unsatisfiable rule type
scripts/plan-ruleset-constraint-repair.rb:8 lists four retired types:
RETIRED = %w[update required_deployments code_quality code_coverage]
copilot_code_review is not among them, and it survived the repair. But
across the last 100 pull requests in this repository, Copilot has reviewed
zero of them:
coderabbitai 34
hyperpolymath 12
github-advanced-security 6
github-actions 2
Copilot 0 ← never, in 100 PRs
I have not established whether copilot_code_review actually blocks merge or
merely auto-requests a review. That distinction decides whether this is a fifth
unsatisfiable gate of the code_quality / code_coverage class or harmless
noise, and it should be settled before the estate-wide pass — the census found
this rule type on other repos too.
Deliberately not guessing: code_scanning's 8 error alerts are already a
sufficient explanation for #197/#194 being blocked, so Copilot's contribution
is currently undetermined, not ruled out.
Reproduction
gh api repos/hyperpolymath/rsr-template-repo/rulesets/23218684 > live.json
ruby scripts/plan-ruleset-constraint-repair.rb live.json # rc=0 after write 1
gh api "repos/hyperpolymath/rsr-template-repo/code-scanning/alerts?state=open&per_page=100" \
--paginate --jq '.[]|select(.rule.severity=="error")|[.number,.tool.name,.rule.id]|@tsv'
Acceptance criteria
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ji1bq3TypfycfUPAR7hSxR
rsr-template-repo
Baseruleset repaired — and what still blocks, measuredCloses the #16 workstream. Ruleset
23218684onhyperpolymath/rsr-template-repohas been repaired per the owner's ruling. This issue records what was written,
what it fixed, what it did not fix, and one new finding.
What was written — two writes, guard satisfied rather than bypassed
The owner's earlier ruling was "apply the planner output", but the sanctioned
planner refuses on this ruleset:
Ruleset
23218684had nopull_requestrule, and the planner requires one. Theowner chose to satisfy that precondition legitimately rather than hand-craft a PUT
around it:
pull_requestrule, using the parameters from the committedconfig/rulesets/base.jsonverbatimrc=0), then hand-trimcode_scanningthresholdscode_quality+code_coveragestripped; thresholds loweredNothing routed around the guard. The planner validated the real post-write-1
live state, re-fetched from the API — it was not handed a locally-constructed
fiction.
Before → after:
code_scanningthresholds, all three tools retained per the standing ruling("keep all three tools, trim thresholds"):
⚠ Correction to a figure I published earlier
I previously said the trim would clear "10 of 17 alerts, leaving 1 error + 4 high".
Measured, that was wrong. The repo has 17 open alerts; by the
severityfieldthat
alerts_thresholdactually keys on, they split 9 warning / 8 error. Sothe trim cleared 9, and 8 remain blocking — not 5.
What still blocks, and why that is correct
All four open PRs are still
BLOCKED. The causes are now fully measured, and theyare not the ruleset defect:
#193 and #192 — unsigned heads. Both head commits are
verified: false, reason: unsigned, andrequired_signaturesis active. Thisblock is independent of content and would survive any change. Both PRs are also
fully superseded (every file byte-identical to
main), so they are for closing,not fixing.
#197 and #194 — real security findings. Both heads are
verified: true/validand both have zero unresolved review threads, so
required_signaturesandrequired_review_thread_resolutionare satisfied. What remains is the8 error-severity code-scanning alerts:
TokenPermissionsIDCodeReviewIDMaintainedIDBranchProtectionIDSASTIDFuzzingIDCIIBestPracticesIDhypatia/root_hygiene/missingThese are real findings and the gate is working. Per the standing instruction,
they are reported for triage — the trim was not widened further, and
code_scanningwas not deleted to force green. A gate that blocks on genuinefindings is doing its job; the previous
allthreshold was the defect, because9 warnings held the repo shut.
🆕 New finding —
copilot_code_reviewmay be a fifth unsatisfiable rule typescripts/plan-ruleset-constraint-repair.rb:8lists four retired types:copilot_code_reviewis not among them, and it survived the repair. Butacross the last 100 pull requests in this repository, Copilot has reviewed
zero of them:
I have not established whether
copilot_code_reviewactually blocks merge ormerely auto-requests a review. That distinction decides whether this is a fifth
unsatisfiable gate of the
code_quality/code_coverageclass or harmlessnoise, and it should be settled before the estate-wide pass — the census found
this rule type on other repos too.
Deliberately not guessing:
code_scanning's 8 error alerts are already asufficient explanation for #197/#194 being blocked, so Copilot's contribution
is currently undetermined, not ruled out.
Reproduction
Acceptance criteria
copilot_code_reviewblocks merge; if it does, add it toRETIREDand re-run the repair.high: token permissions, code review, maintained, branch protection).🤖 Generated with Claude Code
https://claude.ai/code/session_01Ji1bq3TypfycfUPAR7hSxR