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 code-quality parameter required_status_checks has drifted from the codified standard: expected CodeQL, SonarCloud, agent-shield / AgentShield, dependency-audit / Detect ecosystems, actual missing: dependency-audit / Detect ecosystems. The codified JSON (standards/rulesets/code-quality.json) is the source of truth (#575/#580); run scripts/apply-rulesets.sh --repo petry-projects/.github to converge.
Fix the root cause of the code-quality ruleset drift: this repo's .github/workflows/dependency-audit.yml is still the old inline workflow (job detect → check context Detect ecosystems), whereas every other self-hosted reusable in .github (agent-shield, auto-rebase, dependabot-*) is a thin caller stub. Migrating it to the caller-stub convention makes it produce dependency-audit / Detect ecosystems, matching the codified standards/rulesets/code-quality.json.
Root-cause analysis
Codified source of truth standards/rulesets/code-quality.json requires dependency-audit / Detect ecosystems (already correct — no change needed).
Live code-quality ruleset on the repo requires Detect ecosystems (the old inline name).
The reusable-caller pattern (a job named dependency-audit calling dependency-audit-reusable.yml, whose detect job is "Detect ecosystems") composes to dependency-audit / Detect ecosystems — exactly the codified name. agent-shield.yml already does this (agent-shield / AgentShield) and shows no drift.
Implementation Checklist
Add drift-guard test to test/scripts/apply-rulesets/apply-rulesets.bats asserting .github/workflows/dependency-audit.yml is a caller stub producing dependency-audit / Detect ecosystems
Convert .github/workflows/dependency-audit.yml to a thin caller stub (job dependency-audit → ./.github/workflows/dependency-audit-reusable.yml local ref), matching the agent-shield/auto-rebase self-host convention
Tests to Write
dependency-audit.yml defines a job dependency-audit that uses: the local reusable (red against current inline file)
dependency-audit.yml has no inline detect job (i.e., no longer publishes the bare Detect ecosystems context)
Converging the live ruleset (scripts/apply-rulesets.sh --repo petry-projects/.github) is a manual admin-token step per standards/ruleset-remediation-runbook.md and is not something the dev-lead PR flow performs. After this change merges and the workflow publishes dependency-audit / Detect ecosystems, that step can run without bricking PRs.
The code-quality ruleset drift was caused by this repo's own.github/workflows/dependency-audit.yml still being the pre-centralization inline workflow: it ran a top-level detect job (displayName "Detect ecosystems") directly, so GitHub published the check context as the bare Detect ecosystems. Every other self-hosted reusable in .github (agent-shield.yml, auto-rebase.yml, dependabot-*.yml) is already a thin caller stub, so their check names compose correctly (e.g. agent-shield / AgentShield) and show no drift. Migrating dependency-audit.yml to the same caller-stub shape makes it publish dependency-audit / Detect ecosystems — exactly the context codified in standards/rulesets/code-quality.json.
Plan Execution
Added drift-guard tests asserting dependency-audit.yml is a caller stub producing dependency-audit / Detect ecosystems (red first)
Converted .github/workflows/dependency-audit.yml to a thin caller stub (job dependency-audit → ./.github/workflows/dependency-audit-reusable.yml local ref), matching the agent-shield.yml self-host convention
Full bats suite (49 files) + required dev-lead lint pass
Test Results
1..20
ok 1 code-quality.json: requires exactly the 4 codified contexts
ok 2 code-quality.json: does NOT require 'Dev-Lead Agent' (the retired divergence)
ok 3 pr-quality.json + code-quality.json carry both bypass actors (OrgAdmin + Integration)
ok 4 pr-quality.json: omits 'automatic_copilot_code_review_enabled' (Free-plan API rejects it)
ok 5 release-channel-tags.json: tag ruleset, generic refs/tags/** include, update+deletion only
ok 6 release-channel-tags.json: carries OrgAdmin + both Integration apps (automation 3167543 + release-manager 4193127)
ok 7 dependency-audit.yml: is a caller stub with job 'dependency-audit' using the reusable
ok 8 dependency-audit.yml: carries no inline 'detect' job (would publish bare 'Detect ecosystems')
ok 9 apply --repo: creates rulesets when absent (POST per file)
ok 10 apply --repo: updates when present (PUT by id)
ok 11 apply: --dry-run makes no write calls
ok 12 apply: a bare <repo-name> resolves to $ORG/<name>
ok 13 apply: a name filter applies only that ruleset
ok 14 apply: default set is the fleet allowlist only — release-channel-tags is NOT swept in
ok 15 apply: release-channel-tags applies only when named explicitly
ok 16 apply: unknown ruleset name errors
ok 17 apply --all: iterates every non-archived org repo
ok 18 apply: --all and --repo are mutually exclusive
ok 19 apply: a bare token after --all is a ruleset-name filter (unknown → errors)
ok 20 ruleset_id_by_name: resolves id from the list
Full sweep: all 49 bats suites green (incl. ruleset-contents-drift.bats 10/10, the suite for the audit function that raised this finding). .dev-lead/scripts/dev-lead-lint.sh → all checks passed.
Files Changed
.github/workflows/dependency-audit.yml: inline detect/audit workflow → thin caller stub delegating to the org reusable; publishes dependency-audit / Detect ecosystems. No with:/secrets: needed (the reusable declares no inputs and only contents: read); detection/audit behavior is unchanged (the reusable is the org source of truth for that logic).
test/scripts/apply-rulesets/apply-rulesets.bats: added two drift-guard tests tying the codified required context to the workflow that must produce it.
Notes
Operational follow-up (out of dev-lead scope): the live ruleset on petry-projects/.github still lists the old Detect ecosystems context. Converging it is a manual admin-token step per standards/ruleset-remediation-runbook.md (scripts/apply-rulesets.sh --repo petry-projects/.github); compliance-remediate.sh intentionally skips the rulesets category. Now that the workflow publishes dependency-audit / Detect ecosystems, that step converges the ruleset without bricking PRs.
Merge ordering: because the live ruleset currently requires the bare Detect ecosystems, this PR should be merged with admin bypass (already a bypass actor on .github), then the apply-rulesets step run, so future PRs gate on the codified name.
Detail: Ruleset code-quality parameter required_status_checks has drifted from the codified standard: expected CodeQL, SonarCloud, agent-shield / AgentShield, dependency-audit / Detect ecosystems, actual missing: dependency-audit / Detect ecosystems. The codified JSON (standards/rulesets/code-quality.json) is the source of truth (#575/#580); run scripts/apply-rulesets.sh --repo petry-projects/.github to converge.
Detail: Ruleset code-quality parameter required_status_checks has drifted from the codified standard: expected CodeQL, SonarCloud, agent-shield / AgentShield, dependency-audit / Detect ecosystems, actual missing: dependency-audit / Detect ecosystems. The codified JSON (standards/rulesets/code-quality.json) is the source of truth (#575/#580); run scripts/apply-rulesets.sh --repo petry-projects/.github to converge.
Activity
don-petry commentedon Jul 17, 2026
Dev-Lead Implementation Plan
Issue: #772 — Compliance: ruleset-drift-code-quality-required_status_checks
Scope
Fix the root cause of the
code-qualityruleset drift: this repo's.github/workflows/dependency-audit.ymlis still the old inline workflow (jobdetect→ check contextDetect ecosystems), whereas every other self-hosted reusable in.github(agent-shield, auto-rebase, dependabot-*) is a thin caller stub. Migrating it to the caller-stub convention makes it producedependency-audit / Detect ecosystems, matching the codifiedstandards/rulesets/code-quality.json.Root-cause analysis
standards/rulesets/code-quality.jsonrequiresdependency-audit / Detect ecosystems(already correct — no change needed).code-qualityruleset on the repo requiresDetect ecosystems(the old inline name).dependency-audit.ymlrunsdetect(displayName "Detect ecosystems") directly → GitHub check contextDetect ecosystems.dependency-auditcallingdependency-audit-reusable.yml, whose detect job is "Detect ecosystems") composes todependency-audit / Detect ecosystems— exactly the codified name.agent-shield.ymlalready does this (agent-shield / AgentShield) and shows no drift.Implementation Checklist
test/scripts/apply-rulesets/apply-rulesets.batsasserting.github/workflows/dependency-audit.ymlis a caller stub producingdependency-audit / Detect ecosystems.github/workflows/dependency-audit.ymlto a thin caller stub (jobdependency-audit→./.github/workflows/dependency-audit-reusable.ymllocal ref), matching the agent-shield/auto-rebase self-host conventionTests to Write
dependency-audit.ymldefines a jobdependency-auditthatuses:the local reusable (red against current inline file)dependency-audit.ymlhas no inlinedetectjob (i.e., no longer publishes the bareDetect ecosystemscontext)Test Command
npx bats test/scripts/apply-rulesets/apply-rulesets.batsOut of scope (operational, admin-token)
Converging the live ruleset (
scripts/apply-rulesets.sh --repo petry-projects/.github) is a manual admin-token step perstandards/ruleset-remediation-runbook.mdand is not something the dev-lead PR flow performs. After this change merges and the workflow publishesdependency-audit / Detect ecosystems, that step can run without bricking PRs.don-petry commentedon Jul 17, 2026
Dev-Lead: Implementation Complete
Root cause
The
code-qualityruleset drift was caused by this repo's own.github/workflows/dependency-audit.ymlstill being the pre-centralization inline workflow: it ran a top-leveldetectjob (displayName "Detect ecosystems") directly, so GitHub published the check context as the bareDetect ecosystems. Every other self-hosted reusable in.github(agent-shield.yml,auto-rebase.yml,dependabot-*.yml) is already a thin caller stub, so their check names compose correctly (e.g.agent-shield / AgentShield) and show no drift. Migratingdependency-audit.ymlto the same caller-stub shape makes it publishdependency-audit / Detect ecosystems— exactly the context codified instandards/rulesets/code-quality.json.Plan Execution
dependency-audit.ymlis a caller stub producingdependency-audit / Detect ecosystems(red first).github/workflows/dependency-audit.ymlto a thin caller stub (jobdependency-audit→./.github/workflows/dependency-audit-reusable.ymllocal ref), matching theagent-shield.ymlself-host conventionTest Results
Full sweep: all 49 bats suites green (incl.
ruleset-contents-drift.bats10/10, the suite for the audit function that raised this finding)..dev-lead/scripts/dev-lead-lint.sh→ all checks passed.Files Changed
.github/workflows/dependency-audit.yml: inline detect/audit workflow → thin caller stub delegating to the org reusable; publishesdependency-audit / Detect ecosystems. Nowith:/secrets:needed (the reusable declares no inputs and onlycontents: read); detection/audit behavior is unchanged (the reusable is the org source of truth for that logic).test/scripts/apply-rulesets/apply-rulesets.bats: added two drift-guard tests tying the codified required context to the workflow that must produce it.Notes
petry-projects/.githubstill lists the oldDetect ecosystemscontext. Converging it is a manual admin-token step perstandards/ruleset-remediation-runbook.md(scripts/apply-rulesets.sh --repo petry-projects/.github);compliance-remediate.shintentionally skips therulesetscategory. Now that the workflow publishesdependency-audit / Detect ecosystems, that step converges the ruleset without bricking PRs.Detect ecosystems, this PR should be merged with admin bypass (already a bypass actor on.github), then the apply-rulesets step run, so future PRs gate on the codified name.don-petry commentedon Jul 24, 2026
Weekly Compliance Audit (2026-07-24)
This finding is still open.
Detail: Ruleset
code-qualityparameterrequired_status_checkshas drifted from the codified standard: expectedCodeQL, SonarCloud, agent-shield / AgentShield, dependency-audit / Detect ecosystems, actualmissing: dependency-audit / Detect ecosystems. The codified JSON (standards/rulesets/code-quality.json) is the source of truth (#575/#580); runscripts/apply-rulesets.sh --repo petry-projects/.githubto converge.Standard: standards/github-settings.md#code-quality--required-checks-ruleset-all-repositories
don-petry commentedon Jul 31, 2026
Weekly Compliance Audit (2026-07-31)
This finding is still open.
Detail: Ruleset
code-qualityparameterrequired_status_checkshas drifted from the codified standard: expectedCodeQL, SonarCloud, agent-shield / AgentShield, dependency-audit / Detect ecosystems, actualmissing: dependency-audit / Detect ecosystems. The codified JSON (standards/rulesets/code-quality.json) is the source of truth (#575/#580); runscripts/apply-rulesets.sh --repo petry-projects/.githubto converge.Standard: standards/github-settings.md#code-quality--required-checks-ruleset-all-repositories
don-petry commentedon Aug 2, 2026
Operational follow-up complete
Ran the manual admin-token convergence step called out as out-of-scope in the dev-lead plan:
Output:
Verified live
code-qualityruleset now requires exactly the codified set:The
dependency-audit / Detect ecosystemscontext is no longer missing. Closing — next weekly compliance audit should come back clean.feat: implement issue #772 — Compliance: ruleset-drift-code-quality-r…
feat: implement issue #772 — Compliance: ruleset-drift-code-quality-r…
feat: implement issue #772 — Compliance: ruleset-drift-code-quality-r…