Skip to content

fix(ai): agent mistakes are 4xx, plus EU embedder and embedding insert fixes - #2715

Merged
Makisuo merged 8 commits into
mainfrom
triage/ai-error-issues
Nov 16, 2026
Merged

Makisuo merged 8 commits into
mainfrom
triage/ai-error-issues

fix(query-engine): the 404 config rule no longer reads an echoed Reso…

da65986
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Nov 16, 2026 in 2m 31s

Confidence 10/10 · No issues found

🟢 Confidence 10/10 · safe to merge. The only hunk new since the last review is a narrow text-match removal, pinned by tests; the allow-list leans on code being a ClickHouse code, which I could not read outside this repo.
no findings · tests covered · risk medium

Caller SQL the warehouse refuses is now a 4xx, invented SHAs are confirmed before cloning, and sandbox/VCS caller mistakes export Ok spans; plus the EU embedder fix. The one hunk new since the last review (dropping the 404 rule's echoed Resource text) is safe to merge.

  • refusedStatement allows only statement-level ClickHouse types and codes as caller mistakes
  • resolveCheckout confirms an agent-supplied SHA before git clone runs
  • isAnticipatedMcpFailure exports sandbox, VCS and protocol caller mistakes as Ok
  • Embeddings bind as one float4[]; the EU turns the embedder off

Production impact

Open errors in the changed files (4)
Issue Service Occurrences File
@maple/backend/vcs/VcsSourceFileNotFoundError (2 issues) maple-chat 1.2k packages/backend/src/services/integrations/vcs/VcsSourceService.ts
@maple/mcp/errors/McpQueryError (6 issues) maple-chat 537 apps/ai/src/mcp/lib/source-errors.ts
@maple/backend/vcs/VcsSourceRepositoryNotFoundError maple-chat 132 packages/backend/src/services/integrations/vcs/VcsSourceService.ts
@maple/backend/vcs/VcsSourceRefNotFoundError maple-chat 66 packages/backend/src/services/integrations/vcs/VcsSourceService.ts

After this merges, Maple checks whether they stop.

Production traffic of the changed files (last 7 days)
File Calls/day Busiest operations
packages/backend/src/services/integrations/vcs/VcsSourceService.ts 31k VcsSourceService.resolveRepository 25k/day, 0.0% err
VcsSourceService.resolveRepository 6.0k/day, 0.0% err
VcsSourceService.resolveRepository 19/day, 0.7% err
What was checked
  • Resource 'x' not found without a ClickHouse identity is still WarehouseConfigError, claimed by the rule above the 404 one (errors.ts:271)
  • profiles is a Maple datasource (datasources.ts:3203), so the new config test exercises MAPLE_DATASOURCE_NAMES
  • No import cycle: nothing under packages/domain/src imports @maple/query-engine

da65986 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.