Repository navigation
Conversation
An unknown key was reported as a Note below the scope line, suggested only start_time for time_range, and never said the result ignored it. Ignored keys are now a Warning directly under the title that says the result is for the call without the key, and a window key points at both start_time/end_time.
Maple review🔴 Confidence 4/10 · risky as written Moves ignored-argument reports from
Findings🔴 Critical · F1 ·
|
| Issue | Service | Occurrences | File |
|---|---|---|---|
| @maple/api/vcs/VcsSourceRepositoryNotFoundError | maple-ai | 68 | apps/ai/src/mcp/tools/registry.ts |
| @maple/mcp/errors/McpQueryError | maple-chat | 42 | apps/ai/src/mcp/tools/registry.ts |
| @maple/mcp/errors/McpQueryError | maple-chat | 36 | apps/ai/src/mcp/tools/registry.ts |
| @maple/mcp/errors/McpQueryError | maple-ai | 18 | apps/ai/src/mcp/tools/registry.ts |
| @maple/api/vcs/GithubAppError | maple-chat | 14 | apps/ai/src/mcp/tools/registry.ts |
| @maple/http/errors/IntegrationsUpstreamError | maple-chat | 14 | apps/ai/src/mcp/tools/registry.ts |
| @maple/http/errors/IntegrationsUpstreamError | maple-chat | 11 | apps/ai/src/mcp/tools/registry.ts |
| @maple/mcp/errors/McpQueryError | maple-ai | 9 | apps/ai/src/mcp/tools/registry.ts |
| @maple/mcp/errors/McpQueryError | maple-ai | 9 | apps/ai/src/mcp/tools/registry.ts |
| @maple/mcp/errors/McpQueryError | maple-chat | 8 | apps/ai/src/mcp/tools/registry.ts |
After this merges, Maple checks whether they stop.
What was checked
- Window suggestion is gated on the tool actually declaring both bounds (
decode-issues.ts:101) - Single-bound keys still fall back to
suggestParameter(decode-issues.ts:104) - No other consumer of
NormalizedArguments.unknownreads the oldsuggestionfield
162a1d9 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 43 minutes. View limit details
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 |
| * Warnings for the result text, one per ignored key. The call still ran, so each says the result | ||
| * is for the call without that key: a model that sent `time_range` otherwise reads a default window. | ||
| */ | ||
| export const argumentWarnings = (normalized: NormalizedArguments, tool: string): ReadonlyArray<string> => |
There was a problem hiding this comment.
Caution
argumentNotices rename leaves pr-review-local.ts importing a missing export
F1 · Critical · correctness
argumentNotices is gone from this module, but apps/ai/scripts/pr-review-local.ts:61 still does import { normalizeArguments, argumentNotices } from "@/mcp/lib/decode-issues" and calls it at line 769, so the local PR-review runner fails at import. apps/ai/src/chat/pr-review-replay.test.ts imports makeExecutor from that script, so bun run test in @maple/ai (vitest include: ["src/**/*.test.ts"]) fails too. This slipped CI because apps/ai/tsconfig.json includes only src/** and excludes *.test.ts.
Update both references to `argumentWarnings` in `apps/ai/scripts/pr-review-local.ts` (the import on line 61 and the call on line 769).
🤖 Prompt to fix with an AI agent
In `apps/ai/src/mcp/lib/decode-issues.ts:171-175`: `argumentNotices` rename leaves `pr-review-local.ts` importing a missing export.
`argumentNotices` is gone from this module, but `apps/ai/scripts/pr-review-local.ts:61` still does `import { normalizeArguments, argumentNotices } from "@/mcp/lib/decode-issues"` and calls it at line 769, so the local PR-review runner fails at import. `apps/ai/src/chat/pr-review-replay.test.ts` imports `makeExecutor` from that script, so `bun run test` in `@maple/ai` (vitest `include: ["src/**/*.test.ts"]`) fails too. This slipped CI because `apps/ai/tsconfig.json` includes only `src/**` and excludes `*.test.ts`.
Suggested fix: Update both references to `argumentWarnings` in `apps/ai/scripts/pr-review-local.ts` (the import on line 61 and the call on line 769).
Verify the problem exists at that location before changing it, and keep the fix to those lines.
Problem
An agent called
list_serviceswith{"time_range":"today"}. The tool takesstart_time/end_time(default 6 hours), so the key was dropped and the default window ran. The registry did report it, but the report was easy to miss and half-wrong:Note:alongside informational notes (clamped windows).time_rangenames a whole window, but the edit-distance match suggested onlystart_time.Change
ToolDocgainswarnings, rendered directly under the title asWarning:lines. The registry puts ignored-argument reports there for every tool;noticesstays for informational notes.time_range,lookback,period,since, ...) on a tool that takes both bounds suggestsstart_time/end_time. A single-bound key (start) still suggests the one bound. The decode-failure message uses the same suggestions.Now:
Not done: a
time_rangealias onP.timeWindowAliases rename a key and keep the value, so
time_range: "today"would land instart_timeand fail to decode as a timestamp.time_rangewas never a parameter name for these tools, so it is not a retired name. It already means something else oncreate_dashboard(the dashboard's saved relative range). Accepting relative windows would be a new parameter, not an alias, so it does not fit "one spelling per concept".Tests
decode-issues.test.ts: window keys suggest both bounds, single bounds stay single, no window suggestion on tools without one, warning text.tool-doc.test.ts: warnings render before scope, notices after.tool-contract.test.ts:list_serviceswithtime_rangesucceeds and the warning is the first thing under the title.Ran those three plus
registry.contract.test.tsand@maple/aitypecheck. The full suite and repo-wide typecheck were not run.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.