test(skill): port the skill-references test to Rust#1414
Open
jd wants to merge 1 commit into
Conversation
Member
Author
|
This pull request is part of a Mergify stack:
|
This was referenced May 12, 2026
This was referenced May 12, 2026
Contributor
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🔴 ⛓️ Depends-On RequirementsWaiting for
This rule is failing.Requirement based on the presence of
🔴 👀 Review RequirementsWaiting for
This rule is failing.
🔴 🔎 ReviewsWaiting for
This rule is failing.
🟢 🤖 Continuous IntegrationWonderful, this rule succeeded.
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 📕 PR descriptionWonderful, this rule succeeded.
|
Replaces ``mergify_cli/tests/queue/test_skill.py`` with a Rust integration test in ``crates/mergify-cli/tests/skill_references.rs``. The test validates two artifacts with no Python in the picture: - The ``skills/mergify-merge-queue/SKILL.md`` Markdown file (frontmatter shape, required sections). - The Rust binary's ``--list-native-commands`` output (every ``mergify queue <cmd>`` reference in the skill must resolve to a native command). Keeping the test in pytest meant carrying Python plumbing for a language-agnostic concern. The Rust port: - spawns the binary via ``CARGO_BIN_EXE_mergify`` (the artifact ``cargo test`` just built), so the test always exercises the current code rather than whatever ``mergify`` happens to be on ``PATH``; - reads the skill file via ``CARGO_MANIFEST_DIR``-relative resolution, so it's robust to the cwd; - adds two dev-deps to ``mergify-cli`` (``regex`` for the frontmatter / reference patterns, ``serde_yaml_ng`` for frontmatter parsing — already used by ``mergify-ci``). The ``mergify_cli/tests/queue/`` directory had no other content, so it goes away entirely; the Python ``yaml`` dev-dep stays in place for now (still used elsewhere). 4 tests, same coverage as before: - ``skill_content_is_readable`` - ``skill_has_valid_frontmatter`` - ``skill_has_required_sections`` - ``skill_references_valid_commands`` Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Change-Id: I7eb5e3849dcb4219341be78173717ecd137f2d08
72c4bf3 to
9d67b7f
Compare
1c824a4 to
c051a4c
Compare
Member
Author
Revision history
|
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.
Replaces
mergify_cli/tests/queue/test_skill.pywith a Rustintegration test in
crates/mergify-cli/tests/skill_references.rs.The test validates two artifacts with no Python in the picture:
skills/mergify-merge-queue/SKILL.mdMarkdown file(frontmatter shape, required sections).
--list-native-commandsoutput (everymergify queue <cmd>reference in the skill must resolve toa native command).
Keeping the test in pytest meant carrying Python plumbing for a
language-agnostic concern. The Rust port:
CARGO_BIN_EXE_mergify(the artifactcargo testjust built), so the test always exercises thecurrent code rather than whatever
mergifyhappens to be onPATH;CARGO_MANIFEST_DIR-relativeresolution, so it's robust to the cwd;
mergify-cli(regexfor thefrontmatter / reference patterns,
serde_yaml_ngforfrontmatter parsing — already used by
mergify-ci).The
mergify_cli/tests/queue/directory had no other content,so it goes away entirely; the Python
yamldev-dep stays inplace for now (still used elsewhere).
4 tests, same coverage as before:
skill_content_is_readableskill_has_valid_frontmatterskill_has_required_sectionsskill_references_valid_commandsCo-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
Depends-On: #1399