chore: run the release-notes vale check in /pre-ci - #10266
Conversation
CI's validate-release-notes-style job vales changelog/ fragments, the release-notes mdx pages and CHANGELOG.md, but nothing in the local pre-push flow ran an equivalent. docs.lint only covers ./docs and docs.validate only checks that generated docs are committed, so a style error in a towncrier fragment was first reported by CI after the push. Add inv release.vale, which runs the identical vale invocation, as an eighth Phase 3 check.
There was a problem hiding this comment.
2 issues found across 1 file
Confidence score: 4/5
- In
tasks/release.py(release.vale, referenced by.agents/commands/pre-ci.mditem 8), missingvalecurrently returns success after only warning, so CI/pre-release flow can silently skip prose linting and let punctuation/style regressions ship—make the step fail fast or gate success on an explicit opt-out whenvaleis absent. - In
.agents/commands/pre-ci.mditem 8, the truncated line (“warnings are reported but do not.”) leaves warning behavior ambiguous, which can cause inconsistent expectations when triaging check results—complete the sentence to explicitly state that warnings do not fail the check.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".agents/commands/pre-ci.md">
<violation number="1" location=".agents/commands/pre-ci.md:77">
P3: The final sentence of item 8 is truncated: "Only errors fail the check; warnings are reported but do not." It should read "...but do not fail the check." As written it leaves the condition on warnings unfinished and confusing for a developer who relies on it to know whether warnings block a push.</violation>
<violation number="2" location=".agents/commands/pre-ci.md:77">
P3: Item 8 silently no-ops when the `vale` binary is not installed: `release.vale` (tasks/release.py:38-42) checks for vale, prints "Warning, Vale is not installed" and returns success without running the check. The command file adds this as a pre-push gate but never mentions that vale must be installed locally, so a developer without it gets a false "all checks passed" signal. Add a note that vale must be installed for this check to actually run.</violation>
</file>
Shadow auto-approve: would not auto-approve because issues were found.
Re-trigger cubic
| 5. `uv run invoke schema.validate-graphqlschema` — Ensures `schema/schema.graphql` is up to date. Regenerates the file then checks for uncommitted diffs. If validation fails, the correct file is already on disk — just stage and commit it. | ||
| 6. `uv run invoke schema.validate-jsonschema` — Ensures `schema/openapi.json` is up to date. Same approach as GraphQL schema validation. | ||
| 7. `uv run invoke docs.validate` — Ensures generated reference documentation (CLI, schema, events, repository config, config) is up to date. Regenerates the docs then checks for uncommitted diffs. If validation fails, the correct files are already on disk — stage and commit them. | ||
| 8. `uv run invoke release.vale` - Runs the same vale check as CI's `validate-release-notes-style` job, covering `changelog/`, `docs/docs/release-notes/infrahub/` and `CHANGELOG.md`. Catches prose style errors in towncrier fragments before they reach CI, since a fragment's text becomes the release notes. Only errors fail the check; warnings are reported but do not. |
There was a problem hiding this comment.
P3: The final sentence of item 8 is truncated: "Only errors fail the check; warnings are reported but do not." It should read "...but do not fail the check." As written it leaves the condition on warnings unfinished and confusing for a developer who relies on it to know whether warnings block a push.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .agents/commands/pre-ci.md, line 77:
<comment>The final sentence of item 8 is truncated: "Only errors fail the check; warnings are reported but do not." It should read "...but do not fail the check." As written it leaves the condition on warnings unfinished and confusing for a developer who relies on it to know whether warnings block a push.</comment>
<file context>
@@ -74,6 +74,7 @@ Auto-fixes formatting and lint issues in TypeScript/TSX files. If Biome reports
5. `uv run invoke schema.validate-graphqlschema` — Ensures `schema/schema.graphql` is up to date. Regenerates the file then checks for uncommitted diffs. If validation fails, the correct file is already on disk — just stage and commit it.
6. `uv run invoke schema.validate-jsonschema` — Ensures `schema/openapi.json` is up to date. Same approach as GraphQL schema validation.
7. `uv run invoke docs.validate` — Ensures generated reference documentation (CLI, schema, events, repository config, config) is up to date. Regenerates the docs then checks for uncommitted diffs. If validation fails, the correct files are already on disk — stage and commit them.
+8. `uv run invoke release.vale` - Runs the same vale check as CI's `validate-release-notes-style` job, covering `changelog/`, `docs/docs/release-notes/infrahub/` and `CHANGELOG.md`. Catches prose style errors in towncrier fragments before they reach CI, since a fragment's text becomes the release notes. Only errors fail the check; warnings are reported but do not.
## Phase 4 — Unit tests
</file context>
| 5. `uv run invoke schema.validate-graphqlschema` — Ensures `schema/schema.graphql` is up to date. Regenerates the file then checks for uncommitted diffs. If validation fails, the correct file is already on disk — just stage and commit it. | ||
| 6. `uv run invoke schema.validate-jsonschema` — Ensures `schema/openapi.json` is up to date. Same approach as GraphQL schema validation. | ||
| 7. `uv run invoke docs.validate` — Ensures generated reference documentation (CLI, schema, events, repository config, config) is up to date. Regenerates the docs then checks for uncommitted diffs. If validation fails, the correct files are already on disk — stage and commit them. | ||
| 8. `uv run invoke release.vale` - Runs the same vale check as CI's `validate-release-notes-style` job, covering `changelog/`, `docs/docs/release-notes/infrahub/` and `CHANGELOG.md`. Catches prose style errors in towncrier fragments before they reach CI, since a fragment's text becomes the release notes. Only errors fail the check; warnings are reported but do not. |
There was a problem hiding this comment.
P3: Item 8 silently no-ops when the vale binary is not installed: release.vale (tasks/release.py:38-42) checks for vale, prints "Warning, Vale is not installed" and returns success without running the check. The command file adds this as a pre-push gate but never mentions that vale must be installed locally, so a developer without it gets a false "all checks passed" signal. Add a note that vale must be installed for this check to actually run.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .agents/commands/pre-ci.md, line 77:
<comment>Item 8 silently no-ops when the `vale` binary is not installed: `release.vale` (tasks/release.py:38-42) checks for vale, prints "Warning, Vale is not installed" and returns success without running the check. The command file adds this as a pre-push gate but never mentions that vale must be installed locally, so a developer without it gets a false "all checks passed" signal. Add a note that vale must be installed for this check to actually run.</comment>
<file context>
@@ -74,6 +74,7 @@ Auto-fixes formatting and lint issues in TypeScript/TSX files. If Biome reports
5. `uv run invoke schema.validate-graphqlschema` — Ensures `schema/schema.graphql` is up to date. Regenerates the file then checks for uncommitted diffs. If validation fails, the correct file is already on disk — just stage and commit it.
6. `uv run invoke schema.validate-jsonschema` — Ensures `schema/openapi.json` is up to date. Same approach as GraphQL schema validation.
7. `uv run invoke docs.validate` — Ensures generated reference documentation (CLI, schema, events, repository config, config) is up to date. Regenerates the docs then checks for uncommitted diffs. If validation fails, the correct files are already on disk — stage and commit them.
+8. `uv run invoke release.vale` - Runs the same vale check as CI's `validate-release-notes-style` job, covering `changelog/`, `docs/docs/release-notes/infrahub/` and `CHANGELOG.md`. Catches prose style errors in towncrier fragments before they reach CI, since a fragment's text becomes the release notes. Only errors fail the check; warnings are reported but do not.
## Phase 4 — Unit tests
</file context>
Problem
CI's
validate-release-notes-stylejob (.github/workflows/ci.yml:1062-1085) runsvale over
changelog/,docs/docs/release-notes/infrahub/andCHANGELOG.md..vale.iniappliesBasedOnStyles = Infrahubtochangelog/**/*.md, so towncrierfragments genuinely are style-checked there.
Nothing in the local pre-push flow ran an equivalent:
/pre-cirandocs.lint, whosedocs.valestep only covers./docs.docs.validateonly regenerates docs and runsgit diff --exit-code docs..pre-commit-config.yamlcovers whitespace, ruff, yaml and toml. No prose linting.So the first signal that a fragment had a style error was a failed CI job after the
push. Fragments are the source text for release notes, which makes these the errors
most worth catching early.
Change
Adds
uv run invoke release.valeas an eighth Phase 3 check in/pre-ci.release.vale(tasks/release.py:35-47) already existed and runs the identical valeinvocation as the CI job. Nothing routed to it.
Also updates the
--fastskip list and the summary table..claude/commandsis a symlink to.agents/commands, so the single file edit coversboth views.
Verification
Passes on the current tree, and warnings do not fail the check:
The 3 warnings are pre-existing, in release-note mdx files, and CI tolerates them
today.
Catches a bad fragment end to end:
Notes
Deliberately uses
release.valerather thanrelease.lint.release.lintalso runsrelease.markdownlint, which fails today for reasons unrelated to fragment prose(MD041 fires on every fragment by design, plus pre-existing
CHANGELOG.mdviolations). That is handled in a separate PR; once it lands, this line can be
upgraded to
release.lintto pick up the towncrier draft check too.No changelog fragment: this is developer tooling with no user-facing effect.