Skip to content

feat(pr-risk): retain grades without publishing - #445

Draft
huang47 wants to merge 1 commit into
mainfrom
codex/pr-risk-report-only
Draft

huang47 wants to merge 1 commit into
mainfrom
codex/pr-risk-report-only

Conversation

@huang47

@huang47 huang47 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Teams can try a risk assessment privately before changing a pull request. Report-only mode saves the assessment for inspection without adding a risk label, comment or optional risk Check Run.

report-flow

Motivation

An advisory grade needs a way to be evaluated before it starts changing pull requests. Existing dry-run support in the script does not prevent a separately configured Check Run from being published, and its result still describes a planned label. This mode makes the reporting boundary explicit.

Provenance

  • Authored by: interactive session
  • Verified:
    • Risk and dependent script suites, ShellCheck, actionlint and repository checks passed.
    • A regression test confirmed publication stays off even when conflicting publication options are enabled; unavailable evidence stays ungraded.
    • A read-only live script run retained a report and left the target's labels unchanged.
    • Tested revision: e1ce4b56f23eaacbc2258d7b95ced701bce7122d (same tree tested before commit).
    • Not run: a live reusable workflow and artifact download.
  • Deviations: The report does not prove snapshot consistency; separate reads may race.

Reviewer context

  • Type: feature, optional report-only mode.
  • Stack order: 1/9; followed by fix(pr-risk): discard reports for changed revisions #446 — fix(pr-risk): discard reports for changed revisions.
  • Allowed effects: Actions run/check records and a retained artifact. The workflow keeps its existing declared token permissions.
  • Unaffected behavior: default labeling and optional publication remain unchanged.

Summary

  • Add an opt-in that retains per-target results and records for 30 days.
  • Suppress the labeler, comment publisher and optional Check Run in report-only mode.
  • Report unknown evidence explicitly and preserve it without claiming a label was applied.

Recovery

Unset report_only for the caller to return to the existing behavior, or revert this PR. The existing default remains off.

@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