Skip to content

feat: unify review finding workflow - #139

Merged
qiankunli merged 1 commit into
mainfrom
feat/review-workflow
Aug 19, 2026
Merged

feat: unify review finding workflow#139
qiankunli merged 1 commit into
mainfrom
feat/review-workflow

Conversation

@qiankunli

Copy link
Copy Markdown
Collaborator

Rename label-review to review and add a provider-neutral review CLI.
Separate finding verdicts from thread resolution so confirmed findings
cannot be closed before their fixes are published.

Rename label-review to review and add a provider-neutral review CLI.
Separate finding verdicts from thread resolution so confirmed findings
cannot be closed before their fixes are published.
@qiankunli
qiankunli merged commit 827870f into main Aug 19, 2026
Comment thread devloop/scripts/pr.py
p_reply = sub.add_parser("reply", help="reply in a comment's thread")
p_reply.add_argument("number", metavar="number|url")
p_reply.add_argument("comment_id", metavar="comment-id", help="from `pr findings`")
p_reply.add_argument("comment_id", metavar="comment-id", help="from `pr show`")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

🤖 devloop code-review · seed-2.1-turbo · ready in 2m 1s

The pr reply subcommand's comment_id help text was changed from from 'pr findings' to from 'pr show'. However, pr show (the cmd_show function at lines 68-91) does not print comment IDs — it only displays author and body for each comment. A user running pr show to find a comment ID to pass to pr reply would be unable to do so, since the IDs are not visible in the output.

The pr findings command was removed and moved to review findings (in devloop/scripts/review.py), which does print comment IDs. The help text should either reference review findings or pr show should be updated to display comment IDs.

ccr:fp=f05d65515830

Comment thread devloop/scripts/review.py
forge.reply(number, finding.comment, body)
except ForgeError as exc:
print(f"review label: {exc}", file=sys.stderr)
return 1

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

🤖 devloop code-review · seed-2.1-pro · ready in 4m 46s

Unhandled ValueError in cmd_label when --reason is empty

cmd_label calls review_feedback.verdict_reply(ns.verdict, ns.reason) at line 130, which raises ValueError("a review verdict requires a reason") when the stripped reason is empty. However, only ForgeError is caught (lines 133-135). An empty --reason "" passes argparse (which only checks presence, not content), causing an unhandled crash.

Compare with cmd_missed (lines 185-188), which explicitly validates --reason before proceeding, showing the author intended this guard but missed it in cmd_label.

Suggested fix: Add an explicit empty-reason check before calling verdict_reply, consistent with the cmd_missed pattern, or wrap the verdict_reply call in a try/except ValueError.

ccr:fp=4062168f79f0

@qiankunli

Copy link
Copy Markdown
Collaborator Author

🤖 devloop code-review · origin/main..HEAD · b7d05b5fa · models: deepseek-v4-pro×48, seed-2.1-pro×46, seed-2.1-turbo×48 · cost: 422s · ccr v1.13.50

2 finding(s)(2 条已作为独立 review thread 发布)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants