fix(ci): gate required schema-parity & verify-non-root via changes job (#1222)#1223
Conversation
#1222) Both checks were required on `dev` but path-filtered via `on.pull_request.paths`, so they never posted a status on PRs that don't touch DB/docker paths — leaving the required context "expected" forever and freezing the entire dev merge queue (admin override blocked too via enforce_admins). Move the path filter from the workflow trigger to a cheap `changes` detector (dorny/paths-filter) + job-level `if:`. A job skipped via `if:` still posts a check run (conclusion: skipped), which branch protection counts as passing — so the required context is always present, while the heavy job runs only when the relevant surface changes. Intent preserved: schema-parity still blocks real schema drift on `src/backend/db/**`; verify-non-root still blocks root/socket regressions on `docker/**`. Self-merging: this PR edits both workflow files (each filter includes its own path), so both real jobs run here and post all four required contexts — no branch-protection change or admin override needed. Fixes #1222 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Resolve by running |
Review — LGTM ✅Correct fix and the canonical GitHub pattern for "required + path-filtered" checks. Verified the diff, YAML validity, job graph, and the live check run. Why it's right
Non-blocking suggestions
Merge-context heads-up (not this PR's fault): currently Also: #1228 is a duplicate of #1222 — worth closing in its favor. |
Problem
Every PR to
devis frozenBLOCKED— even with approval + admin:devrequiresschema-parityandverify-non-root, but both come from path-filtered workflows (on.pull_request.paths= DB paths /docker/**). On a PR that doesn't touch those paths the workflow never runs, so the required context never posts a status → GitHub holds it "expected" forever → merge blocked.enforce_admins: trueblocks the override too.schema-parity.ymleven carried a maintainer note warning not to make it required for this exact reason.Fix
Move the path filtering from the workflow trigger to a cheap
changesdetector job (dorny/paths-filter) + a job-levelif:on the heavy job:if:still posts a check run (conclusion: skipped), which branch protection counts as passing → the required context is always present.schema-paritystill runs (and can block) onsrc/backend/db/**,database.py,utils/helpers.py, …verify-non-rootstill boots the stack (and can block) ondocker/**,docker-compose*.yml,scripts/deploy/start.sh,src/mcp-server/Dockerfile.Behavior after merge
schema-parityverify-non-rootsrc/backend/db/**docker/**Self-merging — no branch-protection change needed
This PR edits both workflow files, and each filter includes its own path, so both real jobs run here and post all four required contexts. It merges with one approval;
enforce_admins, the required-checks list, andstrictare untouched.Test plan
[changes, schema-parity]/[changes, verify-non-root]schema-parity+verify-non-rootrun for real (both workflow files changed) and passschema-parity/verify-non-rootas skipped → passingFixes #1222
🤖 Generated with Claude Code