Skip to content

feat(source-control): add the pull request reassess action - #14309

Merged
kyle-sexton merged 16 commits into
mainfrom
feat/14199-reassess-action
Nov 9, 2026
Merged

kyle-sexton merged 16 commits into
mainfrom
feat/14199-reassess-action

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Closes #14199
Siblings: #14258

Summary

Problem: nothing judges whether a PR still fits before it merges.

Adds /source-control:pull-request reassess, which judges one open PR and returns continue, rework or close with cited evidence, even when the PR is green and mergeable. A default run changes nothing; --act carries out the verdict. The shared update criteria this action reads landed in #14258.

The owner narrowed AC7: --act on continue, for a head this session does not hold, is a pinned forge merge only. A conflict there reports and stops, and no rebase happens. From this session's own checkout of the branch the shared update sequence runs unchanged, and a rebase also needs the PR to be the acting login's own.

Fix

  • The action reads its limits first, and a failed read counts as a limit, so an unread hold never reads as no hold.
  • A head stays a fetched ref read with git show, in an unpopulated worktree, so a fork's files never load or run.
  • The verdict's comment comes from a fixed renderer that carries no PR or issue text, and a re-run edits its earlier comment.
  • Ten graded eval cases and an extended offline forge fixture cover each verdict and each action. A recording git stand-in logs pushes, because receive hooks do not fire inside an eval run.

Verification

  • claude plugin eval, opus judged. Verdict cases close, continue and rework ran twice each. close-label-first, fork-close, fork-no-push, report-only, no-goal, labeled-own-comment and rebase-comparison scored 1.00 once each, each with the validity gate VALID. The cases that assert no push ran after the git stand-in landed.
  • The verdict cases and close-label-first were graded before the stand-in landed. They assert no push of their own. Three close graders were tightened after those runs and checked against the kept traces, not re-run.
  • reassess-state.test.sh, gh-forge.test.sh and reassess-limits.test.sh pass, and validate-cases.py exits 0 with warnings only.
  • Left out: whether the AC11 warning comes before the first write is not graded, since the grader reads the final message. The no-write graders cannot see unlisted commands such as gh issue close. Why receive hooks do not fire in a run is unverified.

Related

N/A

Acceptance criteria

  • AC1: A default run on an open or draft PR returns one verdict and changes nothing on the PR.
  • AC2: A constructed green, mergeable PR whose change already landed on the base gets close, naming the commit or PR that replaced it.
  • AC3: A constructed PR whose goal still holds and whose implementation still fits gets continue.
  • AC4: A constructed PR whose goal holds but whose implementation is wrong or partly obsolete gets rework.
  • AC5: Every verdict states the PR's goal and where it was read, the base range examined, and the other PRs searched.
  • AC6: When evidence cannot be read or no goal is stated, the run reports failure and gives no verdict; a close is never given on unreadable evidence.
  • AC7: Acting on continue applies the shared criteria's result (no update, merge or rebase); a conflict follows the existing conflicted-merge rules and stops when both intents cannot hold. The owner's narrowing (decision D12) is recorded in AC7 on the closing issue.
  • AC8: Acting on rework posts one comment and nothing else; acting on close adds do-not-merge, then one comment; reassess never closes a PR or lifts a label; where the label does not exist the report says no hold was applied.
  • AC9: Continue posts nothing, except one before-and-after comparison when it rebased a PR that has reviewers.
  • AC10: A fork head gets the label and comment but no push; a PR held by another live session or a babysit lease gets a verdict and no change.
  • AC11: Before acting, the report says a push can dismiss approvals under the stale-review setting and re-runs the review lanes.
  • AC12: A PR in the merge queue or already labeled do-not-merge gets a verdict and no action, apart from editing this action's own earlier comment; a closed or merged PR is refused.
  • AC13: A re-run edits its earlier comment; age alone never counts and no minimum age gates a run.
  • AC14: create's refresh, ready's base merge, babysit's refresh and reassess all read the same criteria source, and the fixed merge-only rule in ready-for-review.md is gone.
  • AC15: One repository setting forces merge or rebase; its default applies the shared table.
  • AC16: In this repository the criteria return no update when none is needed, merge when one is needed, and rebase only for a native GitHub stack.

🤖 Generated with Claude Code

https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ

kyle-sexton and others added 11 commits November 8, 2026 21:18
Judges whether one open pull request should still land and returns
continue, rework or close with its goal, base range and the pull
requests it searched. It reports only unless --act carries out the
verdict, and it never closes a pull request or lifts a label.

Refs: #14199

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
…ut a head

Review found the action's holds had no reads behind them, a failed read
fell open, a fork's files could load as project instructions, and
acting on continue assumed a checkout it did not have. The limits now
come from one script where a failed read is a limit, the head stays a
ref, and an update runs the shared sequence only from this session's
own checkout, else as a pinned forge merge.

Refs: #14199

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
The action's comment now comes from a renderer with fixed text and
references only, so it cannot mention anyone, leak local data or read as
a member's veto. The hold and veto patterns and the lease path are held
equal to babysit-prs' by test, a second limits read replaces the first
before any write, and each provider command states its inputs and fails
on a failed read.

Refs: #14199

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
A close comment said the label held the pull request even where the
label does not exist. A failed label read or edit now posts nothing.

Refs: #14199

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
Eight cases: close, continue and rework verdicts, and report-only, no-goal,
close-label-first, fork-no-push and labeled-own-comment actions. The
gh-forge stand-in now serves the reads reassess makes, and a push or a
refused write method lands in its call record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
…ixture

A refused pr close, pr update-branch, issue comment or issue edit and a
fields-implied POST now land in the stand-in's call record, so an absence
grader cannot pass while the attempt went unrecorded. Unsigned scaffold
commits keep the landed SHA a grader names the same on every host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
A close never pushes, so the fork case could not fail on a push. A fork
head behind its base with a continue verdict is the state where only the
no-update limit stops an update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
The labeled case's no-other-write grader missed reviews, PR creation,
thread resolves and a ready flip. The close case accepted any SHA-shaped
range and a 501 found anywhere in the reply. The close-label-first case
missed a close through REST.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 9, 2026 03:59
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-09T03:59:29.649936Z
We couldn’t complete this review. Comment @codex review to try again.
616c0da Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 62ca5b21ce972f81db1590c9f38fa3645fd607fb: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Security review (incremental, 70b4b6f → 62ca5b2)

No security issues found.

I read every hunk of the one file changed since 70b4b6f: .changes/source-control/feat-14199-reassess-action-8c4d17e6.md. The only change is in a changelog fragment, where "Eight plugin-eval cases" becomes "Ten plugin-eval cases".

  • Code, trust controls and instructions: the push changes no code, manifest, workflow or trust control. It deletes, narrows or softens no standing instruction.
  • Blocking only: this lane had already reviewed an earlier head (blocking only: yes), so this review reports only CRITICAL and IMPORTANT findings. There are none in this scope.
  • Earlier finding: the manifest hooks flag on the eval-only gh-forge-path plugin.json files was raised in an earlier review: feat(source-control): add the pull request reassess action #14309 (comment). It is not repeated or counted here. Those files have not changed since 70b4b6f and are outside this incremental scope.
  • Embedded text: I searched the PR context for text aimed at this lane and found none. I did not read the settled-threads file this round.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-review: 4 inline finding(s) on 616c0da59924b95d597adcae835213783e5f8d29; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 62ca5b21ce972f81db1590c9f38fa3645fd607fb: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review: incremental, 70b4b6fc..62ca5b21 (blocking only)

This lane already reviewed an earlier head, so this pass reports only blocking findings. I read the one hunk of the one file on the incremental list: .changes/source-control/feat-14199-reassess-action-8c4d17e6.md.

No blocking findings.

What changed and what I checked

  • The changelog fragment now says "Ten plugin-eval cases" where it used to say "Eight".
  • The full diff adds exactly ten pull-request-reassess-* eval cases, each with its own case.yaml: close, close-label-first, continue, fork-close, fork-no-push, labeled-own-comment, no-goal, rebase-comparison, report-only and rework. The new count is correct.
  • I searched the full diff for any other place that still says the old "eight" and found none.
  • The fragment's bump: minor is unchanged and still fits the new reassess action.

Notes

  • Prior findings: every earlier inline thread is resolved, and this push does not touch their files. None is raised again.
  • I found no embedded instructions in the lane's input files.
  • I ran nothing.

kyle-sexton and others added 4 commits November 8, 2026 23:19
Read a lease's expiry with jq, so a macOS host does not read every
lease as unread. Add a graded close on a fork head and a grader for the
report's warning about pushes. Keep the eval fixture's push record and
pinned SHAs independent of the operator's global git config, record
GraphQL mutations, and move the fixture test out of the fixtures folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
The continue branch's only comment, the before-and-after comparison a
rebase of a reviewed PR posts, had no case that could fail. The new case
reaches a real rebase from the session's own checkout: the base's
pr_update_method forces rebase over the human-reviewed row.

