You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Applied: 11/11 repos in the org enforce it right now (.github, .github-private, bmad-bgreat-suite, broodminder-export, broodly, google-app-scripts, markets, incubator, TalkTerm, ContentTwin, repo-template)
That is the whole check, plus check_ruleset_bypass_actors and check_legacy_rulesets. So today:
Anyone can flip required_review_thread_resolution to false on any repo — or drop require_code_owner_review, or lower required_approving_review_count to 0 — and compliance still passes, because a ruleset named pr-quality still exists.
The codified standard and live reality can diverge arbitrarily and silently. apply-rulesets.sh converges a repo when you run it; nothing detects drift between runs. This is the known "pr-quality drift" follow-up from the #575 relocation, never filed until now.
It is also, again, the shape #755 keeps surfacing: a green check that proves less than it appears to. "Rulesets: ✅" reads as "the ruleset is correct". It means "a ruleset with that name exists."
Scope — every parameter, not just this one
Drift is currently invisible for all of pr-quality.json and code-quality.json:
required_review_thread_resolution
required_approving_review_count
require_code_owner_review
dismiss_stale_reviews_on_push
require_last_push_approval
allowed_merge_methods
required_status_checks (code-quality)
Task
Extend check_rulesets in scripts/compliance-audit.sh to compare each live ruleset against its codified source in standards/rulesets/*.json and raise a finding per drifted parameter.
Normalisation is the hard part, and where this will go wrong. The API returns fields the codified JSON does not carry (id, source, source_type, created_at, _links, actor ids), key order differs, and some parameters are returned only when set. Compare the parameters we codify — do not diff whole blobs and report noise. Getting this wrong means either false findings on every repo (and the audit gets ignored) or a comparison so loose it detects nothing.
The ask, and the correction
The request was to "implement and enforce
required_review_thread_resolutionorg-wide, documented and rolled out via the compliance mechanism."It is already implemented and already rolled out. Verified today:
standards/rulesets/pr-quality.json:28→"required_review_thread_resolution": true.github,.github-private,bmad-bgreat-suite,broodminder-export,broodly,google-app-scripts,markets,incubator,TalkTerm,ContentTwin,repo-template)scripts/apply-rulesets.sh, which reads the codified JSON and converges each repo (per-repo replication is deliberate — org-level rulesets need a Team plan and this org is Free; Consolidate per-repo replicated rulesets → native org-level rulesets (when on GitHub Team) #611 tracks that).Two consequences worth stating plainly:
.githubwhen feat: implement issue #756 — Provision <id>:hands-off labels so persona opt-out actually works #757 merged with a known defect. The bug there (PR comments from maintainers are mechanically inert — they neither block merge nor reach dev-lead .github-private#1290) is that issue comments create no thread at all, so thread resolution never applies to them. Turning on a setting that is already on fixes nothing.The real gap this exposed
check_rulesetsverifies a ruleset EXISTS BY NAME. It never compares its contents to the codified JSON.That is the whole check, plus
check_ruleset_bypass_actorsandcheck_legacy_rulesets. So today:The codified standard and live reality can diverge arbitrarily and silently.
apply-rulesets.shconverges a repo when you run it; nothing detects drift between runs. This is the known "pr-quality drift" follow-up from the #575 relocation, never filed until now.It is also, again, the shape #755 keeps surfacing: a green check that proves less than it appears to. "Rulesets: ✅" reads as "the ruleset is correct". It means "a ruleset with that name exists."
Scope — every parameter, not just this one
Drift is currently invisible for all of
pr-quality.jsonandcode-quality.json:required_review_thread_resolutionrequired_approving_review_countrequire_code_owner_reviewdismiss_stale_reviews_on_pushrequire_last_push_approvalallowed_merge_methodsrequired_status_checks(code-quality)Task
Extend
check_rulesetsinscripts/compliance-audit.shto compare each live ruleset against its codified source instandards/rulesets/*.jsonand raise a finding per drifted parameter.Constraints
apply-rulesets.shretired for diverging from the standard. Readstandards/rulesets/pr-quality.jsonandcode-quality.json.id,source,source_type,created_at,_links, actor ids), key order differs, and some parameters are returned only when set. Compare the parameters we codify — do not diff whole blobs and report noise. Getting this wrong means either false findings on every repo (and the audit gets ignored) or a comparison so loose it detects nothing."pr-quality drifted"is not actionable at fleet scale.add_findingshape and thestandards/github-settings.md#...doc anchors.apply-rulesets.shis the applier, and keeping them separate is the design.Files that exist today (verified)
scripts/compliance-audit.sh—check_rulesets()at ~line 498;check_ruleset_bypass_actors,check_legacy_rulesetsalongside itstandards/rulesets/pr-quality.json,standards/rulesets/code-quality.json— the codified source of truthscripts/apply-rulesets.sh— the applier that converges to those filestest/scripts/compliance-audit/— the bats suite (run by.github/workflows/compliance-audit-tests.yml)standards/github-settings.md— the doc anchors findings point atAcceptance criteria
pr-qualityruleset hasrequired_review_thread_resolution: falseproduces a compliance finding naming the parameter, expected, and actual.required_approving_review_countand a droppedrequire_code_owner_review.code-quality'srequired_status_checksis detected.test/scripts/compliance-audit/for: in-sync (no finding), each drifted parameter (finding), and fetch failure (finding).shellcheck --severity=warning -x scripts/compliance-audit.shclean.standards/github-settings.mdstates that ruleset contents are audited, not just presence.Ground truth