Skip to content

fix(ai): give the get_agent_tool_error payload fixture its cutAttributeBytes - #1172

Merged
JeremyFunk merged 1 commit into
mainfrom
fix/agent-tools-payload-mock
Sep 30, 2026
Merged

JeremyFunk merged 1 commit into
mainfrom
fix/agent-tools-payload-mock

Conversation

@JeremyFunk

@JeremyFunk JeremyFunk commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Remaining red on main after #1171: Tests (small-2) → @maple/ai agent-tools.test.ts (6 failures, "Compiled query row 0 did not match its declared output schema").


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

…teBytes

Same gap as #1171 in apps/ai: #1148 made cutAttributeBytes a required column of the payload row; the fixture lacked it, so every get_agent_tool_error test failed row decode.
@maple-review-bot

maple-review-bot Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Maple review

🟢 Confidence 5/5 · safe to merge
quality 100/100 · no findings · tests not needed · risk low

Adds the now-required cutAttributeBytes: {} to the payload() fixture in agent-tools.test.ts, restoring the @maple/ai suite after aiToolErrorPayloadsRowSchema gained that column. Test-only, safe to merge.

  • payload() fixture in agent-tools.test.ts now carries cutAttributeBytes: {}
What was checked
  • aiToolErrorPayloadsRowSchema requires cutAttributeBytes: Schema.Record(String, CHNumber) (packages/query-engine-integrations/src/ai/ai-tools.ts:964), so {} decodes
  • aiToolErrorPayload falls back to utf8 length when no key matches (ai-tools.ts:1064), so the 12,000 bytes total and argumentsBytes assertions still hold
  • Fixture rows feed the fake warehouse only; no production code path is touched

cbfad3e · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 62b6d184-f879-47ca-a307-0517bda20b75

📥 Commits

Reviewing files that changed from the base of the PR and between ad9a063 and cbfad3e.

📒 Files selected for processing (1)
  • apps/ai/src/mcp/tools/__tests__/agent-tools.test.ts
 _____________________________
< Reviewing code like a boss. >
 -----------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JeremyFunk
JeremyFunk merged commit 7e0d42f into main Sep 30, 2026
36 of 37 checks passed
@JeremyFunk
JeremyFunk deleted the fix/agent-tools-payload-mock branch September 30, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant