test(queue): add live smoke test for queue status#1409
Open
jd wants to merge 3 commits into
Open
Conversation
Member
Author
|
This pull request is part of a Mergify stack:
|
This was referenced May 11, 2026
Contributor
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🔴 👀 Review RequirementsWaiting for
This rule is failing.
🔴 🔎 ReviewsWaiting for
This rule is failing.
🟢 ⛓️ Depends-On RequirementsWonderful, this rule succeeded.Requirement based on the presence of
🟢 🤖 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.
|
542af35 to
a630c92
Compare
1d4e970 to
78d8f46
Compare
Member
Author
Revision history
|
a630c92 to
7eb3c64
Compare
78d8f46 to
3718941
Compare
3718941 to
86bfde8
Compare
7eb3c64 to
37735a7
Compare
37735a7 to
f706a9a
Compare
f706a9a to
093a618
Compare
There was a problem hiding this comment.
Pull request overview
Adds a live smoke test to pin the behavior/contract of mergify queue status --json (API URL + auth + JSON passthrough) ahead of the Python → Rust port, ensuring both implementations can be validated against the same real API endpoint.
Changes:
- Add a new live functional test that runs
mergify queue status --jsonagainst the real Mergify API. - Assert the command exits successfully and stdout parses as a JSON object (without schema/field assertions).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
093a618 to
d0394b0
Compare
Pins the contract for ``mergify ci queue-info`` so the upcoming Rust port can be validated against the same test that exercises the Python implementation. Lands first; the port commit on top re-runs this test against Rust — same contract, both ends. The test doesn't need ``live_token`` (the command is locally evaluated). The conftest fixture scrubs every event env var and runs in a tmp dir, so the detector always reports "no MQ context". The assertion checks for exit code 7 (``INVALID_STATE``) and an MQ-context message in stdout or stderr. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Change-Id: Idff72acfc1f35f7f64051a4f62a3fe625d2b802f
The Rust binary now serves ``mergify ci queue-info`` natively. The Python implementation (``mergify_cli/ci/cli.py:queue_info``) and its tests are removed in the same PR — port-and-delete keeps a single live copy. The previous commit landed a live-smoke test pinning the ``INVALID_STATE`` exit code outside an MQ context. That same test now exercises the Rust path. ``ci queue-info`` prints the merge-queue batch metadata embedded in the current draft PR as pretty JSON. Outside an MQ context (no event payload, no PR body fenced block) it exits ``INVALID_STATE`` (exit 7). When ``$GITHUB_OUTPUT`` is set (GitHub Actions runner), the command also appends the metadata as ``queue_metadata`` under a random ``ghadelimiter_<uuid>`` heredoc, matching the pattern GitHub Actions expects for multi-line workflow outputs. The implementation reuses the shared ``queue_metadata`` and ``github_event`` modules introduced by the previous (git-refs) port commit. Adds the ``uuid`` dep (v4 random UUIDs for the ghadelimiter) to the ``mergify-ci`` crate. 3 new queue-info tests in the ``mergify-ci`` crate. The Python queue-info tests in ``test_cli.py``, ``test_cli_exit_codes.py``, and ``test_exit_code_contract.py`` are removed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Change-Id: If0cdc5a06685387f6a9379b237eb5d184b071dc4
Pins the contract for ``mergify queue status --json`` before the Rust port lands on top. Same test exercises Python at this PR's CI and Rust on the port commit's rebase — same URL, same auth, same JSON-passthrough output. Uses ``live_token`` since the command hits the real Mergify API. The assertion is intentionally loose: exit 0 and stdout parses as a JSON object. The schema is the API's contract, not the CLI's, so any field-level assertion would tie the test to unrelated upstream changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Change-Id: I76f21b1ad4ddd34196ede18d3a0c768d339a8659
26cefe3 to
d5d3847
Compare
d0394b0 to
8b7dbd2
Compare
Base automatically changed from
devs/jd/worktree-rust-port/port-ci-queue-info-native-rust--f0cdc5a0
to
main
May 13, 2026 13:51
kozlek
approved these changes
May 13, 2026
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.
Pins the contract for
mergify queue status --jsonbefore theRust port lands on top. Same test exercises Python at this PR's
CI and Rust on the port commit's rebase — same URL, same auth,
same JSON-passthrough output.
Uses
live_tokensince the command hits the real Mergify API.The assertion is intentionally loose: exit 0 and stdout parses
as a JSON object. The schema is the API's contract, not the
CLI's, so any field-level assertion would tie the test to
unrelated upstream changes.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
Depends-On: #1407