Skip to content

Commit 3eca623

Browse files
committed
test(mcp): the rank-maximum pin types its engine call
The engine call in the boundary pin passes a typed query and spells the symbol read option as a deliberate off-contract cast, so the query-options-erasure test surface stays at its ceiling (236). Claude-Session: https://claude.ai/code/session_01JQwxbWDsbbJizuYnDwBxT8 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8742938 commit 3eca623

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎packages/mcp/src/stdio-data-bridge.aggregate-order-cut.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,9 @@ describe('[aggregate order and cut] stdio — aggregate_records over the engine'
201201
// …and the engine refuses that rank, the driver never asked.
202202
const rank = Array.from({ length: AT + 1 }, (_, i) => `w${i}`);
203203
const err: any = await past.engine
204-
.aggregate(OBJECT, { groupBy: ['wide'], aggregations: [{ function: 'count', alias: 'n' }] } as any,
205-
{ [AGGREGATE_ORDER_CUT]: { orderBy: [{ field: 'wide', order: 'asc', rank }], limit: 5 } } as any)
204+
.aggregate(OBJECT, { groupBy: ['wide'], aggregations: [{ function: 'count', alias: 'n' }] },
205+
// The engine-internal read option rides on its symbol key, outside the declared options.
206+
{ [AGGREGATE_ORDER_CUT]: { orderBy: [{ field: 'wide', order: 'asc', rank }], limit: 5 } } as unknown as Parameters<ObjectQL['aggregate']>[2])
206207
.then(() => undefined, (e: unknown) => e);
207208
expect({ code: err?.code, status: err?.status }).toEqual({ code: 'INVALID_QUERY', status: 400 });
208209
expect(past.asts).toHaveLength(1);

0 commit comments

Comments
 (0)