Skip to content

fix(source-control): judge native lane auto-merges without a pin read-back #9447

Closed

Description

@kyle-sexton

Refs: #9276

Problem

A lanes App pull request merged by GitHub's native auto-merge (#9399) has no <!-- babysit-merge-pin sha=... --> comment, because only babysit_merge.py posts that comment before it enqueues. The post-merge check is likely to judge such a merge as the lane's own and then fail it:

  • Who enqueues. The account that enables auto-merge becomes the enqueuer. On feat(source-control): hold only the takeover set on the babysit HIGH floor #9413 a person armed auto-merge, and its AddedToMergeQueueEvent has that person as both actor and enqueuer. When enable-auto-merge.mjs arms with the lanes App token, the enqueuer should be the App, so derive_auto_merge marks the merge by_identity (babysit_merge_policy.py:2742).
  • What the check does then. babysit_postmerge._judge sees by_identity with no pin. It reports read-back-unrecorded until the dispatch deadline and a read-back failure after it (babysit_postmerge.py:1492-1506).
  • What follows. A failure files a demotion record. The unverified merge also keeps counting toward max-in-flight. Both hold the pr-merge gate for the pull requests it still gates: adopted owner PRs and Dependabot's.

UNVERIFIED: no lanes App pull request has merged natively yet. Merges #9401, #9395 and #9392 all went through the gate's own enqueue.

Done when

  • A native lane merge (one with an AutoMergeEnabledEvent by the agent identity) passes the post-merge check on the dispatch and canary runs, with no pin read-back required.
  • It is still judged by identity, so post-merge-dispatch starts its full run.
  • No extra API call. The auto-merge event comes from the same GraphQL request, through a second aliased timelineItems connection. It is not added to the existing last:1 queue-event connection, because derive_auto_merge reads events[-1] as the queue event.

Activity

  1. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 23, 2026
  2. github-actions commented on Oct 23, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Small
    Complexity: Medium
    Uncertainty: Knowable
    Flags: none

    Understood: a lanes App PR merged through GitHub's native auto-merge has no merge-pin comment. The post-merge check would then judge it by identity with no pin, report read-back-unrecorded or a failure, file a demotion record, and keep counting it toward max-in-flight. The proposed fix reads the AutoMergeEnabledEvent from a second aliased timelineItems connection in the same GraphQL request. The issue marks the failure as unverified, since no native lane merge has happened yet. I found no duplicates among the open issues.

    Automated triage, applied by the lanes App.

  3. added
    priority: mediumReal value, no hard deadline; normal backlog flow.
    and removed
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 23, 2026
  4. added
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.
    status: needs-decisionAwaiting a human or maintainer judgment call.
    and removed
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    on Oct 23, 2026
  5. melodic-automation-lanes commented on Oct 23, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: Uncertainty knowable is not one of known. A recorded decision does not change these rules (.github/actions/resolve-config/admission-rules.json); a person who wants it worked adds agent-ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumReal value, no hard deadline; normal backlog flow.status: needs-decisionAwaiting a human or maintainer judgment call.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions