Skip to content

feat(frontmatter): [#2266] add structural validator model - #2287

Merged
josecelano merged 13 commits into
torrust:developfrom
josecelano:2266-rust-frontmatter-model-validator
Sep 22, 2026
Merged

josecelano merged 13 commits into
torrust:developfrom
josecelano:2266-rust-frontmatter-model-validator

Conversation

@josecelano

@josecelano josecelano commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Implements the structural Rust slice of #2266: a non-published frontmatter-validator workspace crate with YAML frontmatter extraction, universal semantic-link envelope validation, strict v1 issue and EPIC profiles, frozen reference syntax validation, and explicit external-schema ownership.

The extracted model retains ownership through profile validation so Agent Skill and agent-profile metadata remains externally governed while metadata.semantic-links is still checked.

This update also repairs cargo-chef manifest-only staging for the new workspace crate, so container recipe preparation can load the complete workspace graph.

Schema generation and deterministic drift verification are intentionally split to #2280. Command modes, path discovery, NDJSON diagnostics, pre-commit integration, and manual/mutation evidence are intentionally split to #2281.

Validation:

  • TORRUST_GIT_HOOKS_LOG_DIR=.tmp ./contrib/dev-tools/git/hooks/pre-commit.sh
  • cargo test --package frontmatter-validator (39 tests)
  • cargo +nightly fmt --all -- --check
  • cargo clippy --package frontmatter-validator -- -D warnings
  • docker build --target recipe --file Containerfile .

Closes #2266

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

Review effort: Lite
Findings: 1 High severity · 3 Medium severity

Open (4)
What changed in this PR

Implements the structural portion of issue #2266 by introducing a non-published Rust workspace crate for extracting Markdown YAML frontmatter and validating the universal semantic-links envelope plus strict v1 issue/EPIC profiles, while updating the related issue/epic tracking docs.

Changes:

  • Added frontmatter-validator workspace crate with extraction + universal semantic-links validation and strict profile validation (issue/EPIC), including unit tests.
  • Updated #2266 issue spec and #2264 epic status/progress docs, plus added an agent review report log.
  • Updated project word list to include schemars.
File Description
project-words.txt Adds schemars to repository word allowlist.
docs/​issues/​open/​2266-2264-implement-rust-frontmatter-model-and-validator/​agent-review-reports.md Adds audit trail of independent reviews/corrections for #2266.
docs/​issues/​open/​2266-2264-implement-rust-frontmatter-model-and-validator/​ISSUE.md Updates #2266 status, tasks, and progress log to reflect implementation + split follow-ups.
docs/​issues/​open/​2264-2003-refactor-semantic-link-conventions/​EPIC.md Marks subissue #2266 as IN_PROGRESS.
contrib/​dev-tools/​checks/​frontmatter-validator/​src/​profile.rs Introduces strict v1 issue/EPIC profile models + invariants and reference validation.
contrib/​dev-tools/​checks/​frontmatter-validator/​src/​lib.rs Introduces frontmatter extraction, universal semantic-links envelope validation, and unit tests.
contrib/​dev-tools/​checks/​frontmatter-validator/​Cargo.toml Adds new crate manifest for frontmatter-validator.
Cargo.toml Adds frontmatter-validator to workspace members.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.00%. Comparing base (2d43d3f) to head (e4d7da5).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2287      +/-   ##
===========================================
+ Coverage    84.86%   85.00%   +0.14%     
===========================================
  Files          354      355       +1     
  Lines        31970    32284     +314     
  Branches     31970    32284     +314     
===========================================
+ Hits         27130    27442     +312     
  Misses        4464     4464              
- Partials       376      378       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot stopped reviewing on behalf of josecelano due to an error September 22, 2026 07:08
@josecelano josecelano self-assigned this Sep 22, 2026
@josecelano
josecelano force-pushed the 2266-rust-frontmatter-model-validator branch from 87f78cc to e4d7da5 Compare September 22, 2026 07:25
@josecelano

Copy link
Copy Markdown
Member Author

ACK e4d7da5

@josecelano
josecelano merged commit 19aa728 into torrust:develop Sep 22, 2026
21 checks passed
josecelano added a commit that referenced this pull request Sep 22, 2026
be3ee28 chore(issues): archive closed issue #2266 spec (Jose Celano)

Pull request description:

  Archives the specification for already-closed issue #2266 from `docs/issues/open/` to `docs/issues/closed/`.

  - Verified GitHub issue #2266 is `CLOSED` after PR #2287 merged
  - Updated archived frontmatter to `status: done` and its closed `spec-path`
  - Repaired the parent EPIC’s live subissue link and marked #2266 `DONE`
  - Preserved historical workflow evidence and independent-review reports

  Validation: `TORRUST_GIT_HOOKS_LOG_DIR=.tmp ./contrib/dev-tools/git/hooks/pre-commit.sh`

ACKs for top commit:
  josecelano:
    ACK be3ee28

Tree-SHA512: 514baacfbe7fc5ef7a033d2446b0f093491879c93f85dc4cb4ccdf262cf12adef155a1da957ac19fcdb9e768a037712ce85fe987e270096e34b96a798ccd1843

This branch was previously deployed

1 inactive deployment
coverage — e4d7da57 Deployed Sep 22, 2026 by josecelano via Generate Coverage Report #2236
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement the Rust Frontmatter Model and Initial Validator

2 participants