fix(pr-review): let a rewritten comment drive the reconcile round - #46
Merged
Merged
Conversation
An agent answering review feedback posts a placeholder the moment it
picks the work up (":mag: Looking into this...") and rewrites that same
comment into the real answer minutes later. The reviewer spent its round
on the placeholder and never saw the answer: the answer arrived as an
`edited` event, which the documented trigger recipe did not subscribe
to, so the question stayed open forever with the answer sitting right
above it (megaeth-labs/mega-agents#317).
Move the round to where the content is. `prepare` now skips any
issue_comment whose body carries `claude-review:skip`, the marker a bot
puts on a placeholder it intends to rewrite; the rewrite replaces the
whole body, marker included, so the edit is a normal comment again. The
body reaches prepare through the environment rather than shell
interpolation — it is attacker-controlled text.
The trigger recipe now subscribes to `[created, edited]` and declines a
marked comment in the job `if` too, before a runner starts. Consumers
keep their reviewer-login exclusion, which is what stops the sticky
status comment — rewritten in place every round — from retriggering.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DMw1H8WTihb5CfQ7tabxdt
This was referenced Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
mega-putin answers review feedback by posting a placeholder the moment it picks the work up (
:mag: Looking into this...) and editing that same comment into the real answer minutes later. On megaeth-labs/mega-agents#317 that produced:issue_comment.created→ review round runs. Run log:conversation: 1 of 1 timeline entries · 26 chars— it reconciled the placeholderThe question is still open on that PR with its answer sitting directly above it. Not a bot-filtering problem —
allowed_bots: mega-putinis set and the run log shows the round proceeding undermega-putin[bot]. The round simply landed on the wrong revision of the comment, and the documented trigger recipe subscribes to[created]only.Change
prepareskips anyissue_commentwhose body carriesclaude-review:skip— the opt-out marker a bot puts on a placeholder it intends to rewrite. The rewrite replaces the whole body, marker included, so the resulting edit is a normal comment and does drive a round.prepareasTRIGGER_COMMENT_BODYin the environment, never interpolated into the shell script: it is attacker-controlled text.CLAUDE-CI.mdrecipe now subscribes to[created, edited], declines a marked comment in the jobifas well (one step earlier, before a runner starts), and notes that an@claudemention job must pingithub.event.action == 'created'so editing an old comment cannot re-run it.The reviewer-login exclusion consumers already carry is what keeps the sticky status comment — rewritten in place every round — from retriggering under
edited.Follow-ups (separate PRs)
editedadded.Test plan
python3 -m unittest test_review_pipeline— 106 tests pass, including two new ones covering the marker and the env wiring.Note:
.github/actions/claude-pr-review/__pycache__/*.pycis tracked in this repo and gets dirtied by running the tests; I reverted it here, but it probably wants deleting + gitignoring.🤖 Generated with Claude Code
https://claude.ai/code/session_01DMw1H8WTihb5CfQ7tabxdt