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/google-app-scripts to converge.
Verify that this repository's codified pr-quality ruleset enforces require_last_push_approval: true and is guarded against drift by a CI test; determine whether any source change is required to bring the codebase into compliance.
Investigation findings (pre-implementation)
The only in-repo codification of this ruleset is scripts/setup-pr-quality-ruleset.sh. Its pull_request rule already sets require_last_push_approval: true (line 68), matching the codified standard.
scripts/tests/setup-pr-quality-ruleset.test.js already asserts this value (both individually and via an exact toEqual on all pull_request parameters) and passes.
The guard test is wired into npm test via the jest testMatch (**/tests/**/*.test.[jt]s?(x)).
The sibling code-quality ruleset uses required_status_checks (no pull_request rule), so it is out of scope.
Implementation Checklist
Locate every in-repo codification of the pr-quality ruleset / require_last_push_approval
Confirm the codified value already equals the expected standard (true)
Confirm a drift-guard test exists, is CI-wired, and passes
Run full verification (test suite, npm run check, dev-lead lint)
Tests to Write
No new tests required: the existing exact-match guard in setup-pr-quality-ruleset.test.js already fails if require_last_push_approval is ever removed or set to false.
Note on residual drift
The codebase source of truth is already compliant. The audit finding reflects live GitHub ruleset settings drift (actual false), which converges by running the existing scripts/setup-pr-quality-ruleset.sh (admin/ops action, PUT of the full payload) — not a code change. This may be a re-flag of the codification already added under the guard referenced in the test (#520).
The repository's codified source of truth for the pr-quality ruleset already enforces require_last_push_approval: true. No source change is required to bring the codebase into compliance; the reported drift exists only in the live GitHub ruleset settings and converges by running the existing setup script (admin/ops action).
Plan Execution
Located every in-repo codification of require_last_push_approval / pr-quality
Confirmed scripts/setup-pr-quality-ruleset.sh (line 68) codifies require_last_push_approval: true — matches the expected standard
Confirmed scripts/tests/setup-pr-quality-ruleset.test.js guards the value (individual assertion + exact toEqual on all pull_request params) and passes
Confirmed the guard test runs in CI (jest testMatch covers scripts/tests/)
Confirmed sibling code-quality ruleset is out of scope (uses required_status_checks, no pull_request rule)
Ran full verification (test suite, npm run check, dev-lead lint) — all green
Why no code change (TDD exception)
Per the Phase 2 exception for behavior-preserving cases: the codified value and its drift-guard test are already present and passing. Adding a change would be fabricated work and would violate "do not implement more than the issue requests." The existing exact-match test already fails if require_last_push_approval is ever set to false or removed, so drift of the codified value is protected.
Test Results
> google-app-scripts@0.0.0 test
> jest --runInBand
Test Suites: 15 passed, 15 total
Tests: 403 passed, 403 total
Snapshots: 0 total
Time: 5.52 s
Ran all test suites.
npm run check: 0 errors (22 pre-existing unused-var warnings in unrelated gmail-to-drive-by-labels tests)
bash .dev-lead/scripts/dev-lead-lint.sh: all checks passed
Files Changed
None (codebase already compliant).
Recommended remediation (live settings — outside a code PR)
Run the existing codified script against the live repo to converge the drifted GitHub ruleset (requires repo admin):
This PUTs the full payload (with require_last_push_approval: true) to the existing pr-quality ruleset. I did not run it here because it mutates live shared repository settings, which is outside the code-change scope of this task and warrants explicit maintainer authorization.
Notes
This finding is a re-flag of live-settings drift for a parameter whose codification is already correct (guard added under the referenced #520). Suggest closing #539 once the ops convergence script is run, or converting it to an ops/apply task since there is no code fix to make.
Bring the repo's codified pr-quality ruleset into full parity with the standard for require_last_push_approval: true and confirm the setup script reconverges live drift.
Findings from investigation
scripts/setup-pr-quality-ruleset.sh already codifies require_last_push_approval: true in its ruleset payload, and its update path PUTs the payload to reconverge any drifted parameters (idempotent).
The reported drift (actual: false) is in the live GitHub ruleset, not the codified source of truth; it converges when the setup script runs.
Remaining gap vs. the codified standard: the script header's reconvergence note names only dismiss_stale_reviews_on_push and omits require_last_push_approval.
None required — behavior is already guarded by existing dedicated and exhaustive parameter assertions (documentation-only change, no observable behavior change)
Test Command
npx jest scripts/tests/setup-pr-quality-ruleset.test.js and full npm test
The repository's codified source of truth was already compliant: scripts/setup-pr-quality-ruleset.sh sets require_last_push_approval: true in its ruleset payload, and its update path PUTs that payload to reconverge any drifted parameters (idempotent). Existing tests already assert the value. The reported actual: false is live GitHub ruleset drift, which converges the next time the setup script runs against the repo — it was not a gap in the codebase.
To bring the codebase to full parity with the standard (matching the pattern used for #538), I documented require_last_push_approval in the script header's reconvergence note, which previously named only dismiss_stale_reviews_on_push.
requires last-push approval on the pull_request rule → require_last_push_approval === true
has exactly one pull_request rule with all required parameters → exhaustive param match
script updates existing rulesets via PUT to enforce compliance
Files Changed
scripts/setup-pr-quality-ruleset.sh: header comment now lists require_last_push_approval (alongside dismiss_stale_reviews_on_push) among the drifted parameters the update path reconverges. No functional change — the payload already codified require_last_push_approval: true.
Notes
No test changes required: the codified value is already guarded by a dedicated assertion and an exhaustive toEqual on the full parameter set. Per the TDD documentation-only exception, no new failing test was written.
Live convergence (flipping the actual GitHub ruleset from false → true) requires running scripts/setup-pr-quality-ruleset.sh against the repo with an admin-authenticated gh; that is an infrastructure operation outside this code change.
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/google-app-scripts 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/google-app-scripts 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/google-app-scripts 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/google-app-scripts to converge.
Activity
don-petry commentedon Aug 14, 2026
Dev-Lead Implementation Plan
Issue: #539 — Compliance: ruleset-drift-pr-quality-require_last_push_approval
Scope
Verify that this repository's codified
pr-qualityruleset enforcesrequire_last_push_approval: trueand is guarded against drift by a CI test; determine whether any source change is required to bring the codebase into compliance.Investigation findings (pre-implementation)
scripts/setup-pr-quality-ruleset.sh. Itspull_requestrule already setsrequire_last_push_approval: true(line 68), matching the codified standard.scripts/tests/setup-pr-quality-ruleset.test.jsalready asserts this value (both individually and via an exacttoEqualon allpull_requestparameters) and passes.npm testvia the jesttestMatch(**/tests/**/*.test.[jt]s?(x)).code-qualityruleset usesrequired_status_checks(nopull_requestrule), so it is out of scope.Implementation Checklist
pr-qualityruleset /require_last_push_approvaltrue)npm run check, dev-lead lint)Tests to Write
setup-pr-quality-ruleset.test.jsalready fails ifrequire_last_push_approvalis ever removed or set tofalse.Note on residual drift
The codebase source of truth is already compliant. The audit finding reflects live GitHub ruleset settings drift (actual
false), which converges by running the existingscripts/setup-pr-quality-ruleset.sh(admin/ops action, PUT of the full payload) — not a code change. This may be a re-flag of the codification already added under the guard referenced in the test (#520).Test Command
npm testdon-petry commentedon Aug 14, 2026
Dev-Lead: Investigation Complete — Codebase Already Compliant
Summary
The repository's codified source of truth for the
pr-qualityruleset already enforcesrequire_last_push_approval: true. No source change is required to bring the codebase into compliance; the reported drift exists only in the live GitHub ruleset settings and converges by running the existing setup script (admin/ops action).Plan Execution
require_last_push_approval/pr-qualityscripts/setup-pr-quality-ruleset.sh(line 68) codifiesrequire_last_push_approval: true— matches the expected standardscripts/tests/setup-pr-quality-ruleset.test.jsguards the value (individual assertion + exacttoEqualon allpull_requestparams) and passestestMatchcoversscripts/tests/)code-qualityruleset is out of scope (usesrequired_status_checks, nopull_requestrule)npm run check, dev-lead lint) — all greenWhy no code change (TDD exception)
Per the Phase 2 exception for behavior-preserving cases: the codified value and its drift-guard test are already present and passing. Adding a change would be fabricated work and would violate "do not implement more than the issue requests." The existing exact-match test already fails if
require_last_push_approvalis ever set tofalseor removed, so drift of the codified value is protected.Test Results
npm run check: 0 errors (22 pre-existing unused-var warnings in unrelatedgmail-to-drive-by-labelstests)bash .dev-lead/scripts/dev-lead-lint.sh: all checks passedFiles Changed
Recommended remediation (live settings — outside a code PR)
Run the existing codified script against the live repo to converge the drifted GitHub ruleset (requires repo admin):
This PUTs the full payload (with
require_last_push_approval: true) to the existingpr-qualityruleset. I did not run it here because it mutates live shared repository settings, which is outside the code-change scope of this task and warrants explicit maintainer authorization.Notes
This finding is a re-flag of live-settings drift for a parameter whose codification is already correct (guard added under the referenced #520). Suggest closing #539 once the ops convergence script is run, or converting it to an ops/apply task since there is no code fix to make.
don-petry commentedon Aug 18, 2026
Dev-Lead Implementation Plan
Issue: #539 — Compliance: ruleset-drift-pr-quality-require_last_push_approval
Scope
Bring the repo's codified
pr-qualityruleset into full parity with the standard forrequire_last_push_approval: trueand confirm the setup script reconverges live drift.Findings from investigation
scripts/setup-pr-quality-ruleset.shalready codifiesrequire_last_push_approval: truein its ruleset payload, and its update path PUTs the payload to reconverge any drifted parameters (idempotent).scripts/tests/setup-pr-quality-ruleset.test.jsalready assertsrequire_last_push_approval === true(dedicated + exhaustive parameter tests). All 6 tests pass.actual: false) is in the live GitHub ruleset, not the codified source of truth; it converges when the setup script runs.dismiss_stale_reviews_on_pushand omitsrequire_last_push_approval.Implementation Checklist
require_last_push_approvalin the setup script header's reconvergence note (parity with the standard / prior Compliance: ruleset-drift-pr-quality-dismiss_stale_reviews_on_push #538 pattern)Tests to Write
Test Command
npx jest scripts/tests/setup-pr-quality-ruleset.test.jsand fullnpm testdon-petry commentedon Aug 18, 2026
Dev-Lead: Implementation Complete
Summary
The repository's codified source of truth was already compliant:
scripts/setup-pr-quality-ruleset.shsetsrequire_last_push_approval: truein its ruleset payload, and its update path PUTs that payload to reconverge any drifted parameters (idempotent). Existing tests already assert the value. The reportedactual: falseis live GitHub ruleset drift, which converges the next time the setup script runs against the repo — it was not a gap in the codebase.To bring the codebase to full parity with the standard (matching the pattern used for #538), I documented
require_last_push_approvalin the script header's reconvergence note, which previously named onlydismiss_stale_reviews_on_push.Plan Execution
require_last_push_approval: truerequire_last_push_approvalin the setup script header reconvergence notenpm run checkTest Results
Targeted guard tests (
scripts/tests/setup-pr-quality-ruleset.test.js) — 6/6 passing, including:requires last-push approval on the pull_request rule→require_last_push_approval === truehas exactly one pull_request rule with all required parameters→ exhaustive param matchscript updates existing rulesets via PUT to enforce complianceFiles Changed
scripts/setup-pr-quality-ruleset.sh: header comment now listsrequire_last_push_approval(alongsidedismiss_stale_reviews_on_push) among the drifted parameters the update path reconverges. No functional change — the payload already codifiedrequire_last_push_approval: true.Notes
toEqualon the full parameter set. Per the TDD documentation-only exception, no new failing test was written.false→true) requires runningscripts/setup-pr-quality-ruleset.shagainst the repo with an admin-authenticatedgh; that is an infrastructure operation outside this code change.don-petry commentedon Aug 21, 2026
Weekly Compliance Audit (2026-08-21)
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/google-app-scriptsto converge.Standard: standards/github-settings.md#pr-quality--standard-ruleset-all-repositories
don-petry commentedon Aug 28, 2026
Weekly Compliance Audit (2026-08-28)
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/google-app-scriptsto converge.Standard: standards/github-settings.md#pr-quality--standard-ruleset-all-repositories
don-petry commentedon Aug 31, 2026
Weekly Compliance Audit (2026-08-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/google-app-scriptsto converge.Standard: standards/github-settings.md#pr-quality--standard-ruleset-all-repositories
don-petry commentedon Sep 4, 2026
Weekly Compliance Audit (2026-09-04)
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/google-app-scriptsto converge.Standard: standards/github-settings.md#pr-quality--standard-ruleset-all-repositories
fix(ruleset): preserve complete ruleset and validate before update
feat: implement issue #539 — Compliance: ruleset-drift-pr-quality-req…