Incorporate #317: factor validation into a reusable validate-task.yml - #320
Conversation
The publisher carried no validation gate because the PR lint was inlined - the reference could not express the pre-release gate the spec (and the Financial-Modeling #14 criteria) require. validate-task.yml (workflow_call) is now called by test-pull-request (aggregator unchanged - the ruleset-bound check keeps its name) and by publish-release (publish needs: validate, so a dispatch cannot release a ref that fails validation). WORKFLOW.md source-only walkthrough states the gate. Closes#317 (keyword fires on promotion). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Factors the repo’s lint/validation logic into a reusable workflow so both PR validation and manual release dispatches share the same single validation gate, aligning the template with the spec/acceptance criteria from #317.
Changes:
- Adds a reusable
.github/workflows/validate-task.yml(workflow_call) that encapsulates the existing lint/validation steps. - Updates
test-pull-request.ymlto call the reusable validation task while keeping the ruleset-bound aggregator job name unchanged. - Updates
publish-release.ymlto run validation before publishing, and documents the gate inWORKFLOW.md.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/workflows/validate-task.yml | New reusable validation workflow that centralizes lint/spec validation steps. |
.github/workflows/test-pull-request.yml | Replaces the inline lint job with a call to the reusable validate task; aggregator now depends on validate. |
.github/workflows/publish-release.yml | Adds a validate job and gates publish on it so dispatch releases cannot bypass validation. |
WORKFLOW.md | Updates the source-only walkthrough to explicitly describe the dispatch publisher’s validation gate. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Collapse the moved/new workflow comments to single lines per comment hygiene, and add --pull=always to the editorconfig-checker invocation to match the canonical lint command. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
.github/workflows/publish-release.yml:30
- Because
publishnow gates onvalidate, both jobs should operate on the same commit SHA. Currently the publish job checks outref: ${{ github.ref_name }}(a moving branch ref), so if new commits land after the workflow starts,validatecan pass on the originalgithub.shawhilepublishreleases a newer, unvalidated commit. Pin the publish checkout togithub.shaso the validated ref and released commit always match.
needs: [ validate ]
permissions:
contents: write
steps:
Uh oh!
There was an error while loading. Please reload this page.
…321) 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](https://claude.com/claude-code)
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 downstreamvalidate-task.ymlpattern so carries align.test-pull-request.yml- thevalidatejobuses:the task. The ruleset-bound aggregator keeps its exact name (Check pull request workflow status jobbinds by name and stays an inline job); itsneeds:/result checks point atvalidate.publish-release.yml- gainsvalidate(same reusable task) andpublish.needs: [validate]: a manual dispatch can no longer cut a release from a ref that fails validation.WORKFLOW.mdsource-only walkthrough states the gate, so the spec and the reference implementation agree and the next downstream re-sync is byte-for-byte.Validation
Closes#317 (fires on promotion).
🤖 Generated with Claude Code