Skip to content

fix: reject malformed review handoff labels - #460

Draft
huang47 wants to merge 1 commit into
codex/cursor-immediate-handofffrom
codex/cursor-label-shape
Draft

huang47 wants to merge 1 commit into
codex/cursor-immediate-handofffrom
codex/cursor-label-shape

Conversation

@huang47

@huang47 huang47 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

A missing or malformed label list cannot tell us whether a pull request has been handed to a person. When the caller requests fail-closed handling, the counter now reports that uncertainty instead of treating the list as empty.

Motivation

A successful API response may still have an unusable shape. The fail-closed option needs to handle that case as well as request errors, while leaving existing default behavior unchanged.

Provenance

  • Authored by: interactive session
  • Verified: Cursor review suite passed 1,766 tests, including missing, null, malformed and valid label handling. Workflow pin, agent-instruction and repository-literal checks passed.
  • Deviations: The fallback handoff label is still best effort if a write fails; concurrent runs and other review systems are outside this change. Current-head CI passed; CodeRabbit was skipped. No live caller run was performed.

Reviewer context

Summary

  • Validate the label list before using it under fail-closed or post-review handoff handling.
  • Retain legacy behavior when fail-closed handling is not enabled.

Test plan

  • Verify malformed labels stop the opted-in counter without claiming a clear handoff.
  • Verify post-review uncertainty attempts the handoff and fails visibly.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

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.

1 participant