Skip to content

Stabilize Guardian snapshot prefixes by separating assistant context - #51627

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/15cda59d24bee0106f6a66c067f6a790fa91df69
Oct 7, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Stabilize Guardian snapshot prefixes by separating assistant context

Why

Retained assistant context changes as the conversation grows. Keeping it separate from retained user instructions lets independent Guardian snapshots preserve a reusable instruction and transcript prefix.

What changed

Move retained user instructions before the transcript and place assistant originals and their omission notice in a separate RETAINED ASSISTANT CONTEXT section afterward. Preserve evidence, delivery roles, source metadata, and deduplication across both retained sections. Clear omission delivery metadata when a split assistant notice cannot be attributed to a single section.

Testing

Add regression coverage for prefix stability as assistant context and previous reviews change, evidence preservation, repeated preparation, and deduplication. Update approval-routing and scorer tests to check the new section order and retention of assistant text outside a smaller transcript budget.

…51627)

## Why

Retained assistant context changes as the conversation grows. Keeping it separate from retained user instructions lets independent Guardian snapshots preserve a reusable instruction and transcript prefix.

## What changed

Move retained user instructions before the transcript and place assistant originals and their omission notice in a separate `RETAINED ASSISTANT CONTEXT` section afterward. Preserve evidence, delivery roles, source metadata, and deduplication across both retained sections. Clear omission delivery metadata when a split assistant notice cannot be attributed to a single section.

## Testing

Add regression coverage for prefix stability as assistant context and previous reviews change, evidence preservation, repeated preparation, and deduplication. Update approval-routing and scorer tests to check the new section order and retention of assistant text outside a smaller transcript budget.

GitOrigin-RevId: 15cda59d24bee0106f6a66c067f6a790fa91df69
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/15cda59d24bee0106f6a66c067f6a790fa91df69 branch from f68ccea to 5b0b253 Compare October 7, 2026 09:08
@copyberry
copyberry Bot merged commit 5b0b253 into main Oct 7, 2026
1 check passed
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-07T09:08:06.252701Z f68ccea PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/15cda59d24bee0106f6a66c067f6a790fa91df69 branch October 7, 2026 09:08
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 7, 2026
@iaRay
iaRay deployed to issue-triage October 7, 2026 09:17 — with Image GitHub Actions Active
@iaRay
iaRay deployed to issue-triage October 7, 2026 09:17 — with Image GitHub Actions Active
@iaRay
iaRay deployed to issue-triage October 7, 2026 09:17 — with Image GitHub Actions Active
@WilliamsSum
WilliamsSum deployed to issue-triage October 7, 2026 09:22 — with Image GitHub Actions Active
@WilliamsSum
WilliamsSum deployed to issue-triage October 7, 2026 09:22 — with Image GitHub Actions Active
@WilliamsSum
WilliamsSum deployed to issue-triage October 7, 2026 09:22 — with Image GitHub Actions Active
@WilliamsSum
WilliamsSum deployed to issue-triage October 7, 2026 09:23 — with Image GitHub Actions Active
@MarcusA511
MarcusA511 deployed to issue-triage October 7, 2026 09:23 — with Image GitHub Actions Active
@MarcusA511
MarcusA511 deployed to issue-triage October 7, 2026 09:23 — with Image GitHub Actions Active
@MarcusA511
MarcusA511 deployed to issue-triage October 7, 2026 09:23 — with Image GitHub Actions Active
@MarcusA511
MarcusA511 deployed to issue-triage October 7, 2026 09:24 — with Image GitHub Actions Active
@wcastand
wcastand deployed to issue-triage October 7, 2026 09:35 — with Image GitHub Actions Active
@wcastand
wcastand deployed to issue-triage October 7, 2026 09:35 — with Image GitHub Actions Active
@wcastand
wcastand deployed to issue-triage October 7, 2026 09:35 — with Image GitHub Actions Active
@aimansour
aimansour deployed to issue-triage October 7, 2026 09:46 — with Image GitHub Actions Active
@aimansour
aimansour deployed to issue-triage October 7, 2026 09:46 — with Image GitHub Actions Active
@aimansour
aimansour deployed to issue-triage October 7, 2026 09:46 — with Image GitHub Actions Active
@aimansour
aimansour deployed to issue-triage October 7, 2026 09:48 — with Image GitHub Actions Active
@hans-1
hans-1 deployed to issue-triage October 7, 2026 09:52 — with Image GitHub Actions Active
@hans-1
hans-1 deployed to issue-triage October 7, 2026 09:52 — with Image GitHub Actions Active
@hans-1
hans-1 deployed to issue-triage October 7, 2026 09:52 — with Image GitHub Actions Active
@santastabber
santastabber deployed to issue-triage October 7, 2026 09:57 — with Image GitHub Actions Active
@santastabber
santastabber deployed to issue-triage October 7, 2026 09:57 — with Image GitHub Actions Active
@santastabber
santastabber deployed to issue-triage October 7, 2026 09:57 — with Image GitHub Actions Active
@ra000sh-jpg
ra000sh-jpg deployed to issue-triage October 7, 2026 09:58 — with Image GitHub Actions Active
@ra000sh-jpg
ra000sh-jpg deployed to issue-triage October 7, 2026 09:58 — with Image GitHub Actions Active
@ra000sh-jpg
ra000sh-jpg deployed to issue-triage October 7, 2026 09:58 — with Image GitHub Actions Active
@santastabber
santastabber deployed to issue-triage October 7, 2026 09:58 — with Image GitHub Actions Active
@etleli
etleli deployed to issue-triage October 7, 2026 10:10 — with Image GitHub Actions Active
@etleli
etleli deployed to issue-triage October 7, 2026 10:10 — with Image GitHub Actions Active
@etleli
etleli deployed to issue-triage October 7, 2026 10:10 — with Image GitHub Actions Active
@pavel-s-a
pavel-s-a deployed to issue-triage October 7, 2026 10:13 — with Image GitHub Actions Active
@pavel-s-a
pavel-s-a deployed to issue-triage October 7, 2026 10:13 — with Image GitHub Actions Active
@pavel-s-a
pavel-s-a deployed to issue-triage October 7, 2026 10:13 — with Image GitHub Actions Active
@PilgrimViis
PilgrimViis deployed to issue-triage October 7, 2026 10:19 — with Image GitHub Actions Active
@PilgrimViis
PilgrimViis deployed to issue-triage October 7, 2026 10:19 — with Image GitHub Actions Active
@PilgrimViis
PilgrimViis deployed to issue-triage October 7, 2026 10:19 — with Image GitHub Actions Active
@iopsthecloud
iopsthecloud deployed to issue-triage October 7, 2026 10:26 — with Image GitHub Actions Active
@iopsthecloud
iopsthecloud deployed to issue-triage October 7, 2026 10:26 — with Image GitHub Actions Active
@iopsthecloud
iopsthecloud deployed to issue-triage October 7, 2026 10:26 — with Image GitHub Actions Active
@bjrobertxie
bjrobertxie deployed to issue-triage October 7, 2026 10:31 — with Image GitHub Actions Active
@bjrobertxie
bjrobertxie deployed to issue-triage October 7, 2026 10:31 — with Image GitHub Actions Active
@bjrobertxie
bjrobertxie deployed to issue-triage October 7, 2026 10:31 — with Image GitHub Actions Active
@bjrobertxie
bjrobertxie deployed to issue-triage October 7, 2026 10:33 — with Image 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.