Skip to content

fix(pr-merge): lane_room reads its post-merge answer past the 2-minute unverified age and disarms the lane #9577

Description

@kyle-sexton

Problem

While any lane merge is unverified, lane_room (babysit_merge_policy.py) reports the lane room as unreadable, with reason post-merge answer unverified-stale. enable-auto-merge then disarms every armed lane pull request.

The shared post-merge answer may be at most SHARED_UNVERIFIED_MAX_AGE old while a merge is unverified (_shared_age_refusal). That limit is run_cache.MAX_AGE, 2 minutes. The post-merge-dispatch step takes longer than that on its own. In run 40060427179 the answer was stamped computedAt 03:58:09Z, the step finished at 03:59:45Z, and enable-auto-merge read the answer at 04:00:10Z, 2:01 later. So the answer is always stale by the time lane-room reads it, and every legitimately pending merge makes the room unreadable rather than counted.

The gate path handles the same case by recomputing the post-merge check and writing the answer back. lane_room does not recompute. in_flight already counts unverified lane merges toward merge.max-in-flight, so the room is held anyway while a merge is pending.

Fix

Have lane_room recompute the post-merge answer on unverified-stale, as the gate does. Do not ignore the age: a verification failure after computedAt must still refuse. A new test should show that a pending merge with an answer older than 2 minutes yields a counted room, not an unreadable one.

Evidence

Refs: #9508

Activity

  1. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 24, 2026
  2. github-actions commented on Oct 24, 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: Known
    Flags: none

    Understood: while a lane merge is unverified, lane_room reads a post-merge answer older than the 2-minute limit and reports the room unreadable. enable-auto-merge then disarms the armed lane PRs. The proposed fix is for lane_room to recompute the answer on unverified-stale, as the gate path does. It keeps the age check, so a verification failure after computedAt still refuses. It also adds a test for a pending merge with an answer older than 2 minutes. The issue is clear and I need nothing more from you. I found no likely duplicates among the open issues. #9508 is already referenced.

    Automated triage, applied by the lanes App.

  3. added
    priority: highSignificant impact, or blocks an imminent release; staff this cycle.
    and removed
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 24, 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 24, 2026
  5. melodic-automation-lanes commented on Oct 24, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: it has no - [ ] task list to check. A recorded decision does not change these rules (.github/actions/resolve-config/admission-rules.json); a person who wants it worked adds agent-ready.

  6. kyle-sexton commented on Oct 24, 2026

    @kyle-sexton
    MemberAuthor

    Scope addition (requested by the GitHub Support session, which monitors stuck PRs): a room hold logs only to the console today ('#N left: the lane's room could not be read ...', run 40064383267 at 05:00:38Z), so no PR or annotation shows why nothing arms. When lane_room refuses or is unreadable, enable-auto-merge emits one ::warning:: annotation and a step-summary line naming the reason and each PR left unarmed. Skip a per-PR comment: the room is re-read every scheduled tick.

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: highSignificant impact, or blocks an imminent release; staff this cycle.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