Skip to content

merge queue: embarking main (b16bb0f) and #1357 together#1374

Closed
mergify[bot] wants to merge 2 commits intomainfrom
mergify/merge-queue/2881f4b23a
Closed

merge queue: embarking main (b16bb0f) and #1357 together#1374
mergify[bot] wants to merge 2 commits intomainfrom
mergify/merge-queue/2881f4b23a

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented May 6, 2026

🎉 This pull request has been checked successfully and will be merged soon. 🎉

Branch main (b16bb0f) and #1357 are embarked together for merge.

This pull request has been created by Mergify to speculatively check the mergeability of #1357.
You don't need to do anything. Mergify will close this pull request automatically when it is complete.

Required conditions of queue rule default for merge:

Required conditions to stay in the queue:

---
checking_base_sha: b16bb0f3a2d29b436fcdc1928e1c0279cda32d8b
previous_failed_batches: []
pull_requests:
  - number: 1357
    scopes: []
scopes: []
...

jd and others added 2 commits May 6, 2026 12:56
The 2026.5.5.x release shipped a ``ci scopes-send`` regression
(fixed in #1356): the Rust port deserialized the response body via
``let _: serde_json::Value = client.post(...)`` while the Python
original ignored the body, and the Mergify endpoint returns an
empty body on success. ``Value`` still requires valid JSON, so the
Rust version surfaced ``parse response JSON: error decoding
response body`` to every user once it shipped. Test mocks used
``set_body_json(json!({}))`` instead of an empty body, so the bug
hid through unit tests too.

The fix is structural — split the HTTP client so callers pick
``post`` (parses) vs ``post_no_response`` (drops) up front — but
the bug class is broader than this one command. Capturing the
lessons in AGENTS.md so the next porter (human or assistant) walks
through them before opening a PR.

Three categories of pitfall, all observed during the port so far:

1. **HTTP response handling** — match the Python original. If
   Python ignores the response, Rust must use ``post_no_response``
   etc.; if Python parses, optional/nullable fields must be
   ``Option<T>`` + ``#[serde(default)]``.

2. **Test fixtures** — mirror the real server. ``ResponseTemplate``
   bodies must match what the endpoint actually returns; an empty
   body is not the same as ``json!({})``.

3. **UX parity with click** — char-counted validators use
   ``chars().count()`` (not ``len()``); confirmation prompts go to
   stderr; resolve all required state before prompting.

Audit of existing/in-flight ports against the checklist:

- ``config validate``, ``config simulate`` (main): match
- ``ci scopes-send`` (main): regressed, fix in #1356
- ``queue pause`` / ``unpause`` (#1352): match
- ``ci git-refs`` / ``queue-info`` (#1353): no HTTP, no risk

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Change-Id: I1fd9757e7f0213b0aeecbb6eb52b59e689cdf05a
@mergify mergify Bot deployed to Mergify Merge Protections May 6, 2026 12:09 Active
@mergify mergify Bot temporarily deployed to func-tests-live May 6, 2026 12:09 Inactive
@mergify mergify Bot closed this May 6, 2026
@mergify mergify Bot deleted the mergify/merge-queue/2881f4b23a branch May 6, 2026 12:23
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.

1 participant