Repository navigation
fix(codex): preserve transcript mirror identity during redaction - #126245
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
August 19, 2026 07:38
Keep the writer-owned idempotency key stable across transcript redaction so final Codex snapshots replay against the admitted SQLite row instead of dropping mirrored history.\n\nCloses #126244
steipete
force-pushed
the
steipete/codex-transcript-mirror-append-44
branch
from
August 19, 2026 07:53
c58cddd to
6aee4e3
Compare
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 20, 2026
Keep the writer-owned idempotency key stable across transcript redaction so final Codex snapshots replay against the admitted SQLite row instead of dropping mirrored history.\n\nCloses openclaw#126244
This was referenced Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #126244
What Problem This Solves
Fixes an issue where successful Codex app-server turns could lose their final mirrored transcript snapshot when a configured redaction pattern matched the generated mirror idempotency key. The model reply still completed, but durable history omitted the mirrored messages and only a warning exposed the loss.
Why This Change Was Made
Transcript redaction changed the top-level
idempotencyKeyafter SQLite admission had captured the original value. The insert deduplicated against the redacted key, while replay lookup used the admitted key and missed. This change preserves that writer-owned control-plane identity byte-for-byte while continuing to redact message content.Upstream Codex ordering and identity contracts were checked directly in
codex-rs: turn IDs are stable submission UUIDs, item completion carries the authoritative turn/item identity, and notifications are translated serially. The defect is in OpenClaw's redaction/persistence boundary, not the Codex protocol.AI-assisted implementation; the final diff and upstream contract were manually reviewed.
User Impact
Codex-backed conversations now retain prompt and assistant transcript rows exactly once even when custom transcript redaction patterns match the generated mirror key. Completed replies no longer silently lose durable mirrored history in this case.
Evidence
SQLite transcript append did not insert message <uuid>mirror failure occurred 10 times over roughly seven hours while the corresponding turns completed successfully.session-accessor.sqlite-transcript-message-append.ts:144with the production error.src/agents/transcript-redact.test.tssrc/config/sessions/transcript-append-redact.test.tsextensions/codex/src/app-server/transcript-mirror.test.tsgit diff --checkpassed.+5/-0; tests+39/-0. The production growth is the narrow identity-preservation branch and its ownership comment; no schema, protocol, config, dependency, release, or fallback surface changed.