refactor(providers): isolate OpenAI destination classification (split S02 L1/4) - #3566
refactor(providers): isolate OpenAI destination classification (split S02 L1/4)#3566lidge-jun wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe change extracts OpenAI destination constants and classification helpers into a new leaf module. The existing provider facade re-exports them. Tests verify export parity and prevent the leaf module from importing the facade. ChangesOpenAI destination classification
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to OpenAI destination classification was moved into a leaf module while preserving existing facade imports and behavior. No current merge-blocking risk is established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
|
✅ Deterministic PR hygiene checks passed. |
리뷰 · 우선순위 72 / 80이 PR은 providers 스플릿 트레인 S02의 첫 칸입니다. 지금 src/providers/openai-tiers.ts - destination 이동 후에도 src/providers/openai-tiers.ts re-export 줄 - 기존 소비자가 src/providers/openai-tiers-destination.ts - 내용이 verbatim move로 보이고, tests/adapters/openai/openai-provider-option.test.ts - red-drive로 destination 판정을 고정한 보강이면 좋다. import가 어느 모듈을 가리키는지만 diff에서 확인하면 된다. 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Ingwannu
left a comment
There was a problem hiding this comment.
Approved on exact head 58dba9e0b2209bd9f76c4d5fb4943df0d6ab710b. The destination constants and predicates are a behavior-preserving extraction, the existing openai-tiers facade keeps all prior bindings, the leaf does not import the facade, and no state owner is duplicated. Independent isolated verification passed 91/91 across the destination and compaction boundaries; exact-head cross-platform CI and CodeRabbit are green with no unresolved thread.
|
Superseded by aggregate PR #3668, admin-merged into dev as 6585e6a after exact-head CI and tested-tree verification. This original PR was not individually merged; its rebased content and historical records were consolidated in #3668. The original branch is preserved. Further unimplemented debt layers remain deferred. |
Summary
CODEX_FORWARD_BASE_URL,isCanonicalOpenAiForwardProvider,supportsNativeResponsesCompactEndpoint,isOpenAiOperatedResponsesDestination,destinationDecodesNativeCompactionBloband their private helpers —src/providers/openai-tiers.ts:6–11, 23–114) moves verbatim tosrc/providers/openai-tiers-destination.ts(102 lines).openai-tiers.tskeeps the tier-migration projection (319 lines) and re-exports all nine moved names, so every existing import path keeps working.devlog/_plan/260905_now_split_train/040_providers_openai_tiers.md; rules003_parent_decisions.md(PURE-MOVE-SIZE-01).Stack (S02 providers; merge bottom-up):
Base: dev. Review this PR's diff only (3 files, +117/−99; non-move diff: 2 leaf imports, 1 local import, 1 re-export line, 13 test lines). Move-aware view:
git diff --color-moved=dimmed-zebra dev...HEAD.Verification
bun run typecheck→ exit 0tests/lab/core-lab-boundary.test.ts→ 17 pass / 0 failisCanonicalOpenAiForwardProviderfailsopenai-provider-option.test.ts:37; invertingsupportsNativeResponsesCompactEndpointfailsresponses-compaction-routing.test.ts:154/167.bun run privacy:scan→ passedtoBe) to the facade re-exports; the leaf does not import the facade.lidge) at this exact SHA: recorded in the devlog doc.Checklist
Summary by CodeRabbit
Refactor
Tests