Classify already-landed PRs as reconciliation-only, not review eligible #295

Closed
opened 2026-07-07 00:26:21 -05:00 by jcwalker3 · 0 comments
Owner

Reviewer workflows now detect already-landed PRs before validation, approval, or merge, but final reports still describe the selected already-landed PR as oldest eligible PR or next eligible PR.

Observed behavior:

  • PR #278 was open in Gitea.

  • Its head SHA was already an ancestor of prgs/master.

  • The workflow correctly stopped before validation, approval, and merge.

  • The final report produced ALREADY_LANDED_RECONCILE_REQUIRED.

  • However, the report still claimed:

    • oldest eligible PR: PR #278
    • next eligible PR: PR #278
    • Pinned reviewed head: ...

Problem:

An already-landed PR is not eligible for normal review or merge. It is a reconciliation item. Calling it eligible creates ambiguity and may cause future LLMs to approve, merge, or continue queue work incorrectly.

Required behavior:

  1. If a PR head is already an ancestor of the target branch, classify it as ALREADY_LANDED_RECONCILE_REQUIRED.

  2. Do not call the PR review eligible, merge eligible, oldest eligible, or next eligible.

  3. Use separate terms:

    • Oldest open PR requiring action
    • Eligibility class
    • Next review/merge eligible PR
  4. If policy blocks queue advancement until reconciliation, say so explicitly.

  5. If policy allows skipping reconciliation-only PRs, require explicit rule proof before selecting the next PR.

  6. Do not use reviewed head SHA unless validation and diff review passed.

  7. Use candidate head SHA for pre-review ancestry checks.

Acceptance criteria:

  • Already-landed PRs are reported as reconciliation-only.
  • Final reports reject oldest eligible PR when the selected PR is already landed.
  • Final reports reject reviewed head SHA when no validation/diff review occurred.
  • Controller handoffs use candidate head SHA and reviewed head SHA: none for already-landed cases.
  • Tests cover already-landed open PRs, normal review-eligible PRs, and queue advancement policy.
Reviewer workflows now detect already-landed PRs before validation, approval, or merge, but final reports still describe the selected already-landed PR as `oldest eligible PR` or `next eligible PR`. Observed behavior: * PR #278 was open in Gitea. * Its head SHA was already an ancestor of `prgs/master`. * The workflow correctly stopped before validation, approval, and merge. * The final report produced `ALREADY_LANDED_RECONCILE_REQUIRED`. * However, the report still claimed: * `oldest eligible PR: PR #278` * `next eligible PR: PR #278` * `Pinned reviewed head: ...` Problem: An already-landed PR is not eligible for normal review or merge. It is a reconciliation item. Calling it eligible creates ambiguity and may cause future LLMs to approve, merge, or continue queue work incorrectly. Required behavior: 1. If a PR head is already an ancestor of the target branch, classify it as `ALREADY_LANDED_RECONCILE_REQUIRED`. 2. Do not call the PR `review eligible`, `merge eligible`, `oldest eligible`, or `next eligible`. 3. Use separate terms: * `Oldest open PR requiring action` * `Eligibility class` * `Next review/merge eligible PR` 4. If policy blocks queue advancement until reconciliation, say so explicitly. 5. If policy allows skipping reconciliation-only PRs, require explicit rule proof before selecting the next PR. 6. Do not use `reviewed head SHA` unless validation and diff review passed. 7. Use `candidate head SHA` for pre-review ancestry checks. Acceptance criteria: * Already-landed PRs are reported as reconciliation-only. * Final reports reject `oldest eligible PR` when the selected PR is already landed. * Final reports reject `reviewed head SHA` when no validation/diff review occurred. * Controller handoffs use `candidate head SHA` and `reviewed head SHA: none` for already-landed cases. * Tests cover already-landed open PRs, normal review-eligible PRs, and queue advancement policy.
jcwalker3 added the status:in-progress label 2026-07-07 08:21:52 -05:00
sysadmin removed the status:in-progress label 2026-07-07 09:37:26 -05:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#295