Repository navigation
Derive ACP's TOOLS_LIST from a shim-tool registry to stop the drift - #1559
Conversation
…loses #1509) TOOLS_LIST in acp/context_assembly.rs was a hand-written prose string advertising 5 nodespace_* tools to external PTY-spawned coding agents. It had no Rust source of truth and could silently drift from the 4 shim files in packages/skill/shims/* that actually implement these tools (each hand-written per agent's plugin format since they run as standalone scripts with no shared module resolution at runtime). Note: Tool::ALL (local_agent::tools) is a different, unrelated tool surface for the in-process llama.cpp agent — it uses different names and a different tool set entirely, so TOOLS_LIST can't be derived from it without advertising tools external agents can't actually call. Introduces a SHIM_TOOLS registry as the single Rust-side source of truth, generates TOOLS_LIST from it, and adds a test asserting SHIM_TOOLS matches packages/skill/shims/gemini/nodespace-tools.json (the one shim format that's machine-readable JSON) by name and description. Co-Authored-By: Claude <[email protected]>
Pragmatic Code Review — PR #1559SummaryThis PR fixes real prose/implementation drift in the ACP context-assembly tool list, but deviates from issue #1509's literal instructions after discovering the issue's premise was factually wrong: I independently verified:
FindingsCritical IssuesNone. Suggested Improvements
Nitpicks
Acceptance Criteria Assessment (issue #1509)
Given the issue's literal criteria were built on an incorrect premise, and the deviation was surfaced to and approved by the user rather than made unilaterally, I'm treating the corrected criteria as the ones that matter, and those are met. VerdictApprove. This is a real, well-scoped fix for genuine drift risk, backed by verification I could independently reproduce. The one item worth fixing before merge is cosmetic but easy: update the PR title to match the commit's actual headline/intent so the historical record isn't self-contradictory. The shim-parity gap (JSON-only verification) is worth a follow-up issue but is not a blocker — it's a known, disclosed limitation of an already-net-positive change, not a regression this PR introduces. |
|
Review verdict: Approve (posting as a comment since GitHub blocks self-review approval for this account — the PR author and reviewing token are the same GitHub identity). See the full review above for details. No blockers found; one cosmetic suggestion (PR title is stale) noted before merge. |
…mment Reviewer suggestion on PR #1559 — the mirroring claim in ShimTool::name's doc comment had no pointer to the test that partially enforces it. Filed #1560 to extend that test's coverage from the Gemini JSON manifest to all four shims; the two other review suggestions (SHIM_TOOLS as a second hand-maintained copy, tools_list()'s allocation pattern) were explicitly called out by the reviewer as out of scope / not requiring action. Co-Authored-By: Claude <[email protected]>
Address Review — Summary✅ Addressed:
⏭️ Skipped (explicitly called out by the reviewer as non-blocking / out of scope):
Tests: Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: The only changes since the reviewed commit are a PR title edit (not code) and a 3-line doc-comment addition with no logic change. No new functionality, no architectural changes, no risk introduced. The reviewer's verdict was already Approve with the title fix as the one pre-merge suggestion — that's now done. |
Closes #1509