Skip to content

check-half-states: H8's branch-name fallback reads a merged Refs #N (item k) PR on a card-named branch as a full delivery, so it prescribes dropping pm:dispatched on a lawfully re-dispatched remainder #16036

Description

@os-steve

Found while implementing #16003 (the partial-dispatch release rule and the report-only H49 row). Not addressed there — that card's ruling scoped its diff to the new rule, the new row and two tidiness items, and H8's delivery relation is outside it.

What H8 does today

prDeliversCard (scripts/pm/check-half-states.mjs) reads a PR body for Part of #N or a closing keyword bound to #N; when the body declares NO delivery at all it falls back to the branch name, so a PR on claude/issue-N-slug whose body says only Refs #N is read as delivering card N. That fallback was added for a measured specimen (a merged PR whose body said only Refs #10757, leaving its card dispatched and invisible for ~22h) and it was right for that shape.

Why the partial-dispatch rule changes the reading

Under the rule landing with #16003, a PR that lands ONE item of a card carries Refs #N (item k) and never Fixes, and its landing releases the card back to pm:queue; the remaining items are then re-dispatched from the queue as a fresh claim. The re-dispatched remainder is a card that LAWFULLY carries pm:dispatched again, with a fresh Claim: on the thread — while the merged Refs #N (item k) PR sits in H8's merged window on a branch named for the card.

H8 reads that as "delivering PR merged, card still pm:dispatched — drop pm:dispatched and re-grade the remainder". It reads no thread, so the fresh Claim: newer than the merge — the exact record that stands H49 down — is invisible to it, and the row keeps firing from the re-claim until the remainder's own PR opens (at which point the open half downgrades H8 to its no-action "delivered IN PART" sentence). Followed literally, the remedy de-labels a card a dev is working on and invites a second seat onto it.

Measured in #16003's self-test (adjacency cases, pinned as facts rather than as the desired contract): on a Refs-only merged PR whose head is NOT named for the card H8 is silent and H49 fires; on a head named for the card both fire; after a Claim: newer than the merge H49 stands down while H8 does not.

Options for triage

  1. Make the branch-name fallback decline when the body carries Refs #N for that same N (the body SPOKE about the card, in the one spelling the protocol reserves for a non-delivery) — the smallest change, keeps the Authenticated data requests issue ~20 DB queries in ~17 sequential legs — per-request auth/session/localization/metadata resolution has no cross-request caching, costing ~1.5s/request on remote Postgres #10757 recovery for bodies that declare nothing at all.
  2. Teach H8 to read the card thread (a Claim: newer than the merge stands it down), the way H49 does — a wider change; H8 would then need the coverage pair H49 carries.
  3. Leave H8 as is and treat the double reading as acceptable noise for the window between re-claim and the next PR.

Refs (not addressed here): #16003.

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions