Skip to content

ci: correct the gate comment — backend-ci-gate is now required on main - #2269

Merged
JSv4 merged 1 commit into
mainfrom
ci/gate-comment-now-required
Aug 21, 2026
Merged

ci: correct the gate comment — backend-ci-gate is now required on main#2269
JSv4 merged 1 commit into
mainfrom
ci/gate-comment-now-required

Conversation

@JSv4

@JSv4 JSv4 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

#2267 landed the gate job carrying this comment:

NOT YET REQUIRED as of this commit: main has no required_status_checks object at all...

True when written, false about 15 minutes later once require_backend_ci_gate.sh --apply ran:

$ gh api repos/Open-Source-Legal/OpenContracts/branches/main/protection/required_status_checks
{"strict":false,"contexts":["backend-ci-gate"],"checks":[{"context":"backend-ci-gate","app_id":15368}]}

Leaving it would be the same defect this repo keeps turning up — a comment asserting a gate's state in the present tense when it isn't so. Updated to state what is actually true, keep the enforce_admins: false caveat next to it, and keep gh api .../branches/main/protection as the authority over the comment.

Incidentally, this PR is the end-to-end proof

It is the first PR to merge under the required check. If backend-ci-gate reports and gates it normally, the whole mechanism is confirmed on the wire rather than by inference.

For the record, applying the protection immediately flipped every open PR to BLOCKED — including #2260, #2264 and #2265, which were at linter=failure / pytest=skipped and therefore mergeable with a red linter until an hour ago. They need a merge from main to pick up the check, and then a green linter to pass it.

🤖 Generated with Claude Code

#2267 landed the job with a comment stating main had no required_status_checks
object. That was true when written and false ~15 minutes later, once
require_backend_ci_gate.sh --apply ran. Leaving it would be the same defect
this repo keeps finding -- a document asserting a gate's state in the present
tense without it being so.

Records the enforce_admins=false caveat alongside it, and keeps the pointer to
`gh api .../branches/main/protection` as the authority over the comment.

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

claude Bot commented Aug 20, 2026

Copy link
Copy Markdown

Reviewed. This is a comment-only change to .github/workflows/backend.yml (6 additions / 5 deletions, no logic touched) — straightforward and low-risk.

Verification

  • Confirmed both referenced scripts exist: .github/scripts/backend_ci_gate.sh and .github/scripts/require_backend_ci_gate.sh.
  • The claim that backend-ci-gate is now a required check is corroborated by the gh api .../branches/main/protection/required_status_checks output pasted in the PR description ("contexts":["backend-ci-gate"]).
  • The updated comment correctly keeps a pointer to the live gh api .../branches/main/protection check as the source of truth rather than just hardcoding a date-stamped assertion that will itself rot — consistent with the stated goal of not repeating the "comment asserting present-tense state that isn't so" pattern.

Feedback

  • Nice touch adding the enforce_admins: false caveat inline — that's exactly the kind of detail that would otherwise cause confusion later ("why did an admin's merge bypass the gate?").
  • No code, tests, or behavior affected, so no test coverage concerns here.
  • One very minor nit: "Required on main as of 2026-08-20 (PR ci: add backend-ci-gate, a Backend CI check that can actually be required #2267)" will itself become stale prose over time (e.g., if the gate is later removed and re-added under a different PR), but that's an inherent tradeoff of recording a historical fact vs. describing current state, and the comment already mitigates it by directing readers to the live gh api check rather than trusting the date. Not blocking.

No bugs, security, or performance concerns — this is exactly the kind of self-correcting documentation fix the repo's CLAUDE.md changelog/docs guidance encourages (keep docs current and pointer-based rather than letting them rot).

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@JSv4
JSv4 merged commit e95e406 into main Aug 21, 2026
15 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 21, 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