Skip to content

Revert unsupported YAML tag rejection in check-yaml - #2670

Merged
j178 merged 3 commits into
masterfrom
revert-check-yaml-tags
Sep 1, 2026
Merged

j178 merged 3 commits into
masterfrom
revert-check-yaml-tags

Conversation

@j178

@j178 j178 commented Sep 1, 2026 •

Copy link
Copy Markdown
Owner

Reverts #2656

The reject_unsupported_tags behavior rejects valid application-specific YAML tags used by mkdocs.yml, including !!python/object/apply:pymdownx.slugs.slugify. Restore the previous check-yaml behavior and parser versions.

Copilot AI lite review requested due to automatic review settings September 1, 2026 06:05
@j178 j178 added the bug Something isn't working label Sep 1, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-01T06:14:14.715425Z 8982844 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a3efc50177

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Cargo.toml Outdated
@codecov

codecov Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.10%. Comparing base (10a896e) to head (8982844).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2670      +/-   ##
==========================================
- Coverage   94.10%   94.10%   -0.01%     
==========================================
  Files         141      141              
  Lines       30044    30035       -9     
==========================================
- Hits        28274    28265       -9     
  Misses       1770     1770              

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI 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.

🟡 Changes recommended

The restored “allow unknown/application tags” behavior is no longer covered by a regression test, increasing the risk of silently reintroducing the original failure.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Reverts the recent check-yaml behavior that rejected YAML documents containing application-specific/unknown tags (notably those used by mkdocs.yml), and restores the prior serde-saphyr / granit-parser versions to match that behavior.

Changes:

  • Remove reject_unsupported_tags from check-yaml load options so tagged YAML can be validated again.
  • Adjust a config deserialization test expectation for group names containing a tab.
  • Downgrade serde-saphyr and granit-parser back to 1.1.0 (with corresponding Cargo.lock updates).
File summaries
File Description
crates/prek/src/hooks/pre_commit_hooks/check_yaml.rs Restores permissive tag handling during YAML load validation; removes the prior “unknown tag must fail” test.
crates/prek/src/config/mod.rs Fixes test expectation for whitespace-in-name error message when the input includes a \t escape.
Cargo.toml Downgrades YAML parsing crates to earlier versions consistent with restored behavior.
Cargo.lock Updates lockfile checksums/versions to reflect the dependency downgrade.
Review details
  • Files reviewed: 3/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

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

Comment thread crates/prek/src/hooks/pre_commit_hooks/check_yaml.rs
Copilot AI review requested due to automatic review settings September 1, 2026 06:10

Copilot AI 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.

🔵 Needs a closer look

The intended behavior change is not covered by a replacement regression test, making it easy to accidentally reintroduce tag rejection later.

Review details

Suppressed comments (1)

crates/prek/src/hooks/pre_commit_hooks/check_yaml.rs:315

  • The revert intentionally re-allows application-specific/unknown YAML tags, but removing the previous tag-related test leaves this behavior untested and easy to regress. Add a regression test that verifies a non-standard tag (e.g. !reference) is accepted in load mode and produces no output.

    #[tokio::test]
    async fn test_yaml_with_binary_scalar() -> Result<()> {
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 1, 2026 06:12

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 898284455d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread prek.toml
@j178
j178 merged commit de6e614 into master Sep 1, 2026
35 checks passed
@j178
j178 deleted the revert-check-yaml-tags branch September 1, 2026 06:14

Copilot AI 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.

🟡 Changes recommended

It disables the check-yaml hook and removes coverage for the reverted tag-handling behavior without adding a regression test for the intended “allow application-specific tags” behavior.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

crates/prek/src/hooks/pre_commit_hooks/check_yaml.rs:314

  • With unsupported-tag rejection removed, add a regression test that a YAML file containing an application-specific tag (like the mkdocs/ruamel tag !!python/object/apply:pymdownx.slugs.slugify) loads successfully, so this behavior doesn’t regress again.

    #[tokio::test]
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread prek.toml
j178 added a commit that referenced this pull request Sep 1, 2026
- **Revert "Bump version to 0.5.2 (#2671)"**
- **Revert "Revert unsupported YAML tag rejection in check-yaml
(#2670)"**
- **Reapply "Reject unsupported YAML tags in check-yaml (#2656)"**
@j178

j178 commented Sep 1, 2026

Copy link
Copy Markdown
Owner Author

Reverted this revert in #2672

@deadnews deadnews mentioned this pull request Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants