Skip to content

Preserve Guardian history across thread reconstruction - #42065

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

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

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 1, 2026

Copy link
Copy Markdown

Preserve Guardian history across thread reconstruction

Why

Guardian review evidence must remain available after a compacted thread is resumed or forked, while rolled-back or parent-local evidence must not grant authorization in a different context.

What changed

  • Store the bounded, model-invisible Guardian transcript alongside compacted rollout history and restore it from the newest surviving checkpoint during replay.
  • Trim Guardian history at rollback boundaries, clearing it when the boundary has already been evicted.
  • Preserve the checkpoint for user-initiated forks, but remove it when spawning a subagent so parent review evidence is not inherited.
  • Keep the new rollout field optional for compatibility with existing compacted records and legacy readers.

Testing

  • Cover Guardian history across compaction, restart, paginated and pathless stores, user forks, rollback, bounded replay, serialization, and subagent forks.

## Why

Guardian review evidence must remain available after a compacted thread is resumed or forked, while rolled-back or parent-local evidence must not grant authorization in a different context.

## What changed

- Store the bounded, model-invisible Guardian transcript alongside compacted rollout history and restore it from the newest surviving checkpoint during replay.
- Trim Guardian history at rollback boundaries, clearing it when the boundary has already been evicted.
- Preserve the checkpoint for user-initiated forks, but remove it when spawning a subagent so parent review evidence is not inherited.
- Keep the new rollout field optional for compatibility with existing compacted records and legacy readers.

## Testing

- Cover Guardian history across compaction, restart, paginated and pathless stores, user forks, rollback, bounded replay, serialization, and subagent forks.

GitOrigin-RevId: 6ab076d5e0c3aac4d6a41ebd50ba2b200c90213e
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/6ab076d5e0c3aac4d6a41ebd50ba2b200c90213e branch from 422a2e5 to 28097e9 Compare September 1, 2026 14:36
@copyberry
copyberry Bot merged commit 28097e9 into main Sep 1, 2026
63 of 89 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/6ab076d5e0c3aac4d6a41ebd50ba2b200c90213e branch September 1, 2026 14:39
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 1, 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.

2 participants