Skip to content

PR status label misroutes security-owner review as waiting on author #263

@brokemac79

Description

@brokemac79

Summary

ClawSweeper can leave a PR labeled status: ⏳ waiting on author even when the durable review says the PR is ready for maintainer review and the only remaining action is sandbox/security owner acceptance.

Live example: openclaw/openclaw#90798

Latest durable review state on that PR:

  • Result: ready for maintainer review
  • proof: sufficient
  • remaining action: human sandbox/security owner acceptance for the new read-only sandbox skill exposure
  • no concrete author-facing code/proof/doc action remains

Actual label state after re-review still includes:

  • status: ⏳ waiting on author

That label description says ClawSweeper is waiting for author action, which is misleading for security-boundary PRs where the next step is owner/security review.

Source-level cause

In src/clawsweeper.ts, hasUnresolvedContributorWork() treats securityReview.status === "needs_attention" as unresolved contributor work:

  • clawsweeper/src/clawsweeper.ts

    Lines 8896 to 8907 in 413ef25

    function hasUnresolvedContributorWork(options: {
    realBehaviorProof: Pick<RealBehaviorProof, "status">;
    reviewFindings: readonly Pick<ReviewFinding, "priority">[];
    securityReview: Pick<SecurityReview, "status">;
    overallCorrectness: OverallCorrectness;
    }): boolean {
    return (
    proofNeedsContributorAction(options.realBehaviorProof) ||
    hasBlockingReviewFindings(options.reviewFindings) ||
    options.securityReview.status === "needs_attention" ||
    options.overallCorrectness === "patch is incorrect"
    );

Then prStatusLabelKind() maps any remaining unresolvedWork to waiting_on_author before it can reach ready_for_maintainer_look:

  • clawsweeper/src/clawsweeper.ts

    Lines 8926 to 8941 in 413ef25

    function prStatusLabelKind(options: {
    realBehaviorProof: Pick<RealBehaviorProof, "status">;
    reviewFindings: readonly Pick<ReviewFinding, "priority">[];
    securityReview: Pick<SecurityReview, "status">;
    overallCorrectness: OverallCorrectness;
    hasAutomergeLabel: boolean;
    hasRecentReReviewRequest: boolean;
    hasRecentAuthorActivity: boolean;
    }): PrStatusLabelKind | null {
    const unresolvedWork = hasUnresolvedContributorWork(options);
    if (options.hasAutomergeLabel) return "automerge_armed";
    if (options.hasRecentReReviewRequest) return "re_review_loop";
    if (options.hasRecentAuthorActivity && unresolvedWork) return "actively_grinding";
    if (proofNeedsContributorAction(options.realBehaviorProof)) return "needs_proof";
    if (unresolvedWork) return "waiting_on_author";
    if (isReadyForMaintainerLook(options)) return "ready_for_maintainer_look";

This makes sense for proof gaps, P0-P2 review findings, and incorrect patches, but not for cases where securityReview.needs_attention only means "human sandbox/security owner must accept the boundary before merge."

Expected behavior

When the only remaining blocker is human security/sandbox owner acceptance, ClawSweeper should not label the PR as waiting on the author.

Possible fixes:

  • Add a distinct status label for human/security owner review, for example status: needs security review or status: needs maintainer/security review.
  • Or allow ready_for_maintainer_look when proof is sufficient, patch is correct, there are no P0-P2 review findings, and securityReview.needs_attention is owner-acceptance rather than a concrete author-remediable security defect.

Why it matters

Maintainers scanning queues may read waiting on author as "do not review yet," even when ClawSweeper's review text says the PR is ready and needs security/owner review. That can stall security-boundary PRs in the wrong queue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:securityThis issue is about security boundaries, credentials, authz, sandboxing, or sensitive data.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions