Repository navigation
feat(code-review): hand addressed outdated threads to the maintainer to resolve - #1758
Conversation
…to resolve A review thread GitHub marks outdated stayed an approval gate until someone resolved it, even when the later push had already fixed what it asked for. The disposition fell back to COMMENT, and on a base branch that requires conversation resolution the PR stayed blocked with nobody told why. `code-review context` now lists unresolved outdated threads (`outdated_threads`). The agent compares each one against the current diff. For each thread the code addresses, `disposition --addressed-thread <id>` drops it from the thread gate and returns it in `resolve_first`, and the skill tells the maintainer to resolve it to unblock the merge. Threads that are not outdated, or that the code does not visibly address, still gate APPROVE. The skill never resolves a thread itself. `cr-pr.graphql` now reads each thread's `id` and `isOutdated` and each comment's `url`. A new `classifications/outdated-thread.md` holds the judgement. Golden rule 7, Step 6, the APPROVE gate docs, the tool README and the pr-management spec name the exception. A new `step-6-outdated-thread` eval suite covers the judgement. Generated-by: Claude Code (Opus 5.5)
Generated-by: Claude Code (Opus 5.5)
… comment An outdated thread listed for the agent carried only its opening comment, so a reply adding a second point the push did not fix was never seen and the thread could leave the approval gate. `outdated_threads` now lists every reply as `replies_untrusted`, the read fetches up to 20 comments per thread with their total, and a thread longer than the read is left out so it stays a gate. The step-6 eval gains a case for a reply that adds a point. Generated-by: Claude Code (Opus 5.5)
potiuk
left a comment
There was a problem hiding this comment.
Treating an outdated thread as a hint the agent has to verify, with the maintainer still doing the resolving, is the right shape for the apache/airflow#72542 case, and the guard that rejects any id that is not an unresolved outdated thread is good.
I pushed one fixup on top (db0d310) for a gap in what the agent got to see: it judged only the opening comment of each thread, so a follow-up in a reply could let the thread leave the gate. outdated_threads now also lists every reply as replies_untrusted, the read fetches up to 20 comments per thread with their totalCount, and a thread longer than the read is left out so it stays a gate. outdated-thread.md and the spec say to judge the whole thread, there are two new tests in test_cli.py, and the step-6 eval has a case 4 for a reply that adds a point the push did not fix. I also merged main in. Please pull before pushing anything else to the branch.
This review was drafted by an AI-assisted tool and
confirmed by an Apache Magpie maintainer. The findings
below are observations, not blockers; an Apache Magpie
maintainer — a real person — will take the next look at the
PR. If you think a finding is mis-applied, please reply on
the PR and a maintainer will weigh in.More on how Apache Magpie handles maintainer review:
Contributing guide.
Summary
APPROVEuntil someone resolved it, even when a later push had already fixed what it asked for. On a base branch withrequired_conversation_resolution, the PR then sat blocked and the skill never said why. This came up for real on Add EKS operator for commands in existing Pods airflow#72542: an outdatedkubernetes_conn_idthread, fixed and answered "Done", was one of the two threads that held the merge.code-review contextnow lists unresolved outdated threads (outdated_threads). The agent checks each one against the current diff (newclassifications/outdated-thread.md). For each thread the code addresses,disposition --addressed-thread <id>removes it from the thread gate and returns it inresolve_first, and the skill tells the maintainer: "resolve it to unblock the merge".APPROVEas before.Type of change
.claude/skills/<name>/) — eval fixtures updated belowtools/*/withpyproject.toml)tools/<system>/*.md)docs/,README.md,CONTRIBUTING.md)projects/_template/)prek, workflows, validators)cr-pr.graphqlreads threadid/isOutdatedand commenturl(vetted-ops query, plugin copy synced)Test plan
prek run --all-filespassesuv run pytest/ruff check/mypypasses —tools/pr-management/tests/code_review: 141 passed, including 3 new tests:test_step6_addressed_outdated_threads_go_to_the_maintainer,test_outdated_thread_the_code_addresses_unblocks_approve, andtest_addressed_thread_must_be_outdated_and_unresolvedstep-6-outdated-threadsuite, 3/3 withclaude -pstep-6-outdated-thread: fixed as asked / code moved but the concern remains / author says "Done" but the diff disagrees)cr-pr.graphqllive against Add EKS operator for commands in existing Pods airflow#72542. With the thread state from before it was resolved,contextlisted the outdatedkubernetes_conn_idthread, and--addressed-threaddropped the thread gate from 2 to 1 and returned it inresolve_first. The remaining thread is not outdated, so it still blockedAPPROVE.RFC-AI-0004 compliance
acme)resolve_firstis maintainer-facing only, never in the review bodyLinked issues
Refs #1585 (the single
APPROVEdefinition this narrows).Notes for reviewers (optional)
APPROVE. Extending the same flow to those is a separate decision, because nothing in the diff can show it is addressed.resolve_firstis returned even when another gate keeps the result atCOMMENT, so the maintainer still learns which threads they can resolve.SKILL.mdGolden rule 7 gained one sentence;measured_tokenswas restamped (3770 → 3826);surface_hashis unchanged.Generative AI: drafted with Claude Code (Claude Opus 5.5), reviewed by the author.
🤖 Generated with Claude Code