Skip to content

Commit e8c0e99

Browse files
committed
test(runtime): the admission-record table double refuses the operators it does not implement
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5pERdWox6UVMyKRjPq
1 parent 327f91d commit e8c0e99

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎packages/runtime/src/security/resolve-execution-context.test.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,11 @@ describe('[#31211] a verified MCP token is recorded as used only once this door
976976
async find(object: string, opts: any) {
977977
if (object === faultOn) throw new Error('connection reset by peer');
978978
return bounded((tables[object] ?? []).filter((row) =>
979-
Object.entries(opts?.where ?? {}).every(([k, v]) => row[k] === v),
979+
Object.entries(opts?.where ?? {}).every(([k, v]) => {
980+
if (k.startsWith('$')) throw new Error(`fake driver: unsupported operator ${k}`);
981+
if (v !== null && typeof v === 'object') throw new Error(`fake driver: unsupported operator on '${k}'`);
982+
return row[k] === v;
983+
}),
980984
), opts);
981985
},
982986
};

0 commit comments

Comments
 (0)