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
Could not read check-suite preferences — verify GH_TOKEN has repo scope and the repo is accessible. Check-suite auto-trigger compliance was not evaluated.
Run scripts/apply-repo-settings.sh .github-private with a token that has admin access to the repository (requires a classic PAT with repo scope or equivalent):
This script applies all standard settings defined in standards/github-settings.md in one pass.
For a dry run to preview changes without applying: DRY_RUN=true GH_TOKEN=<admin-pat> bash scripts/apply-repo-settings.sh .github-private
The compliance audit could not read this repo's check-suite preferences (root cause: the audit token lacked repo scope / repo access). The remediation is operational — an admin runs scripts/apply-repo-settings.sh with an admin PAT — which the dev-lead agent cannot perform and must not (shared infrastructure). The actionable, in-repo improvement is that rs_apply_repo hits the same unreadable-prefs wall but emits a generic failed to get check-suite preferences warning that doesn't point the operator at the root cause. This change makes that diagnostic actionable, mirroring the finding's guidance (verify token scope + repo accessibility), so an operator running the remediation gets a self-explanatory error instead of a dead end.
Implementation Checklist
scripts/apply-repo-settings.sh — replace the generic warning in rs_apply_repo's prefs-fetch failure branch with an actionable message naming the repo scope requirement and repo accessibility (behavior unchanged: still returns 1).
Tests to Write
tests/test_apply_repo_settings.bats — add a test asserting that when the GET check-suites/preferences call fails, the emitted diagnostic mentions repo scope and repo accessibility (and the function still returns 1).
Test Command
bats tests/test_apply_repo_settings.bats (full suite via scripts/run-bats.sh), plus bash .dev-lead/scripts/dev-lead-lint.sh
Replaced the generic prefs-fetch failure warning in rs_apply_repo with an actionable diagnostic
Added a bats test asserting the diagnostic names repo scope and repo accessibility (and still returns 1)
Context / Scope note
The finding's root cause is operational: the weekly compliance audit (in petry-projects/.github) could not read this repo's check-suite preferences because its token lacked repo scope / repo access. The documented remediation — GH_TOKEN=<admin-pat> bash scripts/apply-repo-settings.sh .github-private — requires an admin PAT and modifies shared repo settings, so it is out of scope for the dev-lead agent to execute (and is not a source change). An admin still needs to run that remediation to clear the underlying warning.
What is fixable in-repo: rs_apply_repo hits the exact same unreadable-prefs wall when an operator runs the remediation with an under-scoped token, but it emitted a generic failed to get check-suite preferences message that gave no next step. The diagnostic now mirrors the finding's guidance so the failure is self-explanatory.
Test Results
$ bats tests/test_apply_repo_settings.bats
...
ok 16 rs_apply_repo live: returns 1 when GET check-suite preferences fails
ok 17 rs_apply_repo live: unreadable preferences warning names repo scope and accessibility
...
ok 32 live mode makes one PATCH call per required setting
32 tests, 0 failures
$ bash .dev-lead/scripts/dev-lead-lint.sh
[lint] shellcheck on 67 file(s)...
[lint] validating 4 agent profile(s)...
[lint] all checks passed
Files Changed
scripts/apply-repo-settings.sh: actionable warning when check-suite preferences are unreadable — names the repo scope (classic PAT) requirement and repo accessibility. Behavior unchanged (still returns 1).
tests/test_apply_repo_settings.bats: new test covering the improved diagnostic.
Notes
This is a diagnostic/UX hardening change for the script's failure path; it does not and cannot apply the repo settings or clear the compliance warning on its own. Clearing the warning requires an admin to run the remediation command above. Recommend keeping this issue open (or reassigning to an admin) until that operational step is performed.
shellcheck on the modified file reports only a pre-existing SC1091 info (cannot follow the sourced lib/push-protection.sh), which the warning-level repo lint ignores.
Activity
don-petry commentedon Jun 19, 2026
Dev-Lead Implementation Plan
Issue: #799 — Compliance: check-suite-prefs-unreadable
Scope
The compliance audit could not read this repo's check-suite preferences (root cause: the audit token lacked
reposcope / repo access). The remediation is operational — an admin runsscripts/apply-repo-settings.shwith an admin PAT — which the dev-lead agent cannot perform and must not (shared infrastructure). The actionable, in-repo improvement is thatrs_apply_repohits the same unreadable-prefs wall but emits a genericfailed to get check-suite preferenceswarning that doesn't point the operator at the root cause. This change makes that diagnostic actionable, mirroring the finding's guidance (verify token scope + repo accessibility), so an operator running the remediation gets a self-explanatory error instead of a dead end.Implementation Checklist
scripts/apply-repo-settings.sh— replace the generic warning inrs_apply_repo's prefs-fetch failure branch with an actionable message naming thereposcope requirement and repo accessibility (behavior unchanged: still returns 1).Tests to Write
tests/test_apply_repo_settings.bats— add a test asserting that when the GET check-suites/preferences call fails, the emitted diagnostic mentionsreposcope and repo accessibility (and the function still returns 1).Test Command
bats tests/test_apply_repo_settings.bats(full suite viascripts/run-bats.sh), plusbash .dev-lead/scripts/dev-lead-lint.shdon-petry commentedon Jun 19, 2026
Dev-Lead: Implementation Complete
Plan Execution
rs_apply_repowith an actionable diagnosticreposcope and repo accessibility (and still returns 1)Context / Scope note
The finding's root cause is operational: the weekly compliance audit (in
petry-projects/.github) could not read this repo's check-suite preferences because its token lackedreposcope / repo access. The documented remediation —GH_TOKEN=<admin-pat> bash scripts/apply-repo-settings.sh .github-private— requires an admin PAT and modifies shared repo settings, so it is out of scope for the dev-lead agent to execute (and is not a source change). An admin still needs to run that remediation to clear the underlying warning.What is fixable in-repo:
rs_apply_repohits the exact same unreadable-prefs wall when an operator runs the remediation with an under-scoped token, but it emitted a genericfailed to get check-suite preferencesmessage that gave no next step. The diagnostic now mirrors the finding's guidance so the failure is self-explanatory.Test Results
Files Changed
scripts/apply-repo-settings.sh: actionable warning when check-suite preferences are unreadable — names thereposcope (classic PAT) requirement and repo accessibility. Behavior unchanged (still returns 1).tests/test_apply_repo_settings.bats: new test covering the improved diagnostic.Notes
SC1091info (cannot follow the sourcedlib/push-protection.sh), which the warning-level repo lint ignores.feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #799 — Compliance: check-suite-prefs-unreadable (…