Skip to content

Commit e2aa5ec

Browse files
committed
test(service-messaging): the stage-1 pin's matcher refuses a combinator inside its callback
Claude-Session: https://claude.ai/code/session_01WMQprn46CND82KmY8sZWBu Co-authored-by: Claude <noreply@anthropic.com>
1 parent db67da7 commit e2aa5ec

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎packages/services/service-messaging/src/system-context.pin.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ describe('[#21913] the emit fan-out carries the explicit system opt-in', () => {
180180

181181
/** Plain-equality `where` over seeded rows — anything else is refused, loudly. */
182182
function matchRows(rows: Array<Record<string, unknown>>, where: Record<string, unknown> = {}) {
183-
for (const k of Object.keys(where)) {
183+
return rows.filter((r) => Object.entries(where).every(([k, v]) => {
184184
if (k.startsWith('$')) throw new Error(`recording engine: unimplemented combinator ${k}`);
185-
}
186-
return rows.filter((r) => Object.entries(where).every(([k, v]) => (r[k] ?? null) === (v ?? null)));
185+
return (r[k] ?? null) === (v ?? null);
186+
}));
187187
}
188188

189189
const USER_SCOPED = new Set(['sys_inbox_message', 'sys_notification_receipt']);

0 commit comments

Comments
 (0)