Repository navigation
Add a Build-Release-Asset Hook for File Targets the Release Task Ships No Leaf For - #2295
Conversation
…s No Leaf For An eda or homeassistant repo ships a data or integration zip on its GitHub release, which none of build-release-task.yml's leaves can build, while the audit retires the repo's own copy of the task. The new enable_release_asset input runs a build-release-asset job that calls the caller's required .github/actions/build-release-asset hook, checks it wrote at least one file, and uploads release-asset-<branch>-build-release-asset itself, so the smoke gate and the one-day retention hold for every caller. The input defaults false, since the hook has no hub default, so no existing caller changes. WORKFLOW.md's library, homeassistant, and eda rows and the reusable-workflows hook catalog name the hook, and a release guard pins its upload gate, its retention, its needs edges, and its default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ntract A subdirectory never reaches the release and a dot-prefixed file is never uploaded, so the output check now refuses both rather than letting the release ship short. The hook contract says the files are written on a smoke run too, which the output check already required, and the Output Seam names the hook route beside the one-leaf-per-output one. The retired release-assets hook sentence is dropped, since this hook is that hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
D6.1 now says a file target built through the build-release-asset hook fills <target> with build-release-asset, so the documented route is not the differently-named artifact the homeassistant row calls a defect. The hook contract and the refusal message name symlinks and every other non-regular entry, the presence-gate header names the one input that defaults false, and the release guard now fails if the job loses its enable_release_asset gate or its output checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A symlink to a regular file would upload its target, so the release would not drop it, and the contract and the error message now state what the task accepts instead of a reason that is false for that case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2295 +/- ##
========================================
Coverage 58.22% 58.22%
========================================
Files 16 16
Lines 7821 7821
========================================
Hits 4554 4554
Misses 3267 3267
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The hook must receive the declared ref, and the output-contract guard lacks executable regression coverage.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds a reusable build-release-asset hook for file-based release assets, including validation, uploads, documentation, tests, and regenerated references.
Changes:
- Adds the release-asset workflow job and input.
- Documents the hook contract and adoption path.
- Adds regression guards and updates skill references.
| File | Summary |
|---|---|
WORKFLOW.md |
Documents the file-target hook contract. |
tests/test_release_guards.py |
Adds workflow behavior guards. |
docs/reusable-workflows.md |
Documents hook usage and adoption. |
.github/workflows/build-release-task.yml |
Implements the release-asset job. |
.github/skills/workflow-ci-contract/references/d-guarantees.md |
Regenerated guarantee reference. |
.github/skills/workflow-ci-contract/references/architecture.md |
Regenerated architecture reference. |
.claude-plugin/fleet-skills/skills/workflow-ci-contract/references/d-guarantees.md |
Regenerated guarantee reference. |
.claude-plugin/fleet-skills/skills/workflow-ci-contract/references/architecture.md |
Regenerated architecture reference. |
.claude-plugin/fleet-skills/.source-digests/workflow-ci-contract |
Updates the source digest. |
.agents/skills/workflow-ci-contract/references/d-guarantees.md |
Updates the canonical guarantee reference. |
.agents/skills/workflow-ci-contract/references/architecture.md |
Updates the canonical architecture reference. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…2298) ## Summary Promotes develop to main with the pull request below, which was already reviewed and merged into develop. - [#2295](#2295): `build-release-task.yml` gains an `enable_release_asset` input, default `false`, and a `build-release-asset` job. - **What it is for:** a file target the task ships no leaf for, such as an `eda` data zip or a `homeassistant` integration zip. - **The hook:** the job calls the caller's required `.github/actions/build-release-asset` hook, which writes the files. - **Checks:** the task accepts only top-level regular files with no dot-prefixed name. - **Upload:** the task uploads `release-asset-<branch>-build-release-asset` itself. The upload is skipped on smoke and kept for one day. - **Docs:** WORKFLOW.md (D6.1 and the `library`, `homeassistant`, and `eda` rows) and `docs/reusable-workflows.md` name the route. No existing caller changes, since the input defaults false. The release this promotion unblocks gives KiCadLibrary a pinnable hub commit for its release-chain adoption. 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Summary
An
edaorhomeassistantrepository ships a data or integration zip on its GitHub release. None ofbuild-release-task.yml's leaves can build that zip, and the audit retires the repository's own copy of the task, so these repositories had no conformant route. KiCadLibrary is the first to need one, and homeassistant-purpleair has the same shape.enable_release_assetinput (defaultfalse, so no existing caller changes) runs abuild-release-assetjob. The job calls the caller's required.github/actions/build-release-assethook, which writes the target's files into anoutput-directory, on a smoke run too.release-asset-<branch>-build-release-assetitself. The upload is skipped on smoke (D1.3) and keepsretention-days: 1(D5.4).github-releaseandbuild-dockertake the job inneeds:.<target>), and the section 6library,homeassistant, andedarows. Indocs/reusable-workflows.mdit covers the Hook Contract, the Hook Catalog, Stage 4, and two adoption checkboxes. The generated skill references are regenerated.needs:edges, and its default. Each was proven by mutation. An existing test's job slice is generalized so that inserting a job afterbuild-pypino longer breaks it.The PR carries the
commentslabel for the three new workflow comments.Local review
The local strict review took four passes. It raised 4, 4, 1, and 2 findings, and the first nine were fixed. Of the last two:
upload-artifactrejects, such as:. A smoke run passes it, and the real publish then fails loudly at the upload step with no release cut. Nothing is dropped silently, which was the reason for refusing dotfiles.Verification
All of these pass locally:
python3 -m unittest discover -s tests(2004 tests)spec/validate.pyscripts/build_dist.py --checkscripts/repo_gate.pyscripts/docker_lint.pylintersscripts/prose_lint.py --diff origin/develop, apart from the labelledcomment-addedlinesA probe ran the output check against constructed directories, and only the regular-files case passes.
The job itself runs for the first time on KiCadLibrary's adoption pull request, since the hub carries no hook of its own for it.
🤖 Generated with Claude Code