fix(compaction): keep compaction_trigger as final input item - #546
fix(compaction): keep compaction_trigger as final input item#546ImogeneOctaviap794 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
Included review availability: Your plan includes up to 4 reviews per rolling hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe change normalizes Responses request bodies so direct ChangesCompaction trigger finalization
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The change normalizes compaction triggers at request boundaries while preserving other input items and legacy input forms. No actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant Client
participant PrepareResponsesBody
participant normalizeCompactionTriggerFinal
participant ResponsesExecutor
participant UpstreamResponsesAPI
Client->>PrepareResponsesBody: prepare Responses request body
PrepareResponsesBody->>normalizeCompactionTriggerFinal: normalize input items
normalizeCompactionTriggerFinal-->>PrepareResponsesBody: one final compaction_trigger
PrepareResponsesBody->>ResponsesExecutor: forward prepared body
ResponsesExecutor->>normalizeCompactionTriggerFinal: enforce final trigger ordering
normalizeCompactionTriggerFinal-->>ResponsesExecutor: normalized request body
ResponsesExecutor->>UpstreamResponsesAPI: send normalized request
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What happened
Codex Responses requests can carry a
compaction_triggerbefore a later input item. This showed up repeatedly with the Codex VS Code client build26.814.41407and was rejected upstream with:The 'compaction_trigger' item must be the final input item.Fix
compaction_triggeritems after response-context expansion.inputwhile preserving all other items in order.Tests
go test ./...go vet ./...Summary by CodeRabbit
Bug Fixes
Tests