Repository navigation
Description
Problem
routeForTool in bin/codedb-bridge.mjs rejects only a hand-named set of arguments (project on every tool; regex/scope/compact on search/outline). Any other argument key — including a typo of a supported one — is silently dropped on every tool, which breaks the module's own stated contract (header comment, citing #3352): "arguments the daemon cannot honour are rejected by name, never silently ignored."
The advertised inputSchema for each tool lists an exact property set, but nothing enforces it: a caller that sends max_result (typo), case_sensitive: true, a path filter on search, depth on tree/deps, or since on hot gets a successful result computed without that argument — the worst silent-third-path shape, because the caller believes the argument took effect.
Evidence (main a0e6d1d3, file md5 df5e54371d04828465c680e9e96727d3, identical on sandbox clone and laptop clone)
routeForTool(codedb-bridge.mjs:155-194): the only rejection helpers arerejectProjectandrejectTrue(key)for named keys; there is no allowlist check against the tool's schema properties. Unknown keys are never inspected.sliceData(codedb-bridge.mjs:196-203) only ever readsmax_results/limitfrom the mapped slice — a typo'd key never reaches it, so no error is possible downstream.
Verified this run on the laptop (probe ~/git/fleet/probe-2026-11-01-laneB-bridgeargs/, verbatim bridge module @a0e6d1d3) — every one of these was ACCEPTED with the extra argument silently dropped:
codedb_search {query, max_result: 5}(typo) → route/explore/search?q=x, no slicecodedb_search {query, case_sensitive: true}→ accepted, plain substring routecodedb_search {query, path: "src/"}→ accepted, no path filter appliedcodedb_tree {depth: 2}andcodedb_tree {max_results: 3}→ accepted (tree's schema has no properties)codedb_hot {since: "2026-01-01"}→ acceptedcodedb_outline {path, max_results: 2},codedb_deps {path, depth: 1},codedb_symbol {name, limit: 5}→ accepted
End-to-end through createHandler with a stub daemon returning 5 results: codedb_search {query: "x", max_result: 2} returned all 5 results, isError unset — the caller's limit silently never happened.
Controls: the named rejections do fire — codedb_search {regex: true} and codedb_tree {project} both throw by name, confirming the gap is specifically the never-named keys.
Distinct from
- Issue codedb-bridge: regex/scope/compact are rejected only on codedb_search and codedb_outline — silently ignored on codedb_word, codedb_symbol, codedb_hot, codedb_tree and codedb_deps (and limit/max_results are silent no-ops on the wrong tool) #4197: the named codedb options (
regex/scope/compact,limit/max_results) being silently ignored on the wrong tools. This issue is the remaining general case: keys that are in no tool's schema (typos and invented options) are silently dropped on every tool, including codedb_search and codedb_tree, the tools codedb-bridge: regex/scope/compact are rejected only on codedb_search and codedb_outline — silently ignored on codedb_word, codedb_symbol, codedb_hot, codedb_tree and codedb_deps (and limit/max_results are silent no-ops on the wrong tool) #4197 treats as reference-correct for their named arguments. A per-tool key allowlist closes both, but codedb-bridge: regex/scope/compact are rejected only on codedb_search and codedb_outline — silently ignored on codedb_word, codedb_symbol, codedb_hot, codedb_tree and codedb_deps (and limit/max_results are silent no-ops on the wrong tool) #4197's fix as scoped (extend the named rejections per tool) does not. - Issue codedb-bridge: daemon fetch has no timeout — a hung daemon hangs the call forever and blocks bridge exit on stdin close #4191 (no daemon fetch timeout) and issue codedb-bridge: parseDaemonUrl silently drops query, fragment and userinfo — CODEDB_DAEMON_URL validation rejects paths but strips the rest instead of failing fast #4198 (daemon URL validation, fixed) — unrelated seams of the same file.
Why it matters
The bridge is the shared per-session front door to codedb for every MCP client in the fleet (#4120). MCP clients — including LLM callers — routinely invent or mistype arguments; today each such call silently returns an unfiltered/unlimited result set instead of an error naming the argument, so the caller reasons from data it believes was filtered or bounded. That is exactly the failure the bridge's #3352 contract was written to prevent, and the named-argument rejections already in the file show the intended behaviour — the allowlist is simply missing.
Acceptance criteria
-
routeForToolrejects, by name, any argument key outside the called tool's accepted set (its advertisedinputSchemaproperties plus the explicitly handled rejection keysproject/regex/scope/compactwhere they apply, andbodyon codedb_symbol), with an error in the existing style naming the argument and the tool. - A typo'd argument (
max_resulton codedb_search,limiton codedb_symbol, any key on codedb_tree) produces anisErrortool result naming the key — verified end-to-end throughcreateHandler, not only atrouteForTool. - All currently accepted valid calls behave identically: the existing
bin/codedb-bridge.test.mjscases pass unchanged, and the named Design: unknown means stop — one strict argument contract for the repo's operator scripts #3352 rejections keep their current messages. - New tests in
bin/codedb-bridge.test.mjspin the allowlist for every advertised tool (at least one never-named key per tool, plus the search typo case end-to-end).
Activity
dezren39 commentedon Nov 2, 2026
🤖 Agent note · filed
34 remaining items
dezren39 commentedon Nov 2, 2026
agent-note:v1
event: parked
task: 6381 (repo-health-code-pilot, repo-worker-code; OpenChamber scheduled lane ec118cad-0fd3-4652-91c4-27432f2f2efd)
state: parked for 20 minutes; queue resume no earlier than 2026-11-02T22:02:16Z.
fresh_evidence: #4216 OPEN; bound PR #4563 OPEN, authored by dezren39 (Drew); basic OpenCode metered-provider guard check QUEUED. No diff or files inspected.
resume: after the park window, re-read PR state and checks fresh; do not inspect or merge while the Drew-owned restriction remains.
labels: queue/parked, status/parked, work/assigned.
dezren39 commentedon Nov 2, 2026
agent-note:v1
event: picked_up
task: 6381 (repo-health-code-pilot, repo-worker-code; OpenChamber scheduled lane ec118cad-0fd3-4652-91c4-27432f2f2efd)
state: claimed via atomic queue claim; first checkpoint records origin=openchamber-scheduled-lane.
fresh_evidence: #4216 OPEN; bound PR #4563 OPEN, branch queue/6381-4216-bridge-arg-allowlist @ 2c02d33, authored by dezren39 (Drew); basic OpenCode metered-provider guard now PASS (was QUEUED), CodeRabbit skipping. No PR diff/files inspected.
next: escalate — merge decision is Drew-only on a Drew-owned PR.
agent-note:v1
event: blocked (escalated-to-user)
task: 6381 (repo-health-code-pilot, repo-worker-code; OpenChamber scheduled lane ec118cad-0fd3-4652-91c4-27432f2f2efd)
state: blocked; claim released. PR #4563 is Drew-authored so the worker must never touch or merge it (runbook non-negotiable). Work itself is ready: targeted bridge tests 11/11 pass at 2c02d33, CI green.
fresh_evidence: gh pr checks 4563 — basic guard PASS 7s; mergeStateStatus UNKNOWN; PR still OPEN.
resume: Drew merges #4563 (closes #4216); a later lane then completes 6381 as fixed_merged with fresh verification.
labels: queue/blocked, status/blocked, user/escalated; removed queue/parked, status/parked, work/assigned.
Merge pull request #4563 from developing-today/queue/6381-4216-bridge…
dezren39 commentedon Nov 10, 2026
state: done
task: 14745
lane: code-v
kind: pr_shepherd
Done - PR #4563 MERGED as 7faa795 (batch issue #7297, part 4), and issue #4216 is CLOSED via the PR. The bridge now rejects any argument in no tool's schema by name (general allowlist: schema properties + handled rejection keys), instead of silently dropping typos like max_result.
Shepherd work: merged current origin/main into the PR branch (clean), verified on the merged tree - node --test bin/codedb-bridge.test.mjs: 19 pass, 0 fail. Confirmed beforehand that main had NOT superseded the PR (main rejects only specific known keys from #3352/#4197; arbitrary unknown keys were still dropped). The stale user/escalated on #4216 (2026-11-02, authorship-based premise revoked by Drew 2026-11-07; PR #4563 itself unlabeled, no hard-stop labels) was dispositioned in the pickup note on PR #4563. Codex had no substantive findings (its review of the new head was still running at merge time with none reported). Task 14745 completes as fixed_merged; issue #7297 stays open for its remaining parts.