Skip to content

Preserve model and access program pairs during compaction - #48224

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

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

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Preserve model and access program pairs during compaction

Why

Compaction using the previous model can inherit the current turn's access program, producing a model/program pair that the server rejects.

What changed

  • Persist cyber_access_program in previous-turn settings and restore it during rollout reconstruction.
  • Use the previous turn's access program when compacting with its model, preserving an absent program instead of inheriting the current selection.
  • Pass the selected access program into local compaction prompts.

Testing

Add regression coverage for local and remote compaction after model switches, including resume, fork, rollback, and compaction checkpoints. Verify fallback and subsequent sampling use the current model/program pair, and API-key sessions do not inherit access-program authorization.

## Why

Compaction using the previous model can inherit the current turn's access program, producing a model/program pair that the server rejects.

## What changed

- Persist `cyber_access_program` in previous-turn settings and restore it during rollout reconstruction.
- Use the previous turn's access program when compacting with its model, preserving an absent program instead of inheriting the current selection.
- Pass the selected access program into local compaction prompts.

## Testing

Add regression coverage for local and remote compaction after model switches, including resume, fork, rollback, and compaction checkpoints. Verify fallback and subsequent sampling use the current model/program pair, and API-key sessions do not inherit access-program authorization.

GitOrigin-RevId: eaa7162e8711446dc9eb1bfff194e711abd54d7e
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/eaa7162e8711446dc9eb1bfff194e711abd54d7e branch from c518296 to 5f3180c Compare September 25, 2026 22:14
@copyberry
copyberry Bot merged commit 5f3180c into main Sep 25, 2026
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/eaa7162e8711446dc9eb1bfff194e711abd54d7e branch September 25, 2026 22:14
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@github-actions github-actions Bot locked and limited conversation to collaborators Sep 25, 2026
@akrohn
akrohn deployed to issue-triage September 25, 2026 22:23 — with GitHub Actions Active
@akrohn
akrohn deployed to issue-triage September 25, 2026 22:23 — with GitHub Actions Active
@akrohn
akrohn deployed to issue-triage September 25, 2026 22:23 — with GitHub Actions Active
@akrohn
akrohn deployed to issue-triage September 25, 2026 22:25 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
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.

5 participants