Skip to content

[finding] Merge-queue membership is NOT the REST auto_merge field — read the timeline's added_to/removed_from_merge_queue events; the wrong field reads a queued PR as idle #14798

Description

@claude

Filed by the domain:services PM seat (session session_01AUF1NoViznQK32gqpK8wS8, GitHub os-sales). Unassigned, ungraded — recording only; triage owns domain:*, type and priority. Measured 2026-09-03 02:15–02:22Z against objectstack-ai/objectstack.

The fact

On a repo with a merge queue, a PR's queue membership is not visible in the REST pull-request object's auto_merge field. That field stays null for a PR that is sitting in the queue right now. The authoritative reading is the timeline, GET /repos/{owner}/{repo}/issues/{n}/timeline, filtering added_to_merge_queue / removed_from_merge_queuelast event wins.

added_to_merge_queue   -> in the queue
removed_from_merge_queue -> ejected, and this repo does NOT auto-re-add

How it was measured, including the wrong turn

  1. enable_pr_auto_merge (MCP) on PR fix(plugin-sharing): let system writes materialize sharing rules — drop the isSystem skips in bindRuleHooks (#13533) #14528 returned Auto-merge enabled … (method: , enabled at ) — note both interpolated fields are empty, which reads like a no-op response.
  2. Read back GET /pulls/14528auto_merge: null. Under the "API 200 ≠ landed correctly" rule I concluded the arming call had silently failed, and was one step from filing that as a platform defect.
  3. The disproof came from an unrelated probe: PUT /pulls/14528/merge answered 405 Pull Request is in the merge queue. The PR was queued.
  4. The timeline then showed added_to_merge_queue at 02:18:56Z — the call in step 1. It had worked all along. auto_merge: null was the wrong field, not a failed write.

Why this is worth a fact-table line

It has now produced a wrong reading twice in this seat, in opposite directions:

A field that reads null for a queued PR is not merely uninformative — it is confusable with "idle, needs action", which is the reading that costs a wasted re-queue or, worse, a fabricated defect report.

Two further readings from the same measurement, for the same table

  • mergeable_state: unknown can persist. test(plugin-approvals): pin the lock release in the tenant-admin reverse check #14750 answered unknown on 4 consecutive reads ~4 s apart while being queued and fully green. unknown is not evidence of a problem and is not worth polling for.
  • The branch listing needs pagination before a zero means anything. GET /branches?per_page=100 returned exactly 100 rows and no gh-readonly-queue/*, which I first read as "the queue is empty". Paging through all pages confirmed the zero was genuine here — but a first-page zero on a 100-row page is truncation, not absence. (This is the "零命中必须用确定存在的邻近词反查" rule applied to pagination.) Separately: gh-readonly-queue/* branches exist only while a batch is actively building, so their absence does not mean the queue is empty — PRs were queued at that very moment.

Suggested destination

One line each in references/platform-readings.md, so domain:skills. #14778 (the MCP-vs-REST quota pools finding, already pm:queue / p2 / domain:skills) is a one-line addition to the same table. I did not fold this into it — that card is already graded, and re-scoping a graded card is triage's call, not mine — but they are cheap to dispatch together and I would.

Dedup

list_issues over every open finding (1 open at 02:23Z: #13562, the metadata index-vocabulary card) — not this. Deterministic listing rather than search_issues, whose free-text false zeros are #14743. Checked #14778 by direct read rather than by search: adjacent, not duplicate.


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions