Record the Release Gate's Branch-Name Refusal in the D2 Contract - #1550
Conversation
## Summary Fixes #1531. The release task's `validate-release` gate refuses, ahead of its smoke exit, any `branch` input that `git check-ref-format --branch` rejects. That refusal landed with the fix for the version step logging the branch unsanitized, and `WORKFLOW.md` D2 never recorded it, so the contract listed less than the gate actually asserts at entry. - `WORKFLOW.md`: a new D2.5 states the input (a release task taking a `branch` input, on any run), the output (the gate fails when git rejects the value, ahead of D2.2's smoke exit, with an error echoing no part of it), and what it prevents (a `::` or `##[` in a caller's value forming a workflow command wherever a later step prints the branch). - The `workflow-ci-contract` skill carries section 4 whole as a generated include, so `scripts/build_dist.py` refreshed `d-guarantees.md` in the source and both generated skill trees. - `reports/canonical-review.json`: the whole-unit pass over the two canonical units this change moves. D2.5 is its own item rather than a clause of D2.2, which keeps each item asserting one thing and leaves D2.1 through D2.4 numbered as the audit reports and `publish-release.yml` already cite them. ## Verification - `python3 scripts/build_dist.py --check`: generated skill distributions are current. - `python3 spec/validate.py`: 22 cataloged repos classify cleanly. - `python3 scripts/prose_lint.py . --diff HEAD` and `python3 scripts/repo_gate.py --check eol`: clean. - `python3 scripts/docker_lint.py`: 7 linters clean, markdownlint over 185 files and editorconfig-checker over 352. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe release workflow contract now requires ChangesRelease branch validation
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The workflow contract and review metadata are consistent with the validated, non-echoed branch rejection behavior. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
🟢 Approval recommended
The documentation update accurately matches the existing gate behavior (the branch check occurs before the smoke exit and emits no branch content), and the regenerated distributions/ledgers are consistent with the source change.
Pull request overview
This PR updates the workflow behavioral contract to explicitly document the release gate's early refusal of invalid branch inputs (as validated by git check-ref-format --branch), aligning WORKFLOW.md (and its carried skill reference) with the gate's current entry behavior.
Changes:
- Add D2.5 to the D2 contract describing the release gate's branch-name validation and its security motivation (preventing workflow-command injection via later branch logging).
- Refresh the workflow contract copy carried in the workflow CI contract skill reference.
- Update the canonical review ledger entries for the touched canonical units.
File summaries
| File | Description |
|---|---|
| WORKFLOW.md | Documents D2.5: release gate rejects invalid branch values via git check-ref-format --branch. |
| reports/canonical-review.json | Updates digests and stamps for the canonical units affected by the contract change. |
| .github/skills/workflow-ci-contract/references/d-guarantees.md | Regenerated skill reference reflecting the new D2.5 guarantee. |
| .claude-plugin/fleet-skills/skills/workflow-ci-contract/references/d-guarantees.md | Regenerated plugin skill reference reflecting the new D2.5 guarantee. |
| .claude-plugin/fleet-skills/.source-digests/workflow-ci-contract | Updates the plugin digest stamp for the workflow-ci-contract skill distribution. |
| .agents/skills/workflow-ci-contract/references/d-guarantees.md | Source-of-truth skill reference updated with D2.5. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Promotes `develop` to `main`, carrying #1550. #1550 records in `WORKFLOW.md` D2 the branch-name refusal the release gate already performs, as a new D2.5: `validate-release` runs `git check-ref-format --branch` over the `branch` input and fails when git rejects it, ahead of D2.2's smoke exit, with an error echoing no part of the value. That stops a `::` or `##[` in a caller's value forming a workflow command wherever a later step prints the branch, on a smoke run as much as on a publish. The `workflow-ci-contract` Skill's generated include carries the same text. Closes #1531 ## Adopter impact Documentation only. No workflow, action, or script change, so no fleet repository's build or publish behavior moves. A repository whose release task takes no `branch` input reads D2.5 as N/A under section 1's applicability rule, the way `reports/homeassistant-purpleair/audit.md` already records D2.2. ## Verification - Copilot reviewed #1550 at full coverage on its head with no findings, no threads, and no suppressed findings, and CodeRabbit reported no actionable comments between the merge base and that same head. - A local strict-review pass over the whole diff, and a carried-content pass over both canonical units this change moves, recorded in `reports/canonical-review.json`. - `build_dist.py --check`, `spec/validate.py`, the prose and EOL gates, and `docker_lint.py`'s seven linters are green. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_012u4N7gEcqT9QwTusr1qtUc
Summary
Fixes #1531. The release task's
validate-releasegate refuses, ahead of its smoke exit, anybranchinput thatgit check-ref-format --branchrejects (build-release-task.yml:139-142). That refusal landed with the fix for the version step logging the branch unsanitized, andWORKFLOW.mdD2 never recorded it, so the contract listed less than the gate asserts at entry. Nothing reachable trips it, since a documented caller passesgithub.ref_nameorgithub.base_ref || github.ref_name, but D2's validate-at-entry guarantees exist to record exactly what the gate asserts.WORKFLOW.md: a new D2.5 states the input (a release task taking abranchinput, on any run), the output (the gate runsgit check-ref-format --branchover that value and fails when git rejects it, ahead of D2.2's smoke exit, with an error echoing no part of the value), and what it prevents (a::or##[in a caller's value forming a workflow command wherever a later step prints the branch, on a smoke run as much as on a publish).workflow-ci-contractSkill carries section 4 whole as a generated include, soscripts/build_dist.pyrefreshedd-guarantees.mdin the source tree and in both generated distributions.reports/canonical-review.json: the whole-unit pass over the two canonical units this change moves.D2.5 is its own item rather than a clause of D2.2, which keeps each item asserting one thing and leaves D2.1 through D2.4 numbered as the audit reports and
publish-release.ymlalready cite them. The S1, S4, and S10 rows of section 5 are unchanged: each describes a run whose branch value is a real ref name, which the refusal never reaches.Verification
python3 scripts/build_dist.py --check: generated skill distributions are current.python3 spec/validate.py: 22 cataloged repos classify cleanly.python3 scripts/prose_lint.py . --diff HEADandpython3 scripts/repo_gate.py --check eol: clean.python3 scripts/docker_lint.py: 7 linters clean, markdownlint over 185 files and editorconfig-checker over 352.🤖 Generated with Claude Code
https://claude.ai/code/session_012u4N7gEcqT9QwTusr1qtUc
Summary by CodeRabbit
Documentation
Chores