Repository navigation
docs(issues): [#2281] add frontmatter validator command specification - #2337
Merged
josecelano merged 8 commits intoSep 25, 2026
Merged
josecelano merged 8 commits into
josecelano merged 8 commits into
Conversation
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this pull request
Sep 24, 2026
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The validator specification contains unresolved YAML, NDJSON contract, and help/version behavior issues.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Adds the #2281 specification for a read-only frontmatter-validator command and registers it in EPIC #2264.
Changes:
- Defines command modes, diagnostics, severity rules, migration policy, and pre-commit rollout.
- Adds EPIC roadmap row 2.2 and template-drift protection.
| File | Summary |
|---|---|
docs/issues/open/2281-2264-frontmatter-validator-command/ISSUE.md |
Validator specification; findings: blocker F1 (critical, 1 vote), major FM-001 (moderate, 2 votes), and minor FM-002 (moderate, 1 vote). |
docs/issues/open/2264-2003-refactor-semantic-link-conventions/EPIC.md |
Registers subissue 2.2 and updates template-drift ownership. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this pull request
Sep 24, 2026
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this pull request
Sep 25, 2026
Create the local folder-style spec for the frontmatter validator command and pre-commit rollout, recording maintainer decisions D1-D9, and add the missing torrust#2281 row to the parent EPIC torrust#2264 subissue table.
… decision New issues are strict; legacy draft/open specs are not bulk-migrated. The legacy-shape diagnostic becomes an error so a legacy spec migrates when its next change is committed. Recorded as D10, which tightens the torrust#2265 contract's legacy-shape warning.
…PICs Treat primary specs without v1 frontmatter as legacy-shape errors, migrate the seven legacy open EPIC records in this issue (D11), skip existence checks for closed specs, resolve index directory existence from the git ls-files list, require a migration checklist, and defer template-drift protection to EPIC torrust#2264 row 3.
…spec frontmatter Unquoted 'issue #<n>' entries parse as the YAML string 'issue' because '#' after whitespace starts a comment. Quote them, add the quoting rule to the migration checklist, and plan the fix for the same latent defect in the torrust#2266 fixtures and unit test as part of T1.
Specify every stderr record kind (diagnostic, usage_error, runtime_error, help) with field order, nullability, ordering, and examples so the CLI contract can be pinned by tests before implementation. Drop --version so it is an ordinary usage error.
josecelano
force-pushed
the
2281-frontmatter-validator-command-spec
branch
from
September 25, 2026 07:02
8ad0aa4 to
a254f84
Compare
Member
Author
|
ACK a254f84 |
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this pull request
Sep 28, 2026
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this pull request
Sep 28, 2026
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this pull request
Sep 28, 2026
josecelano
added a commit
that referenced
this pull request
Sep 28, 2026
…mand 873f46d fix(frontmatter): [#2281] honour the pre-commit hook index in staged mode (Jose Celano) e27d153 fix(frontmatter): [#2281] address PR review findings (Jose Celano) 2625510 docs(issues): [#2281] keep review history rebase-safe (Jose Celano) 428b5f4 docs(issues): [#2281] keep review evidence rebase-safe (Jose Celano) 5da034b docs(issues): [#2281] record final pre-PR review (Jose Celano) 7bcbd57 docs(issues): [#2281] record the follow-up review and its remediation (Jose Celano) 98cafc9 fix(frontmatter): [#2281] expand directories under GIT_LITERAL_PATHSPECS (Jose Celano) 7a7c286 docs(issues): [#2281] record the failed pre-PR review and its remediation (Jose Celano) bd7480b docs(frontmatter): [#2281] apply review and retrospective guidance (Jose Celano) 4d86fc4 fix(frontmatter): [#2281] address pre-PR review findings in the command (Jose Celano) 700c60c docs(issues): [#2281] record manual verification, acceptance review, and retrospective (Jose Celano) ae8dce5 test(frontmatter): [#2281] cover each failure family at the command boundary (Jose Celano) d6ae2b6 docs(issues): [#2281] record T7 completion (Jose Celano) 074eb49 feat(frontmatter): [#2281] run the validator in pre-commit and document it (Jose Celano) fd33af1 docs(issues): [#2281] fix spelling in the T6 progress entry (Jose Celano) 9aecf3d docs(issues): [#2281] record the whole-tree baseline and T6 decisions (Jose Celano) 53d3844 docs(issues): [#2281] migrate EPIC #2264 frontmatter to v1 (Jose Celano) ceef8d9 docs(issues): [#2281] migrate EPIC #2243 frontmatter to v1 (Jose Celano) f2d2294 docs(issues): [#2281] migrate EPIC #2003 frontmatter to v1 (Jose Celano) f2a6bbf docs(issues): [#2281] migrate EPIC #1840 frontmatter to v1 (Jose Celano) 474a302 docs(issues): [#2281] migrate EPIC #1669 frontmatter to v1 (Jose Celano) 09f361a docs(issues): [#2281] migrate EPIC #1488 frontmatter to v1 (Jose Celano) ce5089f docs(issues): [#2281] migrate EPIC #1347 frontmatter to v1 (Jose Celano) e9387f0 docs(issues): [#2281] repair invalid v1 frontmatter in three open specs (Jose Celano) 52a2dbe docs(issues): [#2281] move unsupported semantic-link keys into related-artifacts (Jose Celano) cb74be0 docs(issues): [#2281] fix malformed frontmatter indentation in closed records (Jose Celano) f3e9717 feat(frontmatter): [#2281] add repository-aware checks for strict specs (Jose Celano) 2b6d252 feat(frontmatter): [#2281] apply location-dependent severity and warnings (Jose Celano) 3d80783 feat(frontmatter): [#2281] add discovery, staged, and whole-tree modes (Jose Celano) 903b556 docs(issues): [#2281] record approval of the vertical-slice review (Jose Celano) 01f2ab8 refactor(frontmatter): [#2281] split the validator binary into modules (Jose Celano) d529c02 feat(frontmatter): [#2281] add the validator command with explicit-path mode (Jose Celano) 01babfc test(frontmatter): [#2281] parameterize diagnostic name tests with rstest (Jose Celano) 3a0cf1b fix(frontmatter): [#2281] reject issue references truncated by unquoted YAML comments (Jose Celano) 76289d4 feat(frontmatter): [#2281] add severity and field path to diagnostics (Jose Celano) cc7f3c3 docs(issues): [#2281] start implementation after spec PR #2337 merged (Jose Celano) Pull request description: ## Summary Adds the frontmatter-validator Rust command with explicit-path, --staged, and --all modes, structured NDJSON diagnostics, repository-aware strict-v1 validation, and generated schema support. Integrates staged Markdown frontmatter validation into the pre-commit hook and documents the migration and relocation workflow. ## Validation - cargo test --package frontmatter-validator - cargo clippy --package frontmatter-validator --all-targets -- -D warnings - cargo +nightly fmt --all -- --check - linter all - contrib/dev-tools/git/hooks/pre-commit.sh - Independent Task Reviewer re-review, including GIT_LITERAL_PATHSPECS=1 regression coverage Closes #2281 ACKs for top commit: josecelano: ACK 873f46d Tree-SHA512: 71ec6a97a46403fd549e74a8c5ffdf69a3e4ee9f380f751b7c2ce70dedf7b98883c94e2113b126a139c6134ff9a93f38f27fdd085f1cf1b0e3894201eb72f4fb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Adds the reviewed #2281 specification for the read-only
frontmatter-validatorcommand and its pre-commit rollout, and registers the missing #2281 row (2.2) in parent EPIC #2264.The specification records maintainer decisions D1-D11:
frontmatter-validatorbinary in the existing crate, usingclapwith all output (help, usage errors, diagnostics) as NDJSON on stderr and no stdout.--staged(index content), and--all.spec-path, related-artifact existence, and skill resolution.legacy-shapeerror when its next change is committed. This tightens the Inventory and Resolve Markdown Frontmatter Contracts #2265 contract's legacy-shape warning.It also adds template-drift protection to EPIC #2264 row 3, because this issue excludes
docs/templates/from validation.Scope
Validation
linter allTORRUST_GIT_HOOKS_LOG_DIR=.tmp ./contrib/dev-tools/git/hooks/pre-commit.shRelated to #2281