Skip to content

fix: reject malformed review handoff labels - #460

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

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

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 24117354-b86d-4f38-a777-ef296a9e570d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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