refactor(vision): split planning and image rewriting out of the vision index (split S06 L1/2) - #3577
refactor(vision): split planning and image rewriting out of the vision index (split S06 L1/2)#3577lidge-jun wants to merge 2 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
✅ 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 (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe change extracts vision sidecar planning and image rewriting from ChangesVision image rewriting
Vision sidecar planning
Vision boundary exports and validation
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: 🟡 Moderate · up to The module split may break existing consumers that import several image-rewrite helpers through src/vision. Restore those boundary exports or explicitly accept the compatibility break before merging. Sequence Diagram(s)sequenceDiagram
participant ParsedRequest
participant VisionPlanner
participant VisionSidecar
participant ImageRewriter
ParsedRequest->>VisionPlanner: inspect model, provider, and image eligibility
VisionPlanner->>VisionSidecar: resolve backend and description settings
VisionSidecar-->>VisionPlanner: return vision plan
ParsedRequest->>ImageRewriter: strip or synchronize image content
ImageRewriter-->>ParsedRequest: return rewritten request content
🚥 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 |
리뷰 · 우선순위 42 / 80이 PR은 지금 메인테이너 관점에서 이 레이어는 “지금 핫픽스 트레인을 막을 버그”가 아니라 모듈 한도·가독성·이후 S06 작업을 위한 구조 정리에 가깝다. #3561/#3562 OAuth/Kiro 캐리나 Windows suite, combo 바운디드 스택과는 파일이 겹치지 않는다. types/config 스플릿 close-don't-rebase 대상도 아니다. 작성자가 유지보수자 본인(lidge-jun)이고 chore 라벨이라, 리뷰 포인트는 동작 동치·순환 import·export 표면 유지·남은 index 줄 수다. index가 381줄이면 400줄 한도 안이고, plan 200 / image-rewrite 106도 한도 아래다. 순수 이동이 맞다면 머지 비용이 낮고, S06 다음 레이어(images/artifacts) 전에 깔아 두는 편이 맞다. 다만 pure-move라도 리뷰어가 볼 구멍은 있다. 첫째,
메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Ingwannu
left a comment
There was a problem hiding this comment.
Approved on exact head 51f5a82d7c6ff3cc3a2df1a08716fa5eff1e67b1.
I compared the complete tests/vision batch under isolated homes on this head and on current dev (526d4bf644038deb0c89852597f4551773d46198). The PR produced 171 pass / 2 fail; pristine dev produced 170 pass / the same 2 fail, with the same assertions in vision-reasoning-contract and sidecar-settings-vision-filter case 10. The one extra passing test is this PRs seam/identity guard, so those failures are pre-existing order-dependent baseline noise rather than a regression from the split. Typecheck also passes.
The moved planning and image-rewrite logic retains the existing public exports and one-way dependency boundary. Required macOS jobs are still pending and must finish green before merge. Non-blocking cleanup: git diff --check reports one extra blank line at EOF in src/vision/index.ts:381.
|
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
src/vision/index.ts(667 lines) splits intosrc/vision/plan.ts(200: sidecar planning — timeout/cap resolution, backend and model resolution,planVisionSidecar) andsrc/vision/image-rewrite.ts(106: image-part detection, in-place stripping and raw-body description sync), leaving a 381-line index that owns the description cache anddescribeImagesInPlaceand re-exports every one of the 38 previously exported names. All 24 existing importers keep their../visionpath.devlog/_plan/260905_now_split_train/190_vision_index.md; rules003_parent_decisions.md(PURE-MOVE-SIZE-01, S06-ORACLE-01).Stack (S06 media — independent layers, each based on
dev; no cascade between them):Base: dev. Review this PR's diff only (4 files, +338/−305; non-move diff: 11 leaf import lines, the replaced 40-line header, 3 export modifiers, 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 tests/codex-integration/codex-history-reachability.test.ts tests/windows/windows-popup-fix.test.ts→ 27 pass / 0 fail (the recursive source walkers pick up both leaves automatically)tests/vision+ 6 importer files → 254 pass / 2 fail; the 2 failures (sidecar-settings-vision-filtercase 10,vision-reasoning-contractmanagement rows) reproduce identically on pristinedevwhentests/visionruns as one batch and pass 19/0 when run alone — order-dependent and pre-existing, not from this change.carriesImagesexcludinguserfailsvision-fail-closed.test.ts:20; losing explicit-zero inresolveMaxDescriptionsPerTurnfailsvision-cache.test.ts:134; a runtime Lab import inimage-rewrite.tsfails the transitive boundary guard with the full chain.bun run privacy:scan→ passedresolveMaxDescriptionsPerTurnandstripImagesInPlacevia both paths; leaves have no back-edge toindex/plan.lidge) at this exact SHA: recorded in the devlog doc.Checklist
planVisionSidecar; no auth reads added at module load).Summary by CodeRabbit
New Features
Refactor