test(freeze): add live smoke test for freeze list#1434
Merged
mergify[bot] merged 2 commits intoMay 20, 2026
Merged
Conversation
Member
Author
|
This pull request is part of a Mergify stack:
|
This was referenced May 19, 2026
Contributor
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 ⛓️ Depends-On RequirementsWonderful, this rule succeeded.Requirement based on the presence of
🟢 🤖 Continuous IntegrationWonderful, this rule succeeded.
🟢 👀 Review RequirementsWonderful, this rule succeeded.
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 ReviewsWonderful, this rule succeeded.
🟢 📕 PR descriptionWonderful, this rule succeeded.
|
This was referenced May 19, 2026
This was referenced May 19, 2026
12fea96 to
e8ce34d
Compare
Member
Author
Revision history
|
e8ce34d to
07628f9
Compare
a0a4522 to
9b87b7a
Compare
07628f9 to
5d4d99a
Compare
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
Pin the URL + auth + JSON-array shape of `freeze list --json` against the real Mergify API before the upcoming Python → Rust port. The Python `list_cmd` returns the inner `scheduled_freezes` array verbatim, so the test asserts that the `--json` output parses as a JSON array — same contract we want preserved across both ends of the port. Uses `live_admin_token` because scheduled-freeze endpoints sit under the queue-management family and the CI-scoped token is rejected with 403. Group-level options (`--token` / `--api-url` / `--repository`) come before the subcommand — Click requires it on the Python side, clap accepts both orders. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Change-Id: I51b653702c10e184daff5f450f1edc4f3c581433
5d4d99a to
331118f
Compare
Base automatically changed from
devs/jd/worktree-rust-port/port-skill-refs-test-rust--7eb5e384
to
main
May 20, 2026 10:07
remyduthu
approved these changes
May 20, 2026
JulianMaurin
approved these changes
May 20, 2026
Contributor
Merge Queue Status
This pull request spent 16 minutes 14 seconds in the queue, including 15 minutes 49 seconds running CI. Required conditions to merge
|
38 tasks
38 tasks
mergify Bot
pushed a commit
that referenced
this pull request
May 20, 2026
`mergify freeze list` is now handled by the Rust binary: a single `GET /v1/repos/<repo>/scheduled_freeze` with `--json` passthrough of the inner `scheduled_freezes` array or a human-readable table (ID / Reason / Start / End / Conditions / Status). The active-vs-scheduled flag is best-effort against UTC `now` — same approximation as Python's `_is_active`, with the same wrong-timezone caveat. New crate `mergify-freeze` mirrors the per-group layout used by `mergify-queue` and `mergify-ci`. Wired into the CLI via a new `freeze` clap group with global `--token` / `--api-url` / `--repository` options. Non-ported subcommands (`create` / `update` / `delete`) continue to fall through to the Python shim — they are not in `NATIVE_COMMANDS`, so `looks_native` rejects them and the fallback path runs unchanged. CRUD ports follow. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Depends-On: #1434
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.
Pin the URL + auth + JSON-array shape of
freeze list --jsonagainst the real Mergify API before the upcoming Python → Rust
port. The Python
list_cmdreturns the innerscheduled_freezesarray verbatim, so the test asserts thatthe
--jsonoutput parses as a JSON array — same contract wewant preserved across both ends of the port.
Uses
live_admin_tokenbecause scheduled-freeze endpoints situnder the queue-management family and the CI-scoped token is
rejected with 403.
Group-level options (
--token/--api-url/--repository)come before the subcommand — Click requires it on the Python
side, clap accepts both orders.
Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com
Depends-On: #1414