Skip to content

fix(api): give the error-samples payload mock its cutAttributeBytes - #1171

Merged
JeremyFunk merged 1 commit into
mainfrom
fix/ai-sessions-error-samples-test
Sep 30, 2026
Merged

JeremyFunk merged 1 commit into
mainfrom
fix/ai-sessions-error-samples-test

fix(api): give the error-samples payload mock its cutAttributeBytes

6eecaf0
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Sep 30, 2026 in 34s

Confidence 5/5 · No issues found

🟢 Confidence 5/5 · safe to merge
Test-only fixture fix; the schema requirement and the fallback byte counts both check out against the assertions in the same test.
quality 100/100 · no findings · tests covered · risk low

Adds the missing cutAttributeBytes field to the error-samples payload mock in ai-sessions.http.test.ts, restoring the row decode that the new schema requires. One-line test-fixture fix, safe to merge.

  • ai-sessions.http.test.ts payload mock row now carries cutAttributeBytes: {}
What was checked
  • aiToolErrorPayloadsRowSchema requires cutAttributeBytes (query-engine-integrations/src/ai/ai-tools.ts:964), so the mock previously failed decode
  • With {}, aiToolErrorPayload falls back to utf8.encode(text).length, which matches the asserted argumentsBytes: 2 and resultBytes at test lines 1710-1712
  • Other tests in the file decode no payload rows (only occurrences rows or []), so no second mock is missing the field

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