Repository navigation
fix(claude): retain ToolSearch references in translated results - #6660
Conversation
Preserve client-reported loaded names in paired tool output instead of silently discarding reference-only ToolSearch results. This does not add tool declarations or enable server-side deferral on translated routes. Reported and minimal text projection suggested in lidge-jun#6647 by rhomat27. Co-authored-by: rhomat27 <8294456+rhomat27@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe Claude inbound translation now represents named ChangesTool reference translation
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to No actionable issue remains from this review. Complete the outstanding hosted CI and documentation-build checks before merging. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (5 skipped: 5 unsupported.)
✨ 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 |
|
✅ Deterministic PR hygiene checks passed. |
Text-only tool output is joined without separators downstream, so adjacent
Tool loaded markers fused ("Tool loaded: ReadTool loaded: Write"). Give each
marker its own line breaks and assert the parsed toolResult content.
Pack the new layout entry onto the existing claude-inbound line: dev's
layout.json sits at 1999 lines and a 2000th trips the file-size ratchet.
|
Maintainer integration into
Co-authored-by credit is retained: this is the contributor's own PR branch. |
Summary
Closes #6647.
tool_reference.tool_namevalues asTool loaded: <name>text in the paired translatedfunction_call_output, instead of silently turning reference-only ToolSearch results into an empty string.Verification
Base:
f92482065217bae891a88e27fd6c00012f212042.Head:
502b6e38fb6a0b46f51b84ab8e8f0a36b13f0a8f.Linux, repository-pinned Bun 1.4.0 (34cbb9a40). No live accounts/providers or installed runtime operations.
bun test tests/claude-integration/claude-inbound-tool-reference.test.ts --timeout 20000: 1 pass / 2 fail. The reference-only result was empty; the mixed result omitted the loaded-name block.bun scripts/test.ts --parallel=1 tests/claude-integration/claude-inbound-tool-reference.test.ts tests/claude-integration/claude-inbound.test.ts tests/claude-integration/claude-inbound-cache-stabilize.test.ts tests/test-layout.test.ts tests/test-layout-tooling.test.ts tests/ci-workflows/file-size-ratchet.test.ts --timeout 20000: 140 pass / 0 fail, 997 assertions across six files.bun scripts/structure-ssot.tsandgit diff --cached --check: passed.bun node_modules/typescript/bin/tsc --noEmit: did not complete within its finite 180-second cgroup deadline (terminated on timeout). Typecheck is unverified, not passing; the following chained structure command did not run, so structure was executed separately as reported above. No memory/CPU cap increase or unbounded retry.bun installexecutable was absent from the isolated PATH. No install executed. Existing local root/GUI dependencies were then linked; the green command above is the completed run.Each workload used fresh private HOME/CODEX_HOME/OPENCODEX_HOME/TMPDIR. Tests/typecheck used CPUQuota=75%, MemoryHigh=1280M, MemoryMax=1536M, MemorySwapMax=0, TasksMax=64, IOWeight=20, nice=10 and finite deadlines; the separate structure gate used the smaller 50%/384M/512M/32 envelope. Effective cgroup settings were checked before execution; workloads ran serially. Protected Codex/OpenCodex/Paseo files were unchanged.
Full backend/import-connected suite and docs build were not run: the large repository-wide workloads are disproportionate to this small projection under the user's strict shared-host limits, and typecheck already reached its bound. The six focused files cover the changed mapping, existing translation behavior and indirect layout/source-as-data gates. Native Windows/macOS and real Claude Code/ToolSearch round trips remain unverified. No local security/privacy scan was run under the user's explicit prohibition.
Keep Draft pending successful current-head typecheck/required hosted CI, documentation-build validation and independent review. Fixture success does not establish live model loop resolution, performance or a released fix.
Checklist
Review readiness checklist
Co-authored-by: rhomat27 8294456+rhomat27@users.noreply.github.com
Maintainer lane verification (sweep lane A, head c17f053)
claude-inbound.test.tsline: dev's layout.json is at 1999 lines and a 2000th line tripsfile-size ratchet: repository(NEW_OVERSIZED).src/responses/parser-content.ts, so adjacent markers fused intoTool loaded: ReadTool loaded: Write. Markers are now line-delimited, with a parser-level regression test; re-review PASS.bun test tests/claude-integration/claude-inbound-tool-reference.test.ts tests/claude-integration/claude-inbound.test.ts tests/claude-integration/claude-inbound-cache-stabilize.test.ts tests/test-layout.test.ts tests/test-layout-tooling.test.ts tests/ci-workflows/file-size-ratchet.test.ts: 141 pass / 0 fail.bun run typecheck: exit 0.bun run structure:check: passed.Summary by CodeRabbit