Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .agents/commands/pre-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Run all locally-executable CI checks to catch issues before pushing.

**Options:**

- `--fast` — Run only formatting and fast lint checks (~20s). Skips backend lint (ty/mypy), Betterer, docs lint, generated file and doc validation, schema validation, and unit tests.
- `--fast` — Run only formatting and fast lint checks (~20s). Skips backend lint (ty/mypy), Betterer, docs lint, generated file and doc validation, schema validation, release notes style, and unit tests.

## Phase 1 — Auto-fix formatting (sequential)

Expand Down Expand Up @@ -65,7 +65,7 @@ Auto-fixes formatting and lint issues in TypeScript/TSX files. If Biome reports

## Phase 3 — Slow checks (parallel)

**IMPORTANT: Send ALL 7 commands below in a SINGLE message with 7 parallel Bash tool calls.** Do NOT run them one at a time.
**IMPORTANT: Send ALL 8 commands below in a SINGLE message with 8 parallel Bash tool calls.** Do NOT run them one at a time.

1. `uv run invoke backend.lint` — Run separately from main.lint to avoid `uv run invoke lint` which includes a `yamllint -s .` step that fails on vendored packages in `.venv`. If ruff reports issues, they were not auto-fixable — report them to the user.
2. `cd frontend/app && npx betterer` — Ensures no new TypeScript errors are introduced. The issue count must stay the same or decrease. If it increases, report the new issues to the user.
Expand All @@ -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.

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>

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>


## Phase 4 — Unit tests

Expand Down Expand Up @@ -104,6 +105,7 @@ Summarize results in a table:
| GraphQL schema validation | ... |
| JSON schema validation | ... |
| Generated docs validation | ... |
| Release notes style | ... |
| Unit tests | ... |

If `--fast` was used, show skipped checks as "skipped".
Expand Down