fix(openai): complete Codex state and compact probing - #5687
Open
lyy0709 wants to merge 1 commit into
Open
Conversation
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.
Summary
Follow-up to #5668, limited to the Codex state-machine, remote-compaction capability probe, and beta/default upgrade gaps that remained after that PR.
x-codex-turn-statevalue to the OAuth account that actually delivered it, persist only a scoped digest across instances, and strip only known cross-account echoesresponse.completed, count onlyresponse.output_item.done, require exactly one compaction item, permit unrelated done items, and ignore bytes after the first terminalcompaction_summaryserde alias, while removing added-only fallback and compaction deduplication that could hide malformed streamsOfficial Codex reference audited at
49db349ffdd888f5e3c91abf9b7519d8631e6e9a:Regression coverage
New and expanded tests cover:
[DONE], terminal ordering, added-only output, duplicate compaction items, aliases, incomplete/truncated/oversized/read-error bodies, and 2xx/error status matricesVerification
cd backend && go test ./... -count=1cd backend && go test -tags=unit ./... -count=1cd backend && go test -tags=integration ./... -count=1go test -racefor the changed service/repository pathscd backend && golangci-lint run ./...make testpnpm --dir frontend run test:run(223 files, 1547 tests)pnpm --dir frontend run test:coverage(223 files, 1547 tests)make buildNo frontend, dependency, lockfile, or version metadata changes are included.