Skip to content

Commit 4fb225c

Browse files
committed
test(cli): state both failure modes in the table-row message, not only the open one
A strict schema refuses the row's key by name; an open one takes the object, strips the key and reports success. The message named only the second, so the verdict read wrong on the eight strict entries. Claude-Session: https://claude.ai/code/session_01DvvamiacK328idtBYJBxV3 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 87d2a43 commit 4fb225c

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎packages/cli/test/commands.test.ts‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -566,10 +566,12 @@ describe('os explain — every catalog entry swept against its spec schema (#148
566566
expect(
567567
offenders,
568568
`os explain ${key}: table row(s) name key(s) ${bound.schema} does NOT declare `
569-
+ `(judged by the ${technique} technique). An author who copies such a row gets a `
570-
+ 'parse that succeeds and a value with that key gone — no error, no warning, and '
571-
+ 'a query that runs unfiltered. Correct the ROW to the schema\'s own spelling '
572-
+ '(⛔ do not relax the schema to accept it).',
569+
+ `(judged by the ${technique} technique). An author who copies such a row gets `
570+
+ 'one of two bad outcomes: a strict schema REFUSES the whole object by name, and '
571+
+ 'an OPEN one takes it, strips the key and reports success. The second is the trap '
572+
+ '`os explain query` shipped — a copied row, a silently stripped key, and a query '
573+
+ 'that ran unfiltered under an ordinary success. Correct the ROW to the schema\'s '
574+
+ 'own spelling (⛔ do not relax the schema to accept it).',
573575
).toEqual([]);
574576
});
575577
}

0 commit comments

Comments
 (0)