proxy: preserve response annotations #33

Merged
wmc merged 1 commit from codex/chat-response-annotations into main 2026-06-23 08:06:37 +00:00
Owner

Summary

  • Preserve sanitized compatible non-streaming Responses output_text annotations converted from Chat response annotations.
  • Offset text-span citation annotations when joining multiple Chat content parts, while keeping file-list indexes unchanged.
  • Drop unknown, malformed, boolean, negative, reversed, and out-of-range annotation objects, and document streaming annotation handling as follow-up work.

Verification

  • RED: focused annotations test failed before implementation because converted annotations were empty.
  • DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer xcodebuild test -project CodexModelSwitcher.xcodeproj -scheme CodexModelSwitcher -configuration Debug -destination platform=macOS -derivedDataPath /tmp/CodexModelSwitcher-DerivedData-annotations-review-gap CODE_SIGNING_ALLOWED=NO -only-testing:CodexModelSwitcherTests/CompatibilityProxyServerTests/testResponsesBodyConvertsChatContentArrayToolCallsAndUsage
  • DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer xcodebuild test -project CodexModelSwitcher.xcodeproj -scheme CodexModelSwitcher -configuration Debug -destination platform=macOS -derivedDataPath /tmp/CodexModelSwitcher-DerivedData-annotations-proxy-final CODE_SIGNING_ALLOWED=NO -only-testing:CodexModelSwitcherTests/CompatibilityProxyServerTests
  • git diff --check -- CodexModelSwitcher/CompatibilityProxyServer.swift CodexModelSwitcherTests/CompatibilityProxyServerTests.swift README.md TODO.md
  • DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer scripts/verify.sh
  • Subagent re-review: one low test-gap finding on file_citation.index coverage was fixed; no remaining correctness, security, compatibility, README, or TODO issues reported.
## Summary - Preserve sanitized compatible non-streaming Responses `output_text` annotations converted from Chat response annotations. - Offset text-span citation annotations when joining multiple Chat content parts, while keeping file-list indexes unchanged. - Drop unknown, malformed, boolean, negative, reversed, and out-of-range annotation objects, and document streaming annotation handling as follow-up work. ## Verification - RED: focused annotations test failed before implementation because converted `annotations` were empty. - `DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer xcodebuild test -project CodexModelSwitcher.xcodeproj -scheme CodexModelSwitcher -configuration Debug -destination platform=macOS -derivedDataPath /tmp/CodexModelSwitcher-DerivedData-annotations-review-gap CODE_SIGNING_ALLOWED=NO -only-testing:CodexModelSwitcherTests/CompatibilityProxyServerTests/testResponsesBodyConvertsChatContentArrayToolCallsAndUsage` - `DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer xcodebuild test -project CodexModelSwitcher.xcodeproj -scheme CodexModelSwitcher -configuration Debug -destination platform=macOS -derivedDataPath /tmp/CodexModelSwitcher-DerivedData-annotations-proxy-final CODE_SIGNING_ALLOWED=NO -only-testing:CodexModelSwitcherTests/CompatibilityProxyServerTests` - `git diff --check -- CodexModelSwitcher/CompatibilityProxyServer.swift CodexModelSwitcherTests/CompatibilityProxyServerTests.swift README.md TODO.md` - `DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer scripts/verify.sh` - Subagent re-review: one low test-gap finding on `file_citation.index` coverage was fixed; no remaining correctness, security, compatibility, README, or TODO issues reported.
wmc merged commit a2303ee048 into main 2026-06-23 08:06:37 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
wmc/CodexModelSwitcher!33
No description provided.