LearnNewsExamplesServices
Frontmatter
id12959
titlePR-state freshness check before every lifecycle relay (stale merge-eligible signals)
stateClosed
labels
enhancementai
assigneesneo-fable
createdAtJun 12, 2026, 6:25 AM
updatedAtJun 12, 2026, 6:53 AM
githubUrlhttps://github.com/neomjs/neo/issues/12959
authorneo-fable
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 12, 2026, 6:53 AM

PR-state freshness check before every lifecycle relay (stale merge-eligible signals)

neo-fable
neo-fable commented on Jun 12, 2026, 6:25 AM

Context

Operator-named friction item (2026-06-12, ~04:20): "why do you not check, if a PR was already merged first?" — after TWO same-shape instances within an hour, both timeline-verified:

  1. PR #12950 merged 03:18:45Z; the author's [merge-eligible] — at the human merge gate broadcast landed 03:19:00Z15 seconds after the merge, announcing stale state to the whole swarm.
  2. PR #12956: the approval relay (~04:12) read the reviewer's A2A and checked reviewDecision — but never state; the merge landed 04:13:50Z, seconds around the "waiting only on your merge" report. Undetectable staleness by construction.

Friction-capture per the self-evolving-systems discipline — task: relaying PR lifecycle signals (approval → merge-eligibility, review posts, follow-up handling); rule gap: pr-review-guide.md §2.1 mandates the state: OPEN check before reviewing only — no protocol mandates live-state before relaying, broadcasting, or acting on PR lifecycle signals; cost: stale board signals to peers + operator reading "at the merge gate" for things he already merged + correction cycles (two tonight); safer alternative: one gh pr view <N> --json state,mergedAt immediately before any PR lifecycle action or report.

Release classification: boardless — process substrate; not release-blocking.

The Problem

The merge-on-approval policy is the (correct, operator-chosen) forcing function: the faster merges happen, the staler every A2A/wake signal is by the time an agent reads it. Wake-driven flows compound it: A2A says "approved" → agent relays "merge-eligible" minutes later without re-reading live state. The existing freshness discipline exists at exactly one beat (review-start) and is absent from all the others (approval relays, re-stamp requests, merge-eligibility broadcasts, follow-up filing keyed to merge state, post-review-pickup cycle decisions).

The Architectural Reality

  • .agents/skills/pr-review/references/pr-review-guide.md — §2.1 (the existing OPEN-gate, review-start only), §10 (A2A comment-ID hand-off — the relay beat with no state check), §11 (post-review pickup pointer).
  • .agents/skills/post-review-pickup/references/post-review-pickup-workflow.md — the lifecycle-cycle matrix consumes PR signals (own-PR-green → request-review, designated review, etc.) without a mandated freshness read.
  • The check is one cheap read-only call; it composes with the existing Verify-Before-Assert core value (a PR-state claim in any artifact IS a factual claim — the falsifying tool is gh pr view --json state,mergedAt).

The Fix

Amend the two payloads (Progressive Disclosure: rule body in the reference payloads, trigger-line only where always-loaded):

  1. pr-review-guide.md §10 gains the freshness gate: before relaying any review outcome or posting any merge-eligibility claim (A2A, broadcast, chat report), run gh pr view <N> --json state,mergedAt; if MERGED/CLOSED, relay the TERMINAL state instead and skip stale-eligibility language.
  2. post-review-pickup-workflow.md cycle entries that consume PR signals reference the same gate (signal = recovery hint; live state = the work gate — mirroring the context-recovery skill's existing framing).
  3. Substrate Accretion Defense: net-add is ~6 lines across two conditionally-loaded payloads; no always-loaded bytes. Sunset: if a mechanical guard (e.g., an MCP-side state echo in A2A lifecycle messages) lands later, the manual rule compresses to a trigger.

Acceptance Criteria

  • Both payload amendments landed (one PR), wording approved by ≥1 reviewer who hit the friction (author exempt — both of tonight's instances are the author pool).
  • The amendment cites both timeline anchors (#12950 15s-stale broadcast, #12956 enum-relay) as empirical provenance.

Out of Scope

  • Mechanical enforcement (A2A schema changes, hooks, daemons) — file separately if the manual rule proves insufficient.
  • The verdict-not-enum lesson (report the §9 Strategic-Fit verdict, not reviewDecision) — same family, already absorbed into the same §10 beat; the amendment may fold both in one sentence if natural.

Related

PR #12950 / PR #12956 (the two instances), #12856 (the thundering-herd two-phase-claim precedent — same check-at-last-moment epistemics).

Live latest-open sweep: checked latest open issues at 2026-06-12T04:24Z; no equivalent found. A2A in-flight claim sweep: lane-claim broadcast 7e9f5c98 sent first, uncontested.

Origin Session ID: e605ce21-3668-445c-bc00-45896aa9a092

Retrieval Hint: "PR state freshness check merge-eligible stale relay merged first"

tobiu referenced in commit dceab0b - "docs(agents): PR-state freshness gate before every lifecycle relay (#12959) (#12960) on Jun 12, 2026, 6:53 AM
tobiu closed this issue on Jun 12, 2026, 6:53 AM