The forge records whether a push rewrote the ref, moves the pull ref with
a push to the head, serves seeded reviews and keeps the comment body.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
A close pushes nothing, so the report said only what had not happened.
Require the warning before the first write and again in the report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
The bare origin's receive hooks do not fire inside an eval run, so a
forced push left no line in the call record. A git stand-in beside gh
now passes every command through, records each ref a successful push
moved in the origin, and moves the pull ref with the head branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015te8CqrCmigawLFLWN3KpQ
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

The pr-verify verifier failed head 70b4b6fccae66923db81e2608d3643714361f40e. What it wrote, as data:

What it wrote (40 lines)
Summary: Issue #14199, closes. Sibling #14258 is credited with AC14 to AC16 and the shared criteria
  (Phases 1 to 4), so this PR is judged on the reassess action and its evals (AC1 to AC13, Phases 5
  and 6). Most of that is delivered:
- Report-only by default, with `--act` to carry out the verdict.
- A limits read that treats any failed read as a limit. It covers merge queue, native stack,
  do-not-merge label, body hold or member veto, babysit lease, worktree claim, fork head,
  standards-sync and a moved head.
- The goal and base range follow D1, and the other-PR search is by path and by closing issue.
- No goal or an unreadable read gives no verdict.
- On close, the label goes on first, then one comment from a fixed-text renderer. If the label does
  not exist, the report says no hold was applied.
- A re-run edits the action's own earlier comment, found by its marker.
- A rebase of a reviewed PR posts one range-diff comparison, and the report warns that a push can
  dismiss approvals and re-runs the review lanes.
- Ten eval cases cover each verdict and each action.

The new bash suites (`reassess-limits`, `reassess-comment`, `reassess-state`) are under the
  source-control plugin, and every test-bash, test-python and lint job concluded success on the
  judged head (run
  https://github.com/melodic-software/claude-code-plugins/actions/runs/42564756554). No secrets were
  found, the takeover set is not touched, and there are no binary files. A fork head is only fetched
  as a ref into an unpopulated worktree with hooks disabled.

What decides it is AC7. The PR body says the owner narrowed AC7 so that, outside the session's own
  checkout, `continue` does a pinned forge merge and simply stops on a conflict. The issue's trusted
  spec text records no such narrowing. Under the rules, only person_checks and credited_siblings
  excuse an item, and the PR body cannot narrow a `closes` spec. So the default `--act` continue
  path does not follow the conflicted-merge rules as AC7 and Phase 5 require.
- plugins/source-control/skills/pull-request/reference/reassess.md:136 — On `continue` outside this
  session's own checkout, a conflict currently gets 'report it, and stop', with no attempt to
  resolve it. AC7 and Phase 5 of #14199 require the conflict to follow 'Resolve a conflicted merge'
  and stop only when both intents cannot hold. Implement that path, for example in a throwaway
  populated worktree for same-repository heads, keeping the fork no-update limit. Otherwise get the
  AC7 narrowing recorded in the issue's trusted text; the PR body alone cannot narrow it.
- PR body (Summary and AC7 line) — This restates AC7 as 'Narrowed by the owner as the Summary
  states', a narrowing that appears nowhere in the issue's trusted spec text. It reads like an
  attempt to change the criteria a reviewer judges against. Remove the claim, or point to where the
  owner recorded it on the issue.
- .changes/source-control/feat-14199-reassess-action-8c4d17e6.md:14 — The fragment says 'Eight
  plugin-eval cases', but the diff adds ten `pull-request-reassess-*` cases. Correct the count.

This pull request leaves the merge queue, and ci-status holds it out while it carries pr-verify-failed. A pr-verify pass removes the label, at a new commit or at this same head: once a trusted person edits the body, and only trusted people have edited it since the fail, this head is judged again, so a fail on the body or the issues it links needs only the body fixed, no new commit.

@github-actions github-actions Bot added the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 9, 2026
@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 9, 2026
@github-actions github-actions Bot removed the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 9, 2026
@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 9, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 9, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit 93869a3 Nov 9, 2026
168 of 179 checks passed
@kyle-sexton
kyle-sexton deleted the feat/14199-reassess-action branch November 9, 2026 07:01
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(source-control): reassess action and shared PR update criteria

1 participant