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
Ruleset pr-quality parameter require_last_push_approval has drifted from the codified standard: expected true, actual false. The codified JSON (standards/rulesets/pr-quality.json) is the source of truth (#575/#580); run scripts/apply-rulesets.sh --repo petry-projects/broodly to converge.
The codified remediation script scripts/apply-rulesets.sh already sets the pr-quality ruleset parameter require_last_push_approval: true, matching the standard's source of truth. The live-GitHub convergence itself is performed by the org admin apply script (petry-projects/.github) outside this repo's PR flow and requires an administration:write token. The in-repo deliverable is a regression test that guards the codified pr-quality parameters so the script can never silently drift from the standard again — mirroring the existing guard tests/scripts/apply-repo-settings.test.sh for the sibling settings script.
Implementation Checklist
Add tests/scripts/apply-rulesets.test.sh — runs scripts/apply-rulesets.sh in --dry-run --force with a mocked gh CLI and asserts the codified pr-quality payload sets require_last_push_approval: true plus the other codified pull_request parameters (required_approving_review_count: 1, dismiss_stale_reviews_on_push: true, require_code_owner_review: true, required_review_thread_resolution: true).
Tests to Write
tests/scripts/apply-rulesets.test.sh — regression guard for pr-quality ruleset parameters (drift demonstrated by temporarily flipping the value to confirm the test fails, then restoring).
Test Command
bash tests/scripts/apply-rulesets.test.sh (plus bash tests/scripts/apply-repo-settings.test.sh and bash .dev-lead/scripts/dev-lead-lint.sh for full verification)
Confirmed the codified remediation script scripts/apply-rulesets.sh already sets the pr-quality parameter require_last_push_approval: true (line 104), matching the standard's source of truth.
Added tests/scripts/apply-rulesets.test.sh — a regression guard for the codified pr-quality ruleset parameters, mirroring the existing tests/scripts/apply-repo-settings.test.sh pattern.
TDD: demonstrated the guard fails when the codified value drifts to false, then confirmed it passes with the correct true.
Note on scope
The live-GitHub ruleset convergence (expected true, actual false) is applied by the org admin script in petry-projects/.github via scripts/apply-rulesets.sh --repo petry-projects/broodly, which requires an administration:write token and is out of band for this repo's PR flow. This repo's contribution to compliance is the codifiedapply-rulesets.sh, which was already correct. The added test prevents the codified source from silently drifting from the standard in the future.
Test Results
===== RED (temporarily flipped codified value to false) =====
not ok - codifies pr-quality param "require_last_push_approval": true (output missing: "require_last_push_approval": true)
FAIL — see assertions above
===== GREEN (codified value restored to true) =====
ok - emits the pr-quality ruleset
ok - codifies pr-quality param "require_last_push_approval": true
ok - codifies pr-quality param "required_approving_review_count": 1
ok - codifies pr-quality param "dismiss_stale_reviews_on_push": true
ok - codifies pr-quality param "require_code_owner_review": true
ok - codifies pr-quality param "required_review_thread_resolution": true
---
PASS — 6 assertion(s) passed
===== sibling regression (tests/scripts/apply-repo-settings.test.sh) =====
PASS — 7 assertion(s) passed
===== .dev-lead/scripts/dev-lead-lint.sh =====
[lint] shellcheck on 2 file(s)...
[lint] validating CODEOWNERS...
OK: CODEOWNERS
[lint] all checks passed
===== shellcheck --severity=warning -x tests/scripts/apply-rulesets.test.sh =====
shellcheck-clean
Files Changed
tests/scripts/apply-rulesets.test.sh (new): Runs scripts/apply-rulesets.sh in --dry-run --force with a stubbed gh CLI and asserts the codified pr-quality payload sets require_last_push_approval: true plus the other codified pull_request parameters.
Notes
No production code changed; scripts/apply-rulesets.sh was already compliant and remains byte-for-byte unchanged.
The new shell test is a standalone guard (runnable via bash tests/scripts/apply-rulesets.test.sh), consistent with the sibling apply-repo-settings.test.sh, which is likewise not wired into the jest/go CI jobs.
Phase 2 TDD was demonstrated by temporarily flipping the codified value; the flip was reverted before completion.
Lock in the codified pr-quality ruleset standard by adding regression tests that assert scripts/apply-rulesets.sh sets require_last_push_approval: true, so this repo's codified source-of-truth mirror can never silently drift back to false.
Findings
The live GitHub pr-quality ruleset has require_last_push_approval: false (the drift). Converging the live state requires an admin to run scripts/apply-rulesets.sh with an administration:write token — that is a live GitHub API operation outside this agent's scope and is called out in the completion report.
The codified payload in scripts/apply-rulesets.sh:104 already sets require_last_push_approval: true, matching the org standard. It currently has no test coverage (unlike its sibling apply-repo-settings.sh).
Implementation Checklist
Add tests/scripts/apply-rulesets.test.sh — plain-bash test (mirrors apply-repo-settings.test.sh) mocking gh and asserting the pr-quality dry-run payload contains require_last_push_approval: true and the other required pull_request review parameters.
Add tests/integration/apply-rulesets.bats — bats integration test mirroring apply-repo-settings.bats conventions for the same assertions.
Investigated the drift: the codified pr-quality payload in scripts/apply-rulesets.sh:104 already sets require_last_push_approval: true (matches org source of truth) — but had no test coverage, unlike its sibling apply-repo-settings.sh.
TDD verified: temporarily flipping the codified value to false makes the test FAIL (red); restoring true makes it PASS (green).
Test Results
# tests/scripts/apply-rulesets.test.sh
ok - pr-quality codifies require_last_push_approval: true
ok - pr-quality codifies required_approving_review_count: 1
ok - pr-quality codifies dismiss_stale_reviews_on_push: true
ok - pr-quality codifies require_code_owner_review: true
ok - pr-quality codifies required_review_thread_resolution: true
ok - dry-run made no mutating API call
PASS — 6 assertion(s) passed
# tests/integration/*.bats (bats-core)
1..7
ok 1 applies check-suite preferences via the plural check-suites/preferences endpoint
ok 2 never targets the non-existent singular check-suite/preferences endpoint
ok 3 dry-run makes no PATCH call
ok 4 pr-quality ruleset codifies require_last_push_approval: true
ok 5 pr-quality ruleset never codifies require_last_push_approval: false
ok 6 pr-quality ruleset codifies the required review parameters
ok 7 dry-run makes no mutating (POST/PUT) API call
# lint
.dev-lead/scripts/dev-lead-lint.sh — all checks passed
shellcheck --severity=warning -x tests/scripts/apply-rulesets.test.sh — OK
Files Changed
tests/scripts/apply-rulesets.test.sh (new): plain-bash regression test asserting the codified pr-quality dry-run payload contains require_last_push_approval: true plus the other required pull_request review parameters, and that dry-run performs no mutating API call. Stubs gh so it runs offline.
tests/integration/apply-rulesets.bats (new): bats equivalent of the same assertions, including an explicit guard that the payload never codifies require_last_push_approval: false.
Notes
No source change was required. The codified ruleset (scripts/apply-rulesets.sh), which is this repo's mirror of the org source of truth (standards/rulesets/pr-quality.json), already sets require_last_push_approval: true. This change adds the missing regression coverage so the codified value can never silently drift back to false.
Live-state convergence is out of this agent's scope. The compliance finding is about the live GitHub ruleset (actual: false). Converging it requires an org admin to run GH_TOKEN=<administration:write> scripts/apply-rulesets.sh against petry-projects/broodly — a live GitHub API mutation this agent does not perform. Once run, the live pr-quality ruleset will match the codified true.
TS/Go workspace suites (pnpm run test) were not run: the toolchain is not provisioned in this environment and the change is isolated to shell test files under tests/, touching no TypeScript or Go source.
Detail: Ruleset pr-quality parameter require_last_push_approval has drifted from the codified standard: expected true, actual false. The codified JSON (standards/rulesets/pr-quality.json) is the source of truth (#575/#580); run scripts/apply-rulesets.sh --repo petry-projects/broodly to converge.
Detail: Ruleset pr-quality parameter require_last_push_approval has drifted from the codified standard: expected true, actual false. The codified JSON (standards/rulesets/pr-quality.json) is the source of truth (#575/#580); run scripts/apply-rulesets.sh --repo petry-projects/broodly to converge.
Detail: Ruleset pr-quality parameter require_last_push_approval has drifted from the codified standard: expected true, actual false. The codified JSON (standards/rulesets/pr-quality.json) is the source of truth (#575/#580); run scripts/apply-rulesets.sh --repo petry-projects/broodly to converge.
Detail: Ruleset pr-quality parameter require_last_push_approval has drifted from the codified standard: expected true, actual false. The codified JSON (standards/rulesets/pr-quality.json) is the source of truth (#575/#580); run scripts/apply-rulesets.sh --repo petry-projects/broodly to converge.
Activity
don-petry commentedon Jul 17, 2026
Dev-Lead Implementation Plan
Issue: #409 — Compliance: ruleset-drift-pr-quality-require_last_push_approval
Scope
The codified remediation script
scripts/apply-rulesets.shalready sets thepr-qualityruleset parameterrequire_last_push_approval: true, matching the standard's source of truth. The live-GitHub convergence itself is performed by the org admin apply script (petry-projects/.github) outside this repo's PR flow and requires anadministration:writetoken. The in-repo deliverable is a regression test that guards the codified pr-quality parameters so the script can never silently drift from the standard again — mirroring the existing guardtests/scripts/apply-repo-settings.test.shfor the sibling settings script.Implementation Checklist
tests/scripts/apply-rulesets.test.sh— runsscripts/apply-rulesets.shin--dry-run --forcewith a mockedghCLI and asserts the codifiedpr-qualitypayload setsrequire_last_push_approval: trueplus the other codified pull_request parameters (required_approving_review_count: 1,dismiss_stale_reviews_on_push: true,require_code_owner_review: true,required_review_thread_resolution: true).Tests to Write
tests/scripts/apply-rulesets.test.sh— regression guard for pr-quality ruleset parameters (drift demonstrated by temporarily flipping the value to confirm the test fails, then restoring).Test Command
bash tests/scripts/apply-rulesets.test.sh(plusbash tests/scripts/apply-repo-settings.test.shandbash .dev-lead/scripts/dev-lead-lint.shfor full verification)don-petry commentedon Jul 17, 2026
Dev-Lead: Implementation Complete
Plan Execution
scripts/apply-rulesets.shalready sets thepr-qualityparameterrequire_last_push_approval: true(line 104), matching the standard's source of truth.tests/scripts/apply-rulesets.test.sh— a regression guard for the codified pr-quality ruleset parameters, mirroring the existingtests/scripts/apply-repo-settings.test.shpattern.false, then confirmed it passes with the correcttrue.Note on scope
The live-GitHub ruleset convergence (
expected true,actual false) is applied by the org admin script inpetry-projects/.githubviascripts/apply-rulesets.sh --repo petry-projects/broodly, which requires anadministration:writetoken and is out of band for this repo's PR flow. This repo's contribution to compliance is the codifiedapply-rulesets.sh, which was already correct. The added test prevents the codified source from silently drifting from the standard in the future.Test Results
Files Changed
tests/scripts/apply-rulesets.test.sh(new): Runsscripts/apply-rulesets.shin--dry-run --forcewith a stubbedghCLI and asserts the codifiedpr-qualitypayload setsrequire_last_push_approval: trueplus the other codified pull_request parameters.Notes
scripts/apply-rulesets.shwas already compliant and remains byte-for-byte unchanged.bash tests/scripts/apply-rulesets.test.sh), consistent with the siblingapply-repo-settings.test.sh, which is likewise not wired into the jest/go CI jobs.don-petry commentedon Jul 21, 2026
Dev-Lead Implementation Plan
Issue: #409 — Compliance: ruleset-drift-pr-quality-require_last_push_approval
Scope
Lock in the codified
pr-qualityruleset standard by adding regression tests that assertscripts/apply-rulesets.shsetsrequire_last_push_approval: true, so this repo's codified source-of-truth mirror can never silently drift back tofalse.Findings
pr-qualityruleset hasrequire_last_push_approval: false(the drift). Converging the live state requires an admin to runscripts/apply-rulesets.shwith anadministration:writetoken — that is a live GitHub API operation outside this agent's scope and is called out in the completion report.scripts/apply-rulesets.sh:104already setsrequire_last_push_approval: true, matching the org standard. It currently has no test coverage (unlike its siblingapply-repo-settings.sh).Implementation Checklist
tests/scripts/apply-rulesets.test.sh— plain-bash test (mirrorsapply-repo-settings.test.sh) mockingghand asserting thepr-qualitydry-run payload containsrequire_last_push_approval: trueand the other requiredpull_requestreview parameters.tests/integration/apply-rulesets.bats— bats integration test mirroringapply-repo-settings.batsconventions for the same assertions.Tests to Write
require_last_push_approval: truerequired_approving_review_count,require_code_owner_review,required_review_thread_resolutionTest Command
bash tests/scripts/apply-rulesets.test.sh(plain bash) andbats tests/integration/apply-rulesets.bats(bats, run in CI)don-petry commentedon Jul 21, 2026
Dev-Lead: Implementation Complete
Plan Execution
pr-qualitypayload inscripts/apply-rulesets.sh:104already setsrequire_last_push_approval: true(matches org source of truth) — but had no test coverage, unlike its siblingapply-repo-settings.sh.tests/scripts/apply-rulesets.test.sh(plain-bash, mirrorsapply-repo-settings.test.sh).tests/integration/apply-rulesets.bats(bats, mirrorsapply-repo-settings.bats).falsemakes the test FAIL (red); restoringtruemakes it PASS (green).Test Results
Files Changed
tests/scripts/apply-rulesets.test.sh(new): plain-bash regression test asserting the codifiedpr-qualitydry-run payload containsrequire_last_push_approval: trueplus the other requiredpull_requestreview parameters, and that dry-run performs no mutating API call. Stubsghso it runs offline.tests/integration/apply-rulesets.bats(new): bats equivalent of the same assertions, including an explicit guard that the payload never codifiesrequire_last_push_approval: false.Notes
scripts/apply-rulesets.sh), which is this repo's mirror of the org source of truth (standards/rulesets/pr-quality.json), already setsrequire_last_push_approval: true. This change adds the missing regression coverage so the codified value can never silently drift back tofalse.actual: false). Converging it requires an org admin to runGH_TOKEN=<administration:write> scripts/apply-rulesets.shagainstpetry-projects/broodly— a live GitHub API mutation this agent does not perform. Once run, the livepr-qualityruleset will match the codifiedtrue.pnpm run test) were not run: the toolchain is not provisioned in this environment and the change is isolated to shell test files undertests/, touching no TypeScript or Go source.don-petry commentedon Jul 24, 2026
Weekly Compliance Audit (2026-07-24)
This finding is still open.
Detail: Ruleset
pr-qualityparameterrequire_last_push_approvalhas drifted from the codified standard: expectedtrue, actualfalse. The codified JSON (standards/rulesets/pr-quality.json) is the source of truth (#575/#580); runscripts/apply-rulesets.sh --repo petry-projects/broodlyto converge.Standard: standards/github-settings.md#pr-quality--standard-ruleset-all-repositories
don-petry commentedon Jul 31, 2026
Weekly Compliance Audit (2026-07-31)
This finding is still open.
Detail: Ruleset
pr-qualityparameterrequire_last_push_approvalhas drifted from the codified standard: expectedtrue, actualfalse. The codified JSON (standards/rulesets/pr-quality.json) is the source of truth (#575/#580); runscripts/apply-rulesets.sh --repo petry-projects/broodlyto converge.Standard: standards/github-settings.md#pr-quality--standard-ruleset-all-repositories
feat: implement issue #409 — Compliance: ruleset-drift-pr-quality-req…
feat: implement issue #409 — Compliance: ruleset-drift-pr-quality-req…
don-petry commentedon Aug 7, 2026
Weekly Compliance Audit (2026-08-07)
This finding is still open.
Detail: Ruleset
pr-qualityparameterrequire_last_push_approvalhas drifted from the codified standard: expectedtrue, actualfalse. The codified JSON (standards/rulesets/pr-quality.json) is the source of truth (#575/#580); runscripts/apply-rulesets.sh --repo petry-projects/broodlyto converge.Standard: standards/github-settings.md#pr-quality--standard-ruleset-all-repositories
don-petry commentedon Aug 14, 2026
Weekly Compliance Audit (2026-08-14)
This finding is still open.
Detail: Ruleset
pr-qualityparameterrequire_last_push_approvalhas drifted from the codified standard: expectedtrue, actualfalse. The codified JSON (standards/rulesets/pr-quality.json) is the source of truth (#575/#580); runscripts/apply-rulesets.sh --repo petry-projects/broodlyto converge.Standard: standards/github-settings.md#pr-quality--standard-ruleset-all-repositories
feat: implement issue #409 — Compliance: ruleset-drift-pr-quality-req…