Skip to content

Record the Release Gate's Branch-Name Refusal in the D2 Contract - #1551

Merged
ptr727 merged 1 commit into
mainfrom
develop
Sep 11, 2026
Merged

Record the Release Gate's Branch-Name Refusal in the D2 Contract#1551
ptr727 merged 1 commit into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Sep 11, 2026

Copy link
Copy Markdown
Owner

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 Record the Release Gate's Branch-Name Refusal in the D2 Contract #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.ai/code/session_012u4N7gEcqT9QwTusr1qtUc

## 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 (`build-release-task.yml:139-142`). 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 asserts at entry. Nothing reachable trips it, since a
documented caller passes `github.ref_name` or `github.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 a
`branch` input, on any run), the output (the gate runs `git
check-ref-format --branch` over 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).
- 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 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.yml` already 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 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.
- Local strict review pass over the branch diff, and a carried-content
pass over both canonical units, recorded.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_012u4N7gEcqT9QwTusr1qtUc


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Documentation**
- Added a workflow contract requirement to validate release branch names
before proceeding.
- Invalid branch names are rejected without exposing the submitted value
in errors.

- **Chores**
  - Updated recorded workflow contract review metadata and statuses.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 11, 2026 22:34
@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 55 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 12a11549-dcb0-4987-9e4c-00ad0414b6c6

📥 Commits

Reviewing files that changed from the base of the PR and between afdeb42 and 4486984.

⛔ Files ignored due to path filters (3)
  • .claude-plugin/fleet-skills/.source-digests/workflow-ci-contract is excluded by !.claude-plugin/fleet-skills/**
  • .claude-plugin/fleet-skills/skills/workflow-ci-contract/references/d-guarantees.md is excluded by !.claude-plugin/fleet-skills/**
  • .github/skills/workflow-ci-contract/references/d-guarantees.md is excluded by !.github/skills/**
📒 Files selected for processing (3)
  • .agents/skills/workflow-ci-contract/references/d-guarantees.md
  • WORKFLOW.md
  • reports/canonical-review.json

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

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

@ptr727

ptr727 commented Sep 11, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The documentation change matches the existing validate-release behavior and the regenerated skill/ledger updates are consistent with the documented contract.

Pull request overview

Updates the workflow behavioral contract to explicitly document the existing release gate behavior that rejects invalid branch inputs before the smoke-run early exit, aligning WORKFLOW.md and the workflow-ci-contract references with what validate-release already enforces.

Changes:

  • Add D2.5 to the D2 contract documenting git check-ref-format --branch validation and the no-echo error behavior.
  • Refresh the skill reference copies of the D2 guarantees to include the new D2.5 entry.
  • Update the canonical review ledger digests/stamps for the touched canonical units.
File summaries
File Description
WORKFLOW.md Documents the branch-name refusal as D2.5 in the behavioral contract.
reports/canonical-review.json Updates canonical-unit digests and record metadata for the changed units.
.agents/skills/workflow-ci-contract/references/d-guarantees.md Updates the source skill reference contract with D2.5.
.github/skills/workflow-ci-contract/references/d-guarantees.md Regenerated GitHub Copilot skill reference with D2.5.
.claude-plugin/fleet-skills/skills/workflow-ci-contract/references/d-guarantees.md Regenerated Claude plugin skill reference with D2.5.
.claude-plugin/fleet-skills/.source-digests/workflow-ci-contract Updates the plugin source digest for the workflow-ci-contract skill.
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.

@ptr727
ptr727 merged commit 6e85973 into main Sep 11, 2026
9 checks passed
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.

WORKFLOW.md D2 Does Not Describe the Release Gate's Branch-Name Refusal

2 participants