Skip to content

chore: run the release-notes vale check in /pre-ci - #10266

Open
ogenstad wants to merge 1 commit into
stablefrom
po-changelog-vale-pre-ci
Open

chore: run the release-notes vale check in /pre-ci#10266
ogenstad wants to merge 1 commit into
stablefrom
po-changelog-vale-pre-ci

Conversation

@ogenstad

@ogenstad ogenstad commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Problem

CI's validate-release-notes-style job (.github/workflows/ci.yml:1062-1085) runs
vale over changelog/, docs/docs/release-notes/infrahub/ and CHANGELOG.md.
.vale.ini applies BasedOnStyles = Infrahub to changelog/**/*.md, so towncrier
fragments genuinely are style-checked there.

Nothing in the local pre-push flow ran an equivalent:

  • /pre-ci ran docs.lint, whose docs.vale step only covers ./docs.
  • docs.validate only regenerates docs and runs git diff --exit-code docs.
  • .pre-commit-config.yaml covers 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.vale as an eighth Phase 3 check in /pre-ci.
release.vale (tasks/release.py:35-47) already existed and runs the identical vale
invocation as the CI job. Nothing routed to it.

Also updates the --fast skip list and the summary table.

.claude/commands is a symlink to .agents/commands, so the single file edit covers
both views.

Verification

Passes on the current tree, and warnings do not fail the check:

$ uv run invoke release.vale
0 errors, 3 warnings and 0 suggestions in 120 files.
exit=0

The 3 warnings are pre-existing, in release-note mdx files, and CI tolerates them
today.

Catches a bad fragment end to end:

$ printf 'Fixed a bug in the graphQL api.\n' > changelog/99999.fixed.md
$ uv run invoke release.vale
 changelog/99999.fixed.md
 1:28  error  Did you really mean 'api'?  Infrahub.spelling
exit=1

Notes

Deliberately uses release.vale rather than release.lint. release.lint also runs
release.markdownlint, which fails today for reasons unrelated to fragment prose
(MD041 fires on every fragment by design, plus pre-existing CHANGELOG.md
violations). That is handled in a separate PR; once it lands, this line can be
upgraded to release.lint to pick up the towncrier draft check too.

No changelog fragment: this is developer tooling with no user-facing effect.

Review in cubic

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.
@ogenstad ogenstad added the ci/skip-changelog Don't include this PR in the changelog label Aug 14, 2026

@cubic-dev-ai cubic-dev-ai Bot 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.

2 issues found across 1 file

Confidence score: 4/5

  • In tasks/release.py (release.vale, referenced by .agents/commands/pre-ci.md item 8), missing vale currently 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 when vale is absent.
  • In .agents/commands/pre-ci.md item 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.

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.

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.

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.

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/skip-changelog Don't include this PR in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants