refactor(cursor): split tool-definitions into naming, schema, and guidance leaves (split S04 L1/5) - #3570
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
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. |
리뷰 · 우선순위 69 / 80이 PR은 adapters-cursor 스플릿 열차 S04의 L1/5 칸입니다. 지금 src/adapters/cursor/tool-definitions.ts (residual) - 빌더·structured-edit·protobuf 인코딩만 남겼습니다. 공개 표면은 re-export 세 줄로 naming/schemas/guidance를 이어 붙입니다. 소비자 경로는 유지됩니다. src/adapters/cursor/tool-naming.ts - DAG 루트입니다. 상수·별칭·wire-name·choice 매칭이 여기로 모입니다. 형제 리프 import가 없어야 하고, 새 테스트가 소스에 src/adapters/cursor/tool-schemas.ts - 입력/arg-normalize 스키마와 shell-bridge 검증이 이동합니다. naming만 의존합니다. src/adapters/cursor/tool-guidance.ts - generic-tool-use 힌트와 시스템 노트가 이동합니다. naming만 의존합니다. code-mode 가이던스가 shell-bridge 가이던스와 섞이지 않게 유지하는 층입니다. 본문 “formerly private helpers become leaf-internal exports” - facade로는 안 열고 leaf 안에서만 export합니다. 의도된 시임이면 괜찮고, 공개 API 표가 커지지 않았는지만 확인하면 됩니다. 경로 S04 L0 #3557 - 이 PR의 base입니다. 아직 OPEN이라 #3557이 먼저 tests/providers/cursor/cursor-tool-definitions.test.ts - seam identity + naming DAG 루트 검사를 추가했습니다. PURE-MOVE 회귀를 잡는 값이 있습니다. 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Ingwannu
left a comment
There was a problem hiding this comment.
Approved for the isolated stack diff at exact head fdddbd3e1516997111b201a7c191fc08a6f8d4dd.
The facade keeps the established import surface, the naming/schema/guidance leaves preserve the moved behavior, and the new seam test pins binding identity plus the intended dependency root. Focused Cursor/tool-conformance and Lab-boundary validation: 220 pass / 0 fail. Root typecheck passes, git diff --check is clean, and exact-head hosted CI is green.
Landing condition: this PR currently targets the stack branch codex/split-cursor-desktop-executor-contract, not an integration branch. Per repository policy, merge #3557 bottom-up first, then retarget/rebase this exact diff onto current dev and require fresh exact-head CI before merging. This approval is for the reviewed layer; it is not approval to land the stacked base directly.
|
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/adapters/cursor/tool-definitions.ts(777 lines) splits into three sibling leaves —tool-naming.ts(252: tool-name constants, alias/choice predicates, wire-name mapping),tool-schemas.ts(195: input/arg-normalize schemas and shell-bridge validation),tool-guidance.ts(236: generic-tool-use hint and the tool-guidance system note) — leaving a 112-line residual that builds the definitions and re-exports all 55 previously exported names. Every existing import path (13 consumers) keeps working; three formerly private helpers become leaf-internal exports and are not exposed through the facade.devlog/_plan/260905_now_split_train/110_adapters_cursor_tool_definitions.md; rules003_parent_decisions.md(PURE-MOVE-SIZE-01, TYPE-CYCLE-01).Stack (S04 adapters-cursor; merge bottom-up):
Depends on #3557 (its type-contract move is what keeps the new leaves out of the old provider→desktop type cycle). Review this PR's diff only (5 files, +701/−670; non-move diff: 6 leaf import lines, 5 residual wiring lines, 3 export modifiers, 13 test lines). Move-aware view:
git diff --color-moved=dimmed-zebra codex/split-cursor-desktop-executor-contract...HEAD.Verification
bun run typecheck→ exit 0tests/lab/core-lab-boundary.test.ts→ 17 pass / 0 fail (the leaves are reached fromsrc/server/responses/core.tsvia the cursor adapter)cursor-tool-definitions.test.ts:44; removing the pinned-choice escape fails:340; a Lab import intool-naming.tsfails the transitive boundary guard with the full chain.bun run privacy:scan→ passedtool-naming.tsimports no sibling leaf.tool-naming.tsis the DAG root.lidge) at this exact SHA: recorded in the devlog doc.Checklist