Skip to content

Promote develop to main: reusable validate-task gates the publisher - #321

Merged
ptr727 merged 1 commit into
mainfrom
develop
Jul 16, 2026
Merged

Promote develop to main: reusable validate-task gates the publisher#321
ptr727 merged 1 commit into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Promotes #320 (the #317 incorporation): validation factored into a reusable validate-task.yml, called by the PR workflow (ruleset-bound aggregator unchanged) and by publish-release, so a manual dispatch cannot cut a release from a ref that fails validation. WORKFLOW.md source-only walkthrough states the gate.

Closes #317.

🤖 Generated with Claude Code

…#320)

Incorporates #317 (filed from the Financial-Modeling standup): the
template's publisher carried no pre-release validation gate because the
PR lint was inlined - the reference could not express the gate the spec
(and Financial-Modeling#14's acceptance criteria) require, forcing
downstream divergence from the verbatim carry.

## Changes

- **`validate-task.yml` (new, `workflow_call`)** - the lint job moves
verbatim; the file/name shape matches the downstream `validate-task.yml`
pattern so carries align.
- **`test-pull-request.yml`** - the `validate` job `uses:` the task.
**The ruleset-bound aggregator keeps its exact name** (`Check pull
request workflow status job` binds by name and stays an inline job); its
`needs:`/result checks point at `validate`.
- **`publish-release.yml`** - gains `validate` (same reusable task) and
`publish.needs: [validate]`: a manual dispatch can no longer cut a
release from a ref that fails validation.
- **`WORKFLOW.md`** source-only walkthrough states the gate, so the spec
and the reference implementation agree and the next downstream re-sync
is byte-for-byte.

## Validation
- actionlint clean; workflow YAML LF; ruleset-bound check context
unchanged.

Closes #317 (fires on promotion).

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 16, 2026 15:11

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.

Pull request overview

This PR aligns the template's source-only release publisher with the spec by factoring the existing PR validation/lint logic into a reusable workflow and reusing it as a hard pre-release gate. This ensures a manual workflow_dispatch cannot publish a release from a ref that fails the same validation used to gate PR merges.

Changes:

  • Added a reusable .github/workflows/validate-task.yml (workflow_call) containing the repo's lint/validation steps.
  • Updated .github/workflows/test-pull-request.yml to call the reusable validation task while keeping the ruleset-bound aggregator job name unchanged.
  • Updated .github/workflows/publish-release.yml to needs: the same reusable validation task before publishing, and documented the gating behavior in WORKFLOW.md.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
WORKFLOW.md Documents that dispatch-only publishers gate release on the reusable validation task to prevent releasing invalid refs.
.github/workflows/validate-task.yml New reusable validation workflow encapsulating lint/spec/registry checks for reuse by PR CI and the publisher.
.github/workflows/test-pull-request.yml Replaces the inlined lint job with a uses: call to validate-task.yml, keeping the required aggregator job intact.
.github/workflows/publish-release.yml Adds a validate job using validate-task.yml and makes publish depend on it, enforcing pre-release validation on dispatch.

@ptr727
ptr727 merged commit 1b88d2b into main Jul 16, 2026
7 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.

Source-only publisher: reference publish-release.yml cannot express the validation gate the spec requires

2 participants