Skip to content

Commit 335cae7

Browse files
committed
test(rest): the masked-only picker pin proves the engine's refusal is object admission, not the field guard
Under the field guard alone the masked-only picker was refused with the same code and status, so the re-pinned case stayed green with the deny baseline put back. It now also asks the engine for a query keyed on a field the caller may query on, which only object admission refuses. Claude-Session: https://claude.ai/code/session_01DiCSbmJrkzNhuEAier4VoJ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4d2b191 commit 335cae7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎packages/rest/src/public-form-lookup-picker-queryable-key.test.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,11 @@ describe('[#21062] a picker whose first display field is masked for its caller
341341
it('[#21079] a picker with no queryable display field answers 403 PERMISSION_DENIED, as the engine does, and the engine is never asked', async () => {
342342
const reference = await engineRefusal(h.engine, PICKERS.c_only.displayFields);
343343
expect(reference).toMatchObject({ status: 403, code: 'PERMISSION_DENIED' });
344+
// The engine's refusal for this caller is object admission, not the
345+
// field guard: a query keyed on a field it MAY query on is refused the
346+
// same. (Under the field guard alone that query was served.)
347+
expect(await engineRefusal(h.engine, PICKERS.c_control.displayFields.slice(0, 1)))
348+
.toMatchObject({ status: 403, code: 'PERMISSION_DENIED' });
344349
const before = h.finds().length;
345350
for (const q of [undefined, 'A']) {
346351
const res = await h.lookup('c_only', q);

0 commit comments

Comments
 (0)