Skip to content

Promote develop to main: A Build-Release-Asset Hook for File Targets - #2298

Merged
ptr727 merged 1 commit into
mainfrom
develop
Oct 3, 2026
Merged

ptr727 merged 1 commit into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Summary

Promotes develop to main with the pull request below, which was already reviewed and merged into develop.

  • #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

…s No Leaf For (#2295)

## Summary

An `eda` or `homeassistant` repository ships a data or integration zip
on its GitHub release. None of `build-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.

- **A new `enable_release_asset` input** (default `false`, so no
existing caller changes) runs a `build-release-asset` job. The job calls
the caller's required `.github/actions/build-release-asset` hook, which
writes the target's files into an `output-directory`, on a smoke run
too.
- **The task owns the seam.** It requires at least one top-level regular
file, refuses a subdirectory, a symlink, or a dot-prefixed name, and
uploads `release-asset-<branch>-build-release-asset` itself. The upload
is skipped on smoke (D1.3) and keeps `retention-days: 1` (D5.4).
`github-release` and `build-docker` take the job in `needs:`.
- **The contract names the route.** That covers WORKFLOW.md "Two
Layers", "Output Seam by Destination", D6.1 (what fills `<target>`), and
the section 6 `library`, `homeassistant`, and `eda` rows. In
`docs/reusable-workflows.md` it covers the Hook Contract, the Hook
Catalog, Stage 4, and two adoption checkboxes. The generated skill
references are regenerated.
- **A release guard** pins the job's gate, its upload gate and
retention, its output checks, its `needs:` edges, and its default. Each
was proven by mutation. An existing test's job slice is generalized so
that inserting a job after `build-pypi` no longer breaks it.

The PR carries the `comments` label 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:
- **Declined:** a hook file name containing a character
`upload-artifact` rejects, 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.
- **Deferred:** "Adopting the Release Chain" has no caller-stub variant
for a file-target repository yet. It will be written from KiCadLibrary's
release-chain adoption, which is the first such stub.

## Verification

All of these pass locally:
- `python3 -m unittest discover -s tests` (2004 tests)
- `spec/validate.py`
- `scripts/build_dist.py --check`
- ruff and mypy
- `scripts/repo_gate.py`
- all seven `scripts/docker_lint.py` linters
- `scripts/prose_lint.py --diff origin/develop`, apart from the labelled
`comment-added` lines

A 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](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 3, 2026 04:53
@ptr727 ptr727 added the comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses label Oct 3, 2026
@coderabbitai

coderabbitai Bot commented Oct 3, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b13d0dfd-67d9-4e04-a3a7-92d64ad8083d
  • Autopilot · 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

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

@codecov

codecov Bot commented Oct 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.22%. Comparing base (cce212f) to head (fc8fc7c).
⚠️ Report is 305 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2298   +/-   ##
=======================================
  Coverage   58.22%   58.22%           
=======================================
  Files          16       16           
  Lines        7821     7821           
=======================================
  Hits         4554     4554           
  Misses       3267     3267           
Flag Coverage Δ
python-3.13 58.22% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Copilot review overview

🔵 Needs a closer look

Add executable output-validation regression coverage and align the canonical release guidance.

Review effort: Lite
Findings: None

What changed in this PR

Promotes a caller-built release-asset hook from develop to main.

Changes:

  • Adds optional hook validation and artifact upload.
  • Documents the file-target route and adoption contract.
  • Adds release guards and regenerates workflow references.
  • Outstanding review items include executable invalid-layout tests and documentation alignment.
File Description
WORKFLOW.md Documents file-target architecture and contracts.
tests/​test_release_guards.py Adds workflow guard coverage.
docs/​reusable-workflows.md Documents hook usage and adoption.
.github/​workflows/​build-release-task.yml Implements the release-asset hook job.
.github/​skills/​workflow-ci-contract/​references/​d-guarantees.md Generated contract update.
.github/​skills/​workflow-ci-contract/​references/​architecture.md Generated architecture update.
.claude-plugin/​fleet-skills/​skills/​workflow-ci-contract/​references/​d-guarantees.md Generated contract update.
.claude-plugin/​fleet-skills/​skills/​workflow-ci-contract/​references/​architecture.md Generated architecture update.
.claude-plugin/​fleet-skills/​.source-digests/​workflow-ci-contract Updates the generated-source digest.
.agents/​skills/​workflow-ci-contract/​references/​d-guarantees.md Updates the canonical contract.
.agents/​skills/​workflow-ci-contract/​references/​architecture.md Updates the canonical architecture.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ptr727
ptr727 merged commit 03281fb into main Oct 3, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants