Review-submitted seed treats a COMMENT review as a change request #265
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck#265
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
A reviewer submitted a review with verdict
COMMENTwhose entire body was a question — "why did you choose x?". No direction for a fix was given, nothing was requested. The expected outcome was a prose answer.Instead the agent changed the code and pushed.
Cause
buildReviewSubmittedSeed(apps/server/src/forgejo/conversation-detect.ts) is effectively verdict-blind. The verdict is carried correctly all the way in —REVIEW_STATE_BY_EVENTinapps/server/src/forgejo/dispatcher.tsandVERDICT_TEXTinconversation-detect.tsboth mapAPPROVED/REQUEST_CHANGES/COMMENT— and is then used for only two things:Reviewer: @x · Verdict: commentSo a
COMMENTreview takes the identical path asREQUEST_CHANGES. The task line opens with an unconditional imperative:Three reinforcing problems in that text:
forgejo_create_pr_commentis permitted "only if the review body itself has feedback". When the body is a question, that framing reads as secondary at best.apps/server/src/bridge/session-policy.tsallows code changes and pushes "only in a turn whose message says so". This turn's message said so, unconditionally.The agent cannot recover the distinction on its own: the seed is harness-authored and authoritative, while the quoted review body is explicitly marked untrusted data in the same policy. Under that hierarchy a question in the body can only be read as the content of feedback to address.
Scope
Fix the seed so the review verdict decides the default outcome.
buildReviewSubmittedSeedonpayload.review.type.COMMENT: the default outcome is a reply. Code changes and pushes are allowed only when the review actually requests one, or when the agent proposes one and says so in its reply.REQUEST_CHANGES: unchanged — the current imperative is correct there.APPROVED: unchanged.Surface area
apps/server/src/forgejo/conversation-detect.ts—buildReviewSubmittedSeed,VERDICT_TEXTapps/server/src/forgejo/dispatcher.test.ts— existing review-seed testsapps/server/src/bridge/session-policy.tsif the push permission needs to be narrowed per verdict rather than per turnAcceptance
COMMENTreview whose body is a question and which requests no change produces a seed that asks for an answer, and the agent replies without committing.COMMENTreview that does request a change still gets the change.REQUEST_CHANGESandAPPROVEDbehaviour is unchanged.Out of scope