Skip to content

Commit 1ad5a00

Browse files
committed
test(metadata-protocol): the served-content-hash pin's where-matcher refuses combinators it does not implement (#21207)
Claude-Session: https://claude.ai/code/session_01VvcEokUG1tvVxkceYfR5XB Co-authored-by: Claude <noreply@anthropic.com>
1 parent 978def3 commit 1ad5a00

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎packages/metadata-protocol/src/protocol.served-content-hash.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ function matchesWhere(r: Record<string, unknown>, where: Record<string, unknown>
7171
if (!(v as Array<Record<string, unknown>>).some((c) => matchesWhere(r, c))) return false;
7272
continue;
7373
}
74+
// Any other combinator is REFUSED, never read as a field name.
75+
if (k.startsWith('$')) throw new Error(`stub engine: combinator '${k}' is not implemented`);
7476
if (v === undefined) continue;
7577
if (r[k] !== v) return false;
7678
}

0 commit comments

Comments
 (0)