Consume the fleet prose rules from the hub - #36
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## develop #36 +/- ##
========================================
Coverage 44.96% 44.96% ========================================
Files 25 25 Lines 3398 3398 Branches 259 259 ========================================
Hits 1528 1528 Misses 1824 1824 Partials 46 46 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the reusable validation workflow to consume the fleet “prose gate” as a composite action from the hub repo, so prose-rule violations are enforced in CI (diff-scoped) without vendoring the checker into this repository.
Changes:
- Fetch full git history in the lint job checkout to support diffing against a base.
- Add a new “Check prose” step that runs
ptr727/ProjectTemplate/.github/actions/prose-gateand passes a base ref.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (2)
.github/workflows/validate-task.yml:105
- PR description says the prose-gate pin currently targets
4ad0156, but this workflow uses4e21a27fff0e59bdb44a3bab94b077391c4c8ddd. Please confirm which SHA should be pinned and update either the workflow or the PR description so they match (important for reproducibility/auditability).
- name: Check prose step
if: ${{ github.ref_name != 'main' }}
uses: ptr727/ProjectTemplate/.github/actions/prose-gate@4e21a27fff0e59bdb44a3bab94b077391c4c8ddd # conformance/prose-gate-carry
with:
base: origin/${{ github.ref_name == 'develop' && 'main' || 'develop' }}
.github/workflows/validate-task.yml:100
- These comments imply this workflow itself runs on
push, butvalidate-task.ymlis a reusableworkflow_call. It’s invoked by a push-triggered workflow in this repo, so the intent is correct, but the wording is slightly misleading; tightening it avoids confusion for future callers that may invoke it via other events (e.g., workflow_dispatch).
# The base is the branch this one merges into.
# The gate runs on push, so there is no pull_request event to read a base from.
# Runs on main are skipped, since it only receives promotion merges already gated on develop.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (2)
.github/workflows/validate-task.yml:108
- The PR description says the action pin targets
4ad0156, but the workflow currently pins4e21a27…. If4e21a27…is the intended pin, consider updating the inline comment to include the short SHA (and ensure the PR description is updated) to avoid confusion about which hub commit is being exercised.
if: ${{ github.event_name == 'push' && github.ref_name != 'main' }}
uses: ptr727/ProjectTemplate/.github/actions/prose-gate@4e21a27fff0e59bdb44a3bab94b077391c4c8ddd # conformance/prose-gate-carry
with:
.github/workflows/validate-task.yml:96
- The comment block says a main run uses the bundled copy at the pin, but this step is explicitly skipped on
mainby theif:condition below. This is internally inconsistent and can mislead future edits/debugging of the workflow behavior.
This issue also appears on line 106 of the same file.
# The fleet prose rules live in the hub, so this repo consumes them rather than vendoring them.
# Every branch but main reads hub develop, so a rule change is exercised before promotion.
# A main run uses the copy bundled at the pin, so a released build stays reproducible.
# Only lines a change touches are reported, so the existing backlog blocks nothing.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Suppressed comments (2)
.github/workflows/validate-task.yml:108
- The PR description says the action pin “currently targets
4ad0156”, but this workflow pinsptr727/ProjectTemplate/.github/actions/prose-gateto4e21a27fff0e59bdb44a3bab94b077391c4c8ddd. This mismatch makes it unclear which hub commit/ref is intended for the live test and what needs to be repointed before merge.
if: ${{ github.event_name == 'push' && github.ref_name != 'main' }}
uses: ptr727/ProjectTemplate/.github/actions/prose-gate@4e21a27fff0e59bdb44a3bab94b077391c4c8ddd # conformance/prose-gate-carry
with:
.github/workflows/validate-task.yml:104
- This comment block says “A main run uses the copy bundled at the pin”, but the step is explicitly skipped on
mainbelow. Consider updating the comments so they describe the actual behavior consistently (non-main only, main skipped).
# Every branch but main reads hub develop, so a rule change is exercised before promotion.
# A main run uses the copy bundled at the pin, so a released build stays reproducible.
# Only lines a change touches are reported, so the existing backlog blocks nothing.
#
# The base is the branch this one merges into.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (2)
.github/workflows/validate-task.yml:96
- The inline comment says “A main run uses the copy bundled at the pin”, but this workflow explicitly skips main (
if: ... && github.ref_name != 'main'). That makes the comment misleading for this repo; consider phrasing it as “the action’s design” (or dropping the main-run note) so future maintainers don’t assume validate-task enforces a prose gate on main.
# The fleet prose rules live in the hub, so this repo consumes them rather than vendoring them.
# Every branch but main reads hub develop, so a rule change is exercised before promotion.
# A main run uses the copy bundled at the pin, so a released build stays reproducible.
# Only lines a change touches are reported, so the existing backlog blocks nothing.
.github/workflows/validate-task.yml:107
- PR description mentions the pin currently targeting a different hub commit; to avoid confusion during the planned repoint, consider making the intent explicit inline (temporary pin + follow-up repoint) rather than relying on the PR description staying in sync.
uses: ptr727/ProjectTemplate/.github/actions/prose-gate@4e21a27fff0e59bdb44a3bab94b077391c4c8ddd # conformance/prose-gate-carry
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (2)
.github/workflows/validate-task.yml:63
actions/checkoutis now always doing a full clone (fetch-depth: 0) for the entire lint job, even on publish (workflow_dispatch/schedule) runs where the prose gate is intentionally skipped. That adds unnecessary network/time overhead to releases and other non-push runs.
Consider making fetch-depth conditional so only branch pushes that actually run the prose gate fetch full history; keep other runs shallow.
- name: Checkout code step
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
# The prose gate diffs against the base branch, so it needs that branch's history.
fetch-depth: 0
.github/workflows/validate-task.yml:111
- The PR description says the temporary pin targets
4ad0156, but the workflow currently pins the prose-gate action to4e21a27…. This mismatch makes it harder to verify the intended hub commit/branch for the live test and for the later repointing step.
Please update the PR description (or the pin) so they refer to the same commit.
# TEMPORARY PIN: this SHA is the head of the hub's conformance/prose-gate-carry branch and
# is not on hub main, so it carries no released version.
# Repoint it to a released hub commit once ptr727/ProjectTemplate#520 merges.
# Dependabot cannot bump a pin that resolves to no tag, so nothing will do this for us.
uses: ptr727/ProjectTemplate/.github/actions/prose-gate@4e21a27fff0e59bdb44a3bab94b077391c4c8ddd # conformance/prose-gate-carry
with:
ptr727
commented
Aug 2, 2026
Suppressed findings answeredTen collapsed findings across six rounds, most of them the same three points restated as the branch moved. Answering all of them, grouped by point rather than by round, with the rounds named so each can be traced back. A. The pin contradicts the PR description - Fixed, description correctedRaised five times: rounds on
Correct, and correctly persistent: I repointed the pin twice without updating the description, so the mismatch survived four more rounds of it being raised. The description now names the current pin, B. The comment described main-run behavior the workflow never reaches - Fixed in |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (1)
.github/workflows/validate-task.yml:66
- The
fetch-depthexpression will never evaluate to0here. In GitHub Actions expressions,0is falsy, so(cond) && 0 || 1becomes0 || 1whencondis true, yielding1. That means the base branch history likely won’t be available when the prose gate runs.
fetch-depth: ${{ (github.event_name == 'push' && github.ref_name != 'main') && 0 || 1 }}
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (1)
.github/workflows/validate-task.yml:66
- The
&& 0 || 1pattern doesn’t work here because0is falsy in GitHub Actions expressions. When the condition is true, it evaluates to0 || 1, which becomes1, so the workflow will still do a shallow clone and the prose gate won’t have the base branch history it needs.
fetch-depth: ${{ (github.event_name == 'push' && github.ref_name != 'main') && 0 || 1 }}
ptr727
commented
Aug 2, 2026
Suppressed findings answered (round 7)Two from the round on
|
ptr727
commented
Aug 2, 2026
Comment sentences spanning lines - found, and why the gate missed themThe maintainer spotted three comment sentences wrapped across lines in this PR's diff, on a branch I had reported as gate-clean. The gate was right and my verification was wrong. Fixed in I ran the gate from the hub's directory with an absolute path to this checkout:
The three were real, all in comments I wrote:
Each is now one sentence per line. The misuse that produced the false clean is fixed upstream in That is the third false-clean class found on this PR, after the unresolvable diff base widening to a whole-tree scan and a multi-line |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (1)
.github/workflows/validate-task.yml:117
- The workflow comment claims this pin is "the hub's develop" and ties it to ProjectTemplate#520, but the PR description references a different SHA/branch state. To avoid stale or contradictory metadata, consider rewording the comment to describe this as a SHA pin (and whether it contains #520) without asserting it is exactly
develop.
# This SHA is the hub's develop, where ptr727/ProjectTemplate#520 landed.
# It carries no release tag yet, so Dependabot cannot compare it and will not bump it.
# Repoint it by hand at the next hub release.
# Dependabot tracks it like any other action pin from then on.
uses: ptr727/ProjectTemplate/.github/actions/prose-gate@cbd5eb3c9e079b640d5461400d89b390de2f0780 # hub develop
ptr727
commented
Aug 2, 2026
Suppressed findings answered (round 12)One from the round on
|
Uh oh!
There was an error while loading. Please reload this page.
* Consume the fleet prose rules from the hub The prose rules that govern this repository live in the hub, and until now nothing here ran them, so a comment or a sentence breaking a documented rule reached main with every linter green. Consume the hub's composite action rather than vendoring its checker, so a rule change lands in one place instead of in every repository holding a copy. A develop-targeted run reads the rules from hub develop, so an unpromoted change is exercised here before it is promoted, and every other run uses the copy bundled at the pinned commit so a released build stays reproducible. The gate reports only lines a change touches, so the repository's existing prose backlog blocks nothing and is corrected as each file is next edited. Checkout gains full history in the lint job, because diffing against the base branch needs that branch present. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Point the prose gate at the branch it merges into The gate runs on push, because this repository has no pull_request trigger, so there is no event base to read and the first run diffed against an empty ref. Unresolvable, it reported the whole repository instead of the lines this change touches. Name the base explicitly as the branch being merged into, and skip main, which only receives promotion merges already gated on develop. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Skip the prose gate on a publish run A publish reaches validate-task through build-release-task, where the content was already gated when it was pushed. Re-reading it there would diff the whole unpromoted delta against main and could fail a release on prose that already passed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Cut the publish-run comment to one sentence per line Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Describe what this workflow does, and mark the pin temporary The comment described the action's main-run behavior, which this workflow never reaches because it skips main outright. A maintainer reading it would assume a prose gate runs on main. The pin targets an unmerged hub commit, and that intent lived only in the pull request description, which does not survive the merge. State it inline instead, including that Dependabot cannot bump a pin resolving to no tag, so the repoint is manual. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Only pay for full history on the runs that use it The lint job always full-cloned, including publish runs where the prose gate is skipped, which is time and network a release does not need. Tie the fetch depth to the same condition the gate uses, so the two cannot drift apart. Repoint the pin to the hub branch head, which carries the fix for a multi-line paths input that scanned only its first entry. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Quote the fetch depths so the true branch is not falsy An unquoted 0 is falsy in an Actions expression, so the ternary collapsed to 1 whenever the condition held and every run shallow-cloned, leaving the prose gate no base branch to diff against. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Cut the wrapped comment sentences to one per line Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Repoint the prose gate at the hub commit that carries it The pin named the head of an unmerged hub branch, which would have gone unreachable once that branch was squashed and deleted, breaking this repository's gate later with nothing here to explain it. ptr727/ProjectTemplate#520 has landed, so point at the commit on hub develop instead. It still carries no release tag, so Dependabot cannot bump it yet and the note says so. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Describe the pin as a SHA rather than as a branch A pin that calls itself develop stops being true the moment develop moves. Name what it contains instead. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
First fleet adoption of the hub's prose gate, and the live test of its ref design. Pairs with ptr727/ProjectTemplate#520.
What this repository gains
The prose rules that govern it live in the hub, and nothing here ran them, so a comment or a sentence breaking a documented rule reached
mainwith every linter green.markdownlint,cspell,actionlintandeditorconfig-checkerall pass on prose that breaks a GOVERNANCE.md rule, which is exactly why the gate exists.Why an action instead of a vendored script
The checker is a 934-line Python file with a 1,349-line test beside it. Copying it into every repository would make each rule change a fleet-wide sweep and would put twenty drifting copies where one canonical belongs. Consuming it as a composite action is possible because the hub is public: a public repository's actions are consumable by any repository, with no organization account required.
The ref design under test
uses:pin is one literal, identical onmainanddevelop.uses:accepts no expressions, so a per-branch ref would be a permanent one-line divergence that everydevelop -> mainpromotion has to carry.develop, so an unpromoted rule change is exercised here before it is promoted. Every other run uses the copy bundled at the pinned commit, so a released build's gate is reproducible and a hub commit cannot retroactively fail a re-run.Checkout gains
fetch-depth: 0in the lint job, since diffing against the base needs that branch present.Pre-flight
The action's logic was simulated end to end against this branch before pushing: the raw fetch of hub
developreturns 200, the fetched checker accepts--diff, and the gate exits 0 on the lines this change touches. Run against this repository's currentdevelopand against #35's head, it also reports zero, so adopting it blocks neither.The pin
Pinned to
cbd5eb3c9e079b640d5461400d89b390de2f0780, the squash commit of ptr727/ProjectTemplate#520 on hubdevelop, so the action this consumes is on a permanent ref rather than on a feature branch that would go unreachable when deleted.That commit carries no release tag, so Dependabot has nothing to compare it against and will not bump it. It gets repointed by hand at the next hub release, after which Dependabot tracks it like any other action pin. The workflow says so inline, rather than relying on this description staying current.