Skip to content

test(ci): add live smoke test for ci queue-info#1406

Merged
mergify[bot] merged 1 commit into
mainfrom
devs/jd/worktree-rust-port/add-live-smoke-test-ci-queue-info--dff72acf
May 13, 2026
Merged

test(ci): add live smoke test for ci queue-info#1406
mergify[bot] merged 1 commit into
mainfrom
devs/jd/worktree-rust-port/add-live-smoke-test-ci-queue-info--dff72acf

Conversation

@jd
Copy link
Copy Markdown
Member

@jd jd commented May 11, 2026

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

@mergify mergify Bot had a problem deploying to Mergify Merge Protections May 11, 2026 11:46 Failure
@jd jd had a problem deploying to func-tests-live May 11, 2026 11:46 — with GitHub Actions Failure
@jd
Copy link
Copy Markdown
Member Author

jd commented May 11, 2026

This pull request is part of a Mergify stack:

# Pull Request Link
1 test(ci): add live smoke test for ci queue-info #1406 👈
2 feat(rust): port ci queue-info to native Rust #1407
3 test(queue): add live smoke test for queue status #1409
4 feat(rust): port queue status to native Rust #1359
5 test: derive native queue commands from the binary, not a hardcoded list #1366
6 test(queue): add live smoke test for queue show #1408
7 feat(rust): port queue show to native Rust #1399
8 test(skill): port the skill-references test to Rust #1414

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 11, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 🤖 Continuous Integration

Wonderful, this rule succeeded.
  • all of:
    • check-success=ci-gate

🟢 👀 Review Requirements

Wonderful, this rule succeeded.
  • any of:
    • #approved-reviews-by>=2
    • author = dependabot[bot]
    • author = mergify-ci-bot
    • author = renovate[bot]

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:

🟢 🔎 Reviews

Wonderful, this rule succeeded.
  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

@mergify mergify Bot requested a review from a team May 11, 2026 12:02
@jd jd marked this pull request as ready for review May 11, 2026 12:04
@jd jd force-pushed the devs/jd/worktree-rust-port/add-live-smoke-test-ci-queue-info--dff72acf branch from 2df5670 to 9455954 Compare May 11, 2026 14:07
@jd jd temporarily deployed to func-tests-live May 11, 2026 14:07 — with GitHub Actions Inactive
@jd
Copy link
Copy Markdown
Member Author

jd commented May 11, 2026

Revision history

# Type Changes Reason Date
1 initial 2df5670 2026-05-11 14:08 UTC
2 rebase 2df5670 → 9455954 2026-05-11 14:08 UTC
3 rebase 9455954 → 028653c 2026-05-11 14:59 UTC
4 rebase 028653c → 754a755 2026-05-11 20:59 UTC
5 rebase 754a755 → 810b36f (rebase only) 2026-05-12 07:44 UTC
6 rebase 810b36f → 7912fee (rebase only) 2026-05-13 08:25 UTC

@mergify mergify Bot had a problem deploying to Mergify Merge Protections May 11, 2026 14:08 Failure
@jd jd force-pushed the devs/jd/worktree-rust-port/port-ci-git-refs-native-rust--9a936b47 branch from 0d7c20c to d0a28d3 Compare May 11, 2026 14:59
@jd jd force-pushed the devs/jd/worktree-rust-port/add-live-smoke-test-ci-queue-info--dff72acf branch from 9455954 to 028653c Compare May 11, 2026 14:59
@jd jd temporarily deployed to func-tests-live May 11, 2026 14:59 — with GitHub Actions Inactive
@jd jd temporarily deployed to func-tests-live May 11, 2026 14:59 — with GitHub Actions Inactive
@mergify mergify Bot had a problem deploying to Mergify Merge Protections May 11, 2026 14:59 Failure
@jd jd force-pushed the devs/jd/worktree-rust-port/add-live-smoke-test-ci-queue-info--dff72acf branch from 028653c to 754a755 Compare May 11, 2026 20:59
@jd jd temporarily deployed to func-tests-live May 11, 2026 20:59 — with GitHub Actions Inactive
@mergify mergify Bot had a problem deploying to Mergify Merge Protections May 11, 2026 20:59 Failure
@jd jd requested a review from Copilot May 12, 2026 07:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a live smoke-test contract for mergify ci queue-info to ensure consistent behavior (especially exit code + user-facing messaging) before and after the upcoming Python → Rust port.

Changes:

  • Add a functional smoke test that runs mergify ci queue-info with no merge-queue context.
  • Assert the command exits with INVALID_STATE (7).
  • Assert the output includes a merge-queue context message (stdout or stderr).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jd jd force-pushed the devs/jd/worktree-rust-port/add-live-smoke-test-ci-queue-info--dff72acf branch from 754a755 to 810b36f Compare May 12, 2026 07:44
@jd jd temporarily deployed to func-tests-live May 12, 2026 07:44 — with GitHub Actions Inactive
@mergify mergify Bot had a problem deploying to Mergify Merge Protections May 12, 2026 07:45 Failure
Base automatically changed from devs/jd/worktree-rust-port/port-ci-git-refs-native-rust--9a936b47 to main May 12, 2026 14:20
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 12, 2026

@jd this pull request is now in conflict 😩

@mergify mergify Bot added the conflict label May 12, 2026
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
@jd jd force-pushed the devs/jd/worktree-rust-port/add-live-smoke-test-ci-queue-info--dff72acf branch from 810b36f to 7912fee Compare May 13, 2026 08:25
@jd jd temporarily deployed to func-tests-live May 13, 2026 08:25 — with GitHub Actions Inactive
@mergify mergify Bot deployed to Mergify Merge Protections May 13, 2026 08:25 Active
@mergify mergify Bot removed the conflict label May 13, 2026
@mergify mergify Bot requested a review from a team May 13, 2026 08:43
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 13, 2026

Merge Queue Status

  • Entered queue2026-05-13 09:06 UTC · Rule: default
  • Checks skipped · PR is already up-to-date
  • Merged2026-05-13 09:07 UTC · at 7912feeb61149093f084b0fa02155aadf10a0e5b · squash

This pull request spent 16 seconds in the queue, including 2 seconds running CI.

Required conditions to merge

@mergify mergify Bot added the queued label May 13, 2026
@mergify mergify Bot merged commit b7f3c96 into main May 13, 2026
19 checks passed
@mergify mergify Bot deleted the devs/jd/worktree-rust-port/add-live-smoke-test-ci-queue-info--dff72acf branch May 13, 2026 09:07
@mergify mergify Bot removed the queued label May 13, 2026
mergify Bot pushed a commit that referenced this pull request May 13, 2026
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>

Depends-On: #1406
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants