Skip to content

Keep Guardian review evidence consistent and reject stale approvals - #43442

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/1c2c82197a27c0d3d45b6fe08d200a835d80cc30
Sep 7, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/1c2c82197a27c0d3d45b6fe08d200a835d80cc30

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Keep Guardian review evidence consistent and reject stale approvals

Why

Concurrent parent compaction can remove evidence between Guardian checkpoint selection and prompt construction. New user instructions or answers received during a review can also invalidate an approval based on earlier authorization.

What changed

  • With GuardianThreadContext enabled, use the same parent history snapshot for checkpoint selection and prompt evidence.
  • Cancel completed allow decisions if the owning session's user-message revision or root authorization version changed during the review, even without cacheable review evidence.

Testing

Add regression coverage for evidence preservation during concurrent compaction and aborted approvals after new user instructions or verified answers. Extend reviewer context rollover coverage to exercise GuardianThreadContext.

…43442)

## Why

Concurrent parent compaction can remove evidence between Guardian checkpoint selection and prompt construction. New user instructions or answers received during a review can also invalidate an approval based on earlier authorization.

## What changed

- With `GuardianThreadContext` enabled, use the same parent history snapshot for checkpoint selection and prompt evidence.
- Cancel completed allow decisions if the owning session's user-message revision or root authorization version changed during the review, even without cacheable review evidence.

## Testing

Add regression coverage for evidence preservation during concurrent compaction and aborted approvals after new user instructions or verified answers. Extend reviewer context rollover coverage to exercise `GuardianThreadContext`.

GitOrigin-RevId: 1c2c82197a27c0d3d45b6fe08d200a835d80cc30
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/1c2c82197a27c0d3d45b6fe08d200a835d80cc30 branch from 841bfb3 to 5b85aea Compare September 7, 2026 11:52
@copyberry
copyberry Bot merged commit 5b85aea into main Sep 7, 2026
26 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/1c2c82197a27c0d3d45b6fe08d200a835d80cc30 branch September 7, 2026 11:53
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant