fix(command-code): preserve conversation cache affinity - #3581
Conversation
|
✅ Deterministic PR hygiene checks passed. |
|
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; 6 remain after this review. 📝 WalkthroughWalkthroughCommand Code now derives stable session IDs from trusted conversation identity, preserves prompt-cache cohort metadata during request parsing, and forwards configured prompt cache keys to Chat Completions requests. ChangesCommand Code session affinity
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Command Code now maintains cache affinity only for trusted conversation identities while keeping shared or unclassified cache keys isolated. The covered behavior is ready to merge with no active current-head risk identified. Sequence Diagram(s)sequenceDiagram
participant Client
participant RequestParser
participant CommandCodeAdapter
participant CommandCodeAPI
Client->>RequestParser: send thread and prompt-cache identity
RequestParser->>CommandCodeAdapter: provide OcxParsedRequest with cohort marker
CommandCodeAdapter->>CommandCodeAdapter: derive commandCodeSessionId
CommandCodeAdapter->>CommandCodeAPI: send x-session-id and prompt_cache_key
🚥 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 |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. Hygiene✅ Deterministic PR hygiene checks passed. |
리뷰 · 우선순위 58 / 80이 PR은 Command Code 어댑터가 매 요청마다 고치는 방식은 쉽습니다. 믿을 수 있는 대화 정체성만 골라 SHA-256으로 불투명 UUID처럼 보이게 만든 뒤 함께 손본 배선도 중요합니다. 지금 경로 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
리뷰 · 우선순위 58 / 80지금 지금 고치는 방법은 세 갈래다. 첫째, 믿을 수 있는 대화 정체성에서 안개처럼 가린(해시) 세션 id를 만든다. 우선순위는 테스트도 핵심을 찌른다. 같은 스레드면 id가 같고, 원문 비밀값은 UUID 문자열에 안 나오고, 공유/미분류 캐시 키와 프롬프트 본문만으로는 affinity가 생기지 않으며, 레지스트리 플래그가 켜지면 바디에 types.ts/config.ts 대형 분할 열차와는 무관하다. 닫고 리베이스할 대상이 아니다. 중복 PR로 보이는 열린 짝도 지금 검색에서는 없다. 라인 - 코드 자체보다 상태: 이 PR은 아직 draft이고, readiness checklist의 “Codex/CodeRabbit 정리 끝”, “리뷰 준비됨” 칸이 비어 있다. 머지 후보로 올리기 전에 undraft가 먼저다.
경로 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
0d396f0 to
8ef7cde
Compare
|
Update after the maintainer and automated reviews:
CodeRabbit produced no actionable comments. The docstring-coverage warning is non-blocking here: the only new exported helper already has a descriptive name and focused behavioral tests, while the requested UUID-shaping clarification is now directly beside the non-obvious expression. |
8ef7cde to
f60397d
Compare
|
Rebased cleanly onto current upstream |
Owner-authorized admin integration of the independently reviewed A stack through #3716. Exact head: 5097e66. All 24 actual full cross-platform producers succeeded in https://github.com/lidge-jun/opencodex/actions/runs/33991642514. Any queued aggregation-only job is accepted only after directly checking its exact allowlist. No pending or failed functional producer of this integration candidate is waived. Carries #3708 bounded Unix probe cleanup and deterministic verification, #3692 Command Code conversation affinity (source #3581), and #3694 effective provider capability evaluation (source #3671). Earlier failing foundation jobs remain recorded and are superseded by this fully tested descendant. All lower-layer and contributor commits remain ancestors; original author identities are preserved. After dev ancestry verification, originals and superseded review PRs are closed with the actual landing evidence. Related #3661 remains open. Co-authored-by: SB Yoon <44089734+yansigit@users.noreply.github.com> Co-authored-by: Hako <25837994+devswha@users.noreply.github.com>
|
Carried through #3692 and integrated by #3716 into dev as |
## Summary - Archive the five completed A runtime/routing work units and record the disposition of original PRs #3672, #3679, #3568, #3581 and #3671. All five originals are closed and their credited changes are on dev. - Record the actual final stack integration through #3716, dev merge `a2f69c8aa60976345740ae6f3d2301f89297328e`, including GitHub's automatic recognition of folded parents. Related #3661 remains open for the residual recovery scope. - [Outcome and evidence](https://github.com/lidge-jun/opencodex/blob/5a9476e522c085b3e2308935d89401d07d5ae015/devlog/_fin/260906_a_runtime_stack/090_outcome.md). ## Verification - Final candidate full CI [33991642514](https://github.com/lidge-jun/opencodex/actions/runs/33991642514): all 24 actual cross-platform producers and aggregate passed. - Integrated dev CI [33993960826](https://github.com/lidge-jun/opencodex/actions/runs/33993960826): all 17 applicable producers and aggregate passed; two dispatch-only jobs correctly skipped. - Diff against verified integration is confined to the five A documentation units. Runtime, tests and dependencies are byte-identical. Independent factual, attribution and privacy-content review passed; remote privacy scan passed at exact head `5a9476e522c085b3e2308935d89401d07d5ae015`. - No local product tests, typechecks or builds were run, as requested by the owner. ## Checklist - [x] Scope stays focused and avoids unrelated cleanup. - [x] Docs or release notes were updated when needed. - [x] Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.
Summary
x-session-idfrom opaque, provider-scoped trusted conversation identity so retries and related calls retain cache affinity.Verification
f60397d34, rebased onto currentdevbe81013fa.bun test tests/providers/command-code-provider.test.ts tests/providers/commandcode-provider.test.ts tests/claude-integration/claude-code-thought-signature-scope.test.ts— 49 pass, 0 fail.bun run typecheck— pass.bun run privacy:scan— pass.git diff --check— pass.bun run test— 18,244 pass, 14 skip, 0 fail across 1,077 files.Checklist
Scope is limited to Command Code affinity and its request plumbing; no unrelated cleanup is included. Documentation is unchanged because this corrects internal transport affinity without adding user configuration. Security-sensitive identity/cohort behavior received an independent review.
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
New Features
Bug Fixes