Skip to content

docs(policy): keep the ci-gate contract in this repository - #20

Merged
rishitank merged 2 commits into
mainfrom
claude/amazing-wozniak-b2147v
Oct 23, 2026
Merged

rishitank merged 2 commits into
mainfrom
claude/amazing-wozniak-b2147v

Conversation

@rishitank

@rishitank rishitank commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

What changed

README only. The "Repository policy" section gains a "The ci-gate contract" subsection: the job a repository adds to opt into the ci-gate ruleset, and why each part of it is there. The pointer to TanksterAI/.github's README for "the job to copy" now points at this subsection.

Why

The policy for this personal account is enforced from this repository, but the one piece every repository must copy lived in an organisation's README. The contract now sits next to the ruleset that enforces it and the reconciler that detects it.

The rules it states come from GitHub's documented behaviour for required checks, in the GitHub Docs page "Troubleshooting required status checks":

  • a job skipped by a conditional reports "Success", even as a required check;
  • a job whose dependency failed is skipped and may not block a merge, hence if: always();
  • a workflow skipped by a path or branch filter never reports, so the PR waits forever. The reconciler already refuses to activate ci-gate for such a workflow.

How it was verified

  • The repo's quality gate passes locally: actionlint + shellcheck clean on all workflows; tests/reconcile/test.sh 60/60, tests/auto-merge-sweep/test.sh 25/25 (yq v4.44.3).
  • New behaviour has a test that fails without the change: docs-only. Instead, I extracted the snippet from the README into a sample workflow (on: pull_request + push) and checked that it passes actionlint, and that the reconciler's own publishes() logic (the job-name query and PR_REACHES) counts it as published for main. I also ran its step against success success (passes) and success failure, success skipped, cancelled success (each fails).

Risk

Docs only; nothing executes differently. If the snippet were wrong, a repository copying it could fail to gate or never activate the ruleset; the checks above cover both.

  • No secrets, tokens or credentials in the diff
  • No safety threshold, budget cap or dry-run flag weakened without a recorded decision

🤖 Generated with Claude Code

https://claude.ai/code/session_016kyusa9AMWHzJmRs2buJX3

The README pointed at TanksterAI/.github for the ci-gate job to copy, so a
personal-account policy depended on an organisation's docs. The contract now
lives next to the ruleset that enforces it: the job, and why each part is
there, per GitHub's documented behaviour for required checks (a skipped job
reports Success; a job whose dependency failed is skipped; a workflow skipped
by a path or branch filter never reports).

The snippet passes actionlint and the reconciler's own publish test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016kyusa9AMWHzJmRs2buJX3
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: d8aac900-2e6b-4006-bad3-4718e48cf3d1
📥 Commits

Reviewing files that changed from the base of the PR and between 9515c7a and 018b794.

📒 Files selected for processing: 1
  • README.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout: 2
  • GitHub Check: actionlint
  • GitHub Check: Scenario tests
🧰 Additional context used
🪛 LanguageTool
README.md

[uncategorized] ~158-~158: Loose punctuation mark.
Context: ...ller job> / . - **if: always()`**: when a job it needs fails, a job withou...

(UNLIKELY_OPENING_PUNCTUATION)

🔇 Additional comments: 1
README.md: 1

112-114: LGTM!

Also applies to: 129-171

📝 Summary

Summary by CodeRabbit

  • Documentation
    • Expanded the CI gate guide with a copy-ready workflow example and clearer guidance on activation requirements, check names, job dependencies and how job results affect the gate.
    • Clarified that the gate must run on pull requests, use if: always(), and fail if any job listed in needs does not succeed. Only listed jobs are gated; workflows excluded from pull requests do not publish the check.
    • Updated the contract reference to point to the guide in the same README.

The README now provides a copyable ci-gate job and documents its check name, pull-request requirements, and handling of job results. The existing contract reference now points to this README.

Changes: CI gate documentation

Layer / File(s) Summary
Document the ci-gate contract
README.md
The README adds a top-level job example and documents activation, check-name, and result requirements. It states that only jobs in needs are gated and updates the existing reference to point to this contract.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 018b7

The documentation is consistent with the repository’s ci-gate implementation and introduces no runtime risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the main change: keeping the ci-gate contract in this repository. The wording is concise and specific, Apprentice.
Description check Passed The description directly explains the README change, its purpose, documented ci-gate requirements, and validation results. It is related to the changeset and provides sufficient context. The Dark Si…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description directly explains the README change, its purpose, documented ci-gate requirements, and validation results. It is related to the changeset and provides sufficient context. The Dark Side approves.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A gate waits in the workflow’s path
needs lists the jobs it checks
Pull requests bring the check to life
always() keeps the gate in motion
Success lets the workflow pass

Comment @coderabbitai help to get the list of available commands.

@rishitank
rishitank enabled auto-merge (squash) October 23, 2026 05:07
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016kyusa9AMWHzJmRs2buJX3
@rishitank
rishitank merged commit 5d5a5b8 into main Oct 23, 2026
5 checks passed
@rishitank
rishitank deleted the claude/amazing-wozniak-b2147v branch October 23, 2026 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants