Skip to content

Commit 95a3f67

Browse files
committed
test(tools): keep wait.priority bytes when it is the only field
A combined payload re-stringifies ignored number fields, so an isolated priority:2.0 case is the actual guard that wait did not absorb it.
1 parent dfb62f9 commit 95a3f67

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎tests/tool-argument-integers.test.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,12 @@ describe("native u64 fields advertised as number (#2316)", () => {
341341
schema,
342342
"wait",
343343
)).toBe('{"yield_time_ms":20000,"max_tokens":5000,"priority":2}');
344+
const priorityOnly = '{"priority":2.0}';
345+
expect(coerceIntegerToolArguments(
346+
priorityOnly,
347+
schema,
348+
"wait",
349+
)).toBe(priorityOnly);
344350
const other = {
345351
type: "object",
346352
properties: { yield_time_ms: { type: "number" }, priority: { type: "number" } },

0 commit comments

Comments
 (0)