Skip to content

Require Guardian review for incompatible compaction checkpoints - #42588

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

Require Guardian review for incompatible compaction checkpoints#42588
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/1ce959cb276edc602fd7dfa442133c7fe5e53857

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 3, 2026

Copy link
Copy Markdown

Require Guardian review for incompatible compaction checkpoints

Why

Guardian can reuse an opaque parent compaction only when the checkpoint's
recorded producer hash matches the scoring model. Missing or incompatible
provenance must not allow an asynchronous score or cached approval to omit
compacted context.

What changed

  • Record the producing model's compatibility hash on compaction history items
    and expose the latest checkpoint hash through conversation snapshots.
  • In thread-owned context mode, fail closed and require synchronous review when
    checkpoint reuse is enabled but the latest checkpoint is incompatible or has
    unknown provenance.
  • Reject incompatible checkpoints in the sampler while preserving the legacy
    context behavior.

Testing

Add coverage for local, remote, resumed, compacted, and rolled-back histories,
including matching, mismatched, missing, and empty compatibility hashes.

## Why

Guardian can reuse an opaque parent compaction only when the checkpoint's
recorded producer hash matches the scoring model. Missing or incompatible
provenance must not allow an asynchronous score or cached approval to omit
compacted context.

## What changed

- Record the producing model's compatibility hash on compaction history items
  and expose the latest checkpoint hash through conversation snapshots.
- In thread-owned context mode, fail closed and require synchronous review when
  checkpoint reuse is enabled but the latest checkpoint is incompatible or has
  unknown provenance.
- Reject incompatible checkpoints in the sampler while preserving the legacy
  context behavior.

## Testing

Add coverage for local, remote, resumed, compacted, and rolled-back histories,
including matching, mismatched, missing, and empty compatibility hashes.

GitOrigin-RevId: 1ce959cb276edc602fd7dfa442133c7fe5e53857
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/1ce959cb276edc602fd7dfa442133c7fe5e53857 branch from 8e4101c to ad8ee16 Compare September 3, 2026 17:49
@copyberry
copyberry Bot merged commit ad8ee16 into main Sep 3, 2026
26 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/1ce959cb276edc602fd7dfa442133c7fe5e53857 branch September 3, 2026 17:50
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 3, 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