Skip to content

feat(pr-risk): record observed base revision - #444

Draft
huang47 wants to merge 1 commit into
mainfrom
codex/risk-report-base-revision
Draft

huang47 wants to merge 1 commit into
mainfrom
codex/risk-report-base-revision

Conversation

@huang47

@huang47 huang47 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

A risk report records the change being reviewed, but it did not say which base revision was visible when it was collected. This adds that observation so readers can identify the comparison point while keeping its limits explicit.

base-flow

Motivation

A risk record is easier to interpret when both sides of the change have revision identifiers. Other reads in the grading process happen separately, so recording the base alone does not establish that the whole record is an atomic snapshot.

Provenance

  • Authored by: interactive session
  • Verified:
    • Risk script suites and ShellCheck passed.
    • Workflow pin, agent instruction and repository literal checks passed.
    • The new field and its null case passed the regression suite; a read-only live query returned both revisions.
    • Tested revision: 3433be9997a2431564eeb080f29109e1c90f4b55 (same tree tested before commit).
  • Deviations: None for this slice.

Reviewer context

  • Type: feature, additive report provenance.
  • Stack order: 1/1, independent provider change.
  • Allowed effects: the existing PR read requests one more field; no new publication or mutation.
  • Unaffected behavior: risk grading and label decisions remain unchanged.

Summary

  • Add observed_base_sha to live schema 5 risk records, or null when unavailable.
  • Document that separately fetched policy and files can race the observed revision.

Recovery

Revert this change to restore the previous record shape. Consumers should tolerate records without the field.

@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