Skip to content

docs: how Backend CI gates a merge, and why it isn't the pytest job - #2268

Merged
JSv4 merged 1 commit into
mainfrom
docs/backend-ci-gate
Aug 20, 2026
Merged

docs: how Backend CI gates a merge, and why it isn't the pytest job#2268
JSv4 merged 1 commit into
mainfrom
docs/backend-ci-gate

Conversation

@JSv4

@JSv4 JSv4 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Documents backend-ci-gate (added in #2267) in docs/development/test-suite.md:

  • why requiring the pytest job reads green when a red linter skips it (GitHub reports a conditionally-skipped job as Success);
  • why the mirror-image trap — workflow-level path filtering — hangs a required check at Pending forever instead;
  • the gate's decision table, and that it --self-tests before every evaluation;
  • the six sibling workflows (frontend*, production-stack, redis-integration) that cannot be required until they get the same always-runs gate job;
  • that enforce_admins is false, so the gate is a strong default rather than an absolute one.

This PR doubles as the skip-path verification for #2267

#2267's own diff touched backend.yml, so it only ever exercised backend=true. This PR is docs-only, so it should exercise the other branch:

  • changesbackend=false
  • linterskipped
  • pytestskipped
  • backend-ci-gatesuccess

If that is what the checks below show, the gate is safe to make a required status check. If backend-ci-gate is missing or red here, it is not — do not enable branch protection until this PR is green.

🤖 Generated with Claude Code

Documents `backend-ci-gate` (added in #2267): why requiring `pytest` reads
green when a red linter skips it, why workflow-level path filtering hangs a
required check at Pending instead, what the gate's decision table is, and the
six sibling workflows that cannot be required until they get the same
treatment.

Also records that `enforce_admins` is false, so the gate is a strong default
rather than an absolute one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@claude

claude Bot commented Aug 20, 2026

Copy link
Copy Markdown

Reviewed — this is a docs-only change (docs/development/test-suite.md, +79/-0), so the main bar is factual accuracy against the actual workflow/script code, and it clears that bar well.

Verified against source:

  • .github/workflows/backend.yml: pytest is indeed gated on needs.linter.result == 'success', and the gate job (named backend-ci-gate) runs with if: always() and depends on [changes, linter, pytest] — matches the doc's description exactly.
  • paths-ignore is only on the push trigger of backend.yml, not pull_request — matches the "mirror-image trap" explanation.
  • .github/scripts/backend_ci_gate.sh's evaluate() logic matches the decision table row-for-row, including the skipped-counts-as-failure branch for the "tests skipped for any other reason" row.
  • The gate job does run backend_ci_gate.sh --self-test before evaluation, as stated.
  • The six sibling workflows (frontend.yml, frontend-e2e*.yml, production-stack.yml, redis-integration.yml) all carry workflow-level paths: filters on pull_request (confirmed for frontend.yml, production-stack.yml, redis-integration.yml; the frontend-e2e-* variants weren't individually re-checked but follow the same pattern), so the "not safely requirable as-is" claim holds.
  • require_backend_ci_gate.sh's rationale (PUT replaces the whole protection object; PATCH .../required_status_checks 404s if none exists) matches the script's actual behavior and comments.

Minor notes, non-blocking:

On the stated purpose of this PR (skip-path verification for #2267 — confirming changes→backend=false, linter/pytest skipped, backend-ci-gate→success on this docs-only diff): that's an operational check to make on the PR's own CI run rather than something reviewable from the diff, but the doc's own "Practical notes" section correctly predicts what should happen here, so it's a nice self-verifying artifact.

Nothing to change — this is accurate, well-scoped, and directly useful for anyone confused about why pytest isn't the required check. Approving.

@JSv4
JSv4 merged commit cf1b120 into main Aug 20, 2026
12 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant