Skip to content

feat: Needs-you: one "merge is yours" item per card, updated on re-review and retired when the PR merges or closes (#786) - #789

Merged
mabry1985 merged 1 commit into
mainfrom
feat/bd-g8fne-needs-you-one-merge-is-yours-item-per-ca
Nov 18, 2026
Merged

mabry1985 merged 1 commit into
mainfrom
feat/bd-g8fne-needs-you-one-merge-is-yours-item-per-ca

Conversation

@mabry1985

Copy link
Copy Markdown
Member

Summary

A human-merge card now has one pending "merge is yours" item, naming the latest head, and the item is retired when the PR merges or closes (#786).

  • Per-card key. _queue_agent_page (loop/reconcile.py) keys the page panel-verdict:<fid>; the head stays in the text.
  • Re-review. Before adding a page for a new head, it marks the card's earlier pending items delivered, both per-card and legacy panel-verdict:<fid>:<head> rows.
  • Merge or close. The reconcile's MERGED/CLOSED edge retires the card's pending panel-verdict items and clears the in-process once-per-head guard, so a reopened PR pages again.
  • Host check. In protoAgent src/inbox/store.py, list() returns only rows with delivered_at IS NULL by default and mark_delivered sets it. That is the same seam block pages already use, so no host change is needed. I did not trace the console's Needs-you query itself beyond the needs_human flag on those rows.

Three additions beyond the brief, for review to judge:

  • Same head already pending. A page still pending for the same head is kept rather than re-added, so a restart does not re-page it.
  • Retirement fails. If the earlier item cannot be retired, the new head's page goes out under the per-head key. This shows a duplicate until the next page for that card, or the sweep once its PR has merged or closed, retires it; the per-card key would otherwise dedup the new page away.
  • Sweep. block_pages.sweep now also retires panel-verdict items whose card is done, or blocked with the "PR closed without merging" reason. This clears the items already sitting in live inboxes for PRs that merged before this change, and retries a retirement that failed at the edge. It reuses the inbox read the sweep already makes.

Unlisted file changed: block_pages.py, the host-inbox lifecycle module. It holds the new helpers (verdict_key, verdict_card_id, retire_verdict_pages, verdict_settled), the sweep extension, and a shared PR_CLOSED_REASON constant that the CLOSED edge now uses for its unchanged block reason. No behaviour was removed.

Tests: tests/test_panel_verdict_wake.py (38 pass) now pins the per-card key and covers:

  • a second PASS on a new head leaving one pending item naming it;
  • a legacy per-head row retired, with other cards' items and block pages untouched;
  • merged and closed PRs leaving none;
  • restart at the same head, the retirement-failure fallback, reopen, and the sweep.

I ran targeted tests only: the neighbouring inbox and reconcile tests pass, and the full suite was left to the board's gate. ruff format . left the rest of the repo unchanged.

Fixes #786

…view and retired when the PR merges or closes (#786)
@mabry1985 mabry1985 added the reviewer-of-record:board Reviewed by the project board's review gate (reviewer of record) label Nov 18, 2026

@protoreview protoreview Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA panel review — PASS

reviewer-of-record · head 2b43bc4fa902 · formal

Reviewer of record: project board. This PR is labelled reviewer-of-record:board, so its review belongs to that reviewer, and its board/review-gate status is success at 2b43bc4fa902 (“Review gate clean — 2 finding(s), none blocking”). This PASS carries that verdict into the gates that read this panel's; no panel ran on this head. Comment @vera review for an independent review.

No findings — the review came back clean.

findings JSON (machine-readable)
[]

@protoreview protoreview Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Promoting the PASS verdict for head 2b43bc4fa902: all checks terminal-green, zero unresolved review threads. (approve-on-green)

@mabry1985
mabry1985 merged commit 232b609 into main Nov 18, 2026
6 checks passed
@mabry1985
mabry1985 deleted the feat/bd-g8fne-needs-you-one-merge-is-yours-item-per-ca branch November 18, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewer-of-record:board Reviewed by the project board's review gate (reviewer of record)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Needs-you inbox: one 'QA panel PASS — the merge is yours' item per head, so a re-reviewed card shows up twice

1 participant