fix(codebuddy): refuse DSML scaffold with a bare tool name - #4887
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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe CodeBuddy scaffold guard now detects bare and namespaced DSML invoke names instead of requiring the ChangesCodeBuddy scaffold guard
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The guard now refuses named bare and namespaced scaffolds while preserving documented safe pass-through cases. No merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
리뷰 · 우선순위 77 / 80이 PR은 CodeBuddy 어댑터의 DSML 스캐폴드 거부가 빈 도구 이름 다음 글자까지 보도록 고칩니다. 현재 고치는 폭은 의도적으로 좁습니다. 테스트도 같은 이야기를 코드로 고정합니다. 라인 11 - DSML_INVOKE_PREFIX를 여는 따옴표까지만 남겨, bare 도구 이름도 같은 접두 경로로 잡히게 한다. 라인 80-81 - invokeRest가 접두와 일치한 뒤, 첫 이름 글자가 있고 공백/따옴표가 아닐 때만 fail한다. 빈 tests/providers/codebuddy-adapter.test.ts (bare %s / split prefix / empty name) - #4852가 측정한 누수 이름 네 개와 델타 경계, 빈 이름 통과를 고정한다. 회귀가 다시 열리면 바로 빨개진다. structure/providers/chat-compat.md - 계약 문장을 bare/namespaced named invoke로 고쳐 구현과 문서를 맞춘다. 가드만 바뀌고 문서가 남는 드리프트를 피한다. 거절 범위 / 승격 없음 - 스코프가 거부 가드에 머문다. 벤더 DSML을 Codex 툴 콜로 바꾸지 않으므로 실행 권한 경계는 그대로다. 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51e80da264
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // discussing one tag. | ||
| const DSML_CALLS_LINE = "<||dsml|| calls>"; | ||
| const DSML_INVOKE_PREFIX = "<||dsml|| invoke name=\"functions."; | ||
| const DSML_INVOKE_PREFIX = "<||dsml|| invoke name=\""; |
There was a problem hiding this comment.
Update every mapped adapter document
This changes src/adapters/, but the commit updates only structure/providers/chat-compat.md; the source map also lists runtime.md, transports/byte-accounting.md, transports/responses.md, transports/inventory.md, data-planes/inbound-compat.md, providers/cursor.md, and adapters/registry.md. Update every mapped document in this change as required, so the architecture set does not describe the adapter area inconsistently.
AGENTS.md reference: src/AGENTS.md:L11-L11
Useful? React with 👍 / 👎.
|
✅ Deterministic PR hygiene checks passed. |
Summary
functions.namespace prefix. The routed model writes the bare name, so every marker misses and the whole control block is forwarded as assistant text — which is why [codebuddy] Routed tool-call markup reaches the client as assistant text (no scaffolding guard, unlike #4190) #4596 still reproduces on the released build.functions.exec,functions.Bashandfunctions.apply_patchare refused, whileBash,exec,shellandapply_patchall leak. The block opener matches in every case and the delta-boundary handling already works; the namespace prefix on the invoke target was the only gap.DSML_INVOKE_PREFIXnow stops at the opening quote and refusal requires a non-empty name character after it. The narrowness that keeps prose safe is the two-line calls-plus-invoke grammar at column zero outside fenced Markdown, not the namespace, and that is unchanged. So are the held-suffix bound and the singlevendor_scaffold_detectedoutcome.Closes #4852
Verification
~/.opencodexdata). Hosted CI on this head is the verifier.prefixAtEnd/DSML_INVOKE_PREFIX.startsWith(invokeRest), and refusal fires once the first name character arrives.tests/providers/codebuddy-adapter.test.ts: bareBash,exec,shellandapply_patchrefused; thefunctions.-prefixed [codebuddy] Routed tool-call markup reaches the client as assistant text (no scaffolding guard, unlike #4190) #4596 samples including the split-delta one still refused; a bare-name block split at the invoke prefix refused; quoted prose, fenced examples, an empty name, and a calls line with no invoke line all still forwarded.Checklist
Summary by CodeRabbit
Bug Fixes
Tests