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 TalkTerm 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 TalkTerm
The audit's check_check_suite_prefs() (in petry-projects/.github/scripts/compliance-audit.sh) issues a GET on repos/{owner}/{repo}/check-suites/preferences. That GitHub endpoint is PATCH-only and returns 404 Not Found for any caller, so the GET yields an empty body and the audit raises the check-suite-prefs-unreadablewarning ("compliance was not evaluated"). The audit itself lives in another repo and is out of scope here.
What is fixable in this repo: the auto-generated remediation command bash scripts/apply-repo-settings.sh TalkTerm references a positional-arg signature that this repo's scripts/apply-repo-settings.sh does not support — it only reads GITHUB_REPOSITORY and ignores $1. It also blindly PATCHes both apps even when an app is missing (the standard treats missing as already-compliant) and is not 404-safe.
Scope
Align scripts/apply-repo-settings.sh with standards/github-settings.md#check-suite-auto-trigger-preferences and the documented remediation signature, without regressing the existing apply-repo-settings.yml workflow invocation.
Implementation Checklist
Refactor scripts/apply-repo-settings.sh: resolve target repo from positional $1 (bare name → petry-projects/<name>, or full owner/repo), falling back to GITHUB_REPOSITORY/REPO env (preserves the workflow).
Preserve the existing security_and_analysis enablement behavior.
Fix check-suite handling: read prefs, treat missing/false as compliant (skip), only PATCH apps whose auto-trigger is true; be 404-safe (when prefs are unreadable, apply the disabling PATCH for all configured apps).
Make pure helpers sourceable (guard main so tests can source without executing).
Tests to Write
scripts/apply-repo-settings.test.sh — portable, shellcheck-clean bash tests sourcing the script's pure helpers:
auto_trigger_status: returns missing / false / true for the relevant prefs JSON shapes and empty input.
resolve_repo: bare name → petry-projects/<name>; owner/repo passthrough; GITHUB_REPOSITORY fallback.
Test Command
bash scripts/apply-repo-settings.test.sh (plus bash .dev-lead/scripts/dev-lead-lint.sh for shellcheck)
Note on full remediation
Actually applying the settings requires a classic PAT with repo/admin scope (the check-suites API rejects OAuth tokens). This agent's token is OAuth repo-scope, so it cannot mutate live repo settings; an admin must run the script. This PR makes that documented command work correctly when they do.
The check-suite-prefs-unreadablewarning originates in the org audit (petry-projects/.github/scripts/compliance-audit.sh), whose check_check_suite_prefs() does a GET on check-suites/preferences — a PATCH-only GitHub endpoint that returns 404 for every caller, so the audit can never read prefs and always emits this warning. That audit is in another repo and out of scope here.
What was actionably wrong in this repo: the auto-generated remediation bash scripts/apply-repo-settings.sh TalkTerm referenced a positional-arg signature this repo's script did not support (it only read GITHUB_REPOSITORY and ignored $1), and it blindly PATCHed both apps even when an app was missing (which the standard treats as already-compliant) without being 404-safe.
Plan Execution
Refactored scripts/apply-repo-settings.sh to resolve the target repo from a positional arg (bare TalkTerm → petry-projects/TalkTerm, or owner/repo), falling back to GITHUB_REPOSITORY/REPO so the existing apply-repo-settings.yml workflow still works
Preserved the security_and_analysis enablement behavior
Fixed check-suite handling: missing/false apps are skipped (compliant), only true apps are disabled, and it is 404-safe (disables all configured apps when prefs are unreadable)
Made pure helpers (resolve_repo, auto_trigger_status) sourceable behind a main guard so they are unit-testable
Added portable, shellcheck-clean unit tests (no bats dependency — not installed in this repo)
Test Results
$ bash scripts/apply-repo-settings.test.sh (rc=0)
ok - auto_trigger_status: enabled app -> true
ok - auto_trigger_status: disabled app -> false
ok - auto_trigger_status: app absent -> missing
ok - auto_trigger_status: empty list -> missing
ok - auto_trigger_status: empty string -> missing
ok - resolve_repo: bare name -> org/name
ok - resolve_repo: owner/repo passthrough
ok - resolve_repo: GITHUB_REPOSITORY fallback
ok - resolve_repo: REPO env fallback
All tests passed.
$ bash .dev-lead/scripts/dev-lead-lint.sh (rc=0)
[lint] shellcheck on 2 file(s)...
[lint] validating .github/CODEOWNERS...
OK: .github/CODEOWNERS
[lint] all checks passed
shellcheck (severity=warning, -x) on both files: clean.
scripts/apply-repo-settings.test.sh (new): unit tests for auto_trigger_status and resolve_repo
Notes
Full remediation still requires an admin run. The check-suites API rejects OAuth app tokens (verified: 403 with this agent's OAuth repo-scope token); it needs a classic PAT with repo/admin scope. This change makes the documented command behave correctly when an admin runs it — it does not (and cannot) mutate live repo settings from this agent.
The underlying audit false-positive (GET on a PATCH-only endpoint) would need a fix in petry-projects/.github; consider a follow-up issue there if the warning recurs after settings are applied.
No production app code exists in this repo yet (no package.json); the only CI gates here are gitleaks (ci.yml) and dev-lead-lint.sh (shellcheck) — both green.
Activity
don-petry commentedon Jun 19, 2026
Dev-Lead Implementation Plan
Issue: #296 — Compliance: check-suite-prefs-unreadable
Root-cause analysis
The audit's
check_check_suite_prefs()(inpetry-projects/.github/scripts/compliance-audit.sh) issues a GET onrepos/{owner}/{repo}/check-suites/preferences. That GitHub endpoint is PATCH-only and returns404 Not Foundfor any caller, so the GET yields an empty body and the audit raises thecheck-suite-prefs-unreadablewarning ("compliance was not evaluated"). The audit itself lives in another repo and is out of scope here.What is fixable in this repo: the auto-generated remediation command
bash scripts/apply-repo-settings.sh TalkTermreferences a positional-arg signature that this repo'sscripts/apply-repo-settings.shdoes not support — it only readsGITHUB_REPOSITORYand ignores$1. It also blindly PATCHes both apps even when an app ismissing(the standard treatsmissingas already-compliant) and is not 404-safe.Scope
Align
scripts/apply-repo-settings.shwithstandards/github-settings.md#check-suite-auto-trigger-preferencesand the documented remediation signature, without regressing the existingapply-repo-settings.ymlworkflow invocation.Implementation Checklist
scripts/apply-repo-settings.sh: resolve target repo from positional$1(bare name →petry-projects/<name>, or fullowner/repo), falling back toGITHUB_REPOSITORY/REPOenv (preserves the workflow).security_and_analysisenablement behavior.missing/falseas compliant (skip), only PATCH apps whose auto-trigger istrue; be 404-safe (when prefs are unreadable, apply the disabling PATCH for all configured apps).mainso tests can source without executing).Tests to Write
scripts/apply-repo-settings.test.sh— portable, shellcheck-clean bash tests sourcing the script's pure helpers:auto_trigger_status: returnsmissing/false/truefor the relevant prefs JSON shapes and empty input.resolve_repo: bare name →petry-projects/<name>;owner/repopassthrough;GITHUB_REPOSITORYfallback.Test Command
bash scripts/apply-repo-settings.test.sh(plusbash .dev-lead/scripts/dev-lead-lint.shfor shellcheck)Note on full remediation
Actually applying the settings requires a classic PAT with
repo/admin scope (the check-suites API rejects OAuth tokens). This agent's token is OAuthrepo-scope, so it cannot mutate live repo settings; an admin must run the script. This PR makes that documented command work correctly when they do.don-petry commentedon Jun 19, 2026
Dev-Lead: Implementation Complete
Root cause
The
check-suite-prefs-unreadablewarning originates in the org audit (petry-projects/.github/scripts/compliance-audit.sh), whosecheck_check_suite_prefs()does a GET oncheck-suites/preferences— a PATCH-only GitHub endpoint that returns 404 for every caller, so the audit can never read prefs and always emits this warning. That audit is in another repo and out of scope here.What was actionably wrong in this repo: the auto-generated remediation
bash scripts/apply-repo-settings.sh TalkTermreferenced a positional-arg signature this repo's script did not support (it only readGITHUB_REPOSITORYand ignored$1), and it blindly PATCHed both apps even when an app wasmissing(which the standard treats as already-compliant) without being 404-safe.Plan Execution
scripts/apply-repo-settings.shto resolve the target repo from a positional arg (bareTalkTerm→petry-projects/TalkTerm, orowner/repo), falling back toGITHUB_REPOSITORY/REPOso the existingapply-repo-settings.ymlworkflow still workssecurity_and_analysisenablement behaviormissing/falseapps are skipped (compliant), onlytrueapps are disabled, and it is 404-safe (disables all configured apps when prefs are unreadable)resolve_repo,auto_trigger_status) sourceable behind amainguard so they are unit-testablebatsdependency — not installed in this repo)Test Results
shellcheck (severity=warning, -x) on both files: clean.
Files Changed
scripts/apply-repo-settings.sh: refactored into sourceable helpers + guarded main; positional/env repo resolution; standard-conformant, 404-safe check-suite handlingscripts/apply-repo-settings.test.sh(new): unit tests forauto_trigger_statusandresolve_repoNotes
repo-scope token); it needs a classic PAT withrepo/admin scope. This change makes the documented command behave correctly when an admin runs it — it does not (and cannot) mutate live repo settings from this agent.petry-projects/.github; consider a follow-up issue there if the warning recurs after settings are applied.package.json); the only CI gates here are gitleaks (ci.yml) anddev-lead-lint.sh(shellcheck) — both green.feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
5 remaining items
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #454 — Compliance: ruleset-drift-pr-quality-req…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…
feat: implement issue #296 — Compliance: check-suite-prefs-unreadable (…