Skip to content

Commit fa8321b

Browse files
committed
test(pm): pin the FRAMES half on two sibling bags at the same indent
The lift-into-a-sibling and indent-only shapes both differ in indentation, so neither pinned the frameset comparison on its own. This git-emitted pair puts the removal and the new bag at the same indent inside different parents, so the frames the hunk shows open are the only evidence that tells them apart. Claude-Session: https://claude.ai/code/session_01AmH9bKvGoLjiY86Q4Z3og2 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 027cba0 commit fa8321b

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

‎scripts/pm/check-widening-tells.mjs‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,7 @@ const SELF_TEST_BATTERIES = Object.freeze({
14401440
'#18640 — an inline closed set RE-SPELLED at the same binding is not a set that gained a value': 20,
14411441
'#18702 — a declaring factory PRIVATE to one file, resolved through its own DEFINITION': 54,
14421442
"#18721 — a hunk's LEADING CONTEXT is not a reason to abandon the parameter reading": 14,
1443-
'#19099 — a member BOUNDED inside a bag the block re-declared out of a universal acceptor': 52,
1443+
'#19099 — a member BOUNDED inside a bag the block re-declared out of a universal acceptor': 53,
14441444
});
14451445

14461446
// DELETING an entry silences that battery's floor exactly as effectively as
@@ -5456,6 +5456,23 @@ export function selfTest() {
54565456
'+ }),',
54575457
' });',
54585458
).length === 1);
5459+
t('⭐ FRAMES ALONE — two sibling bags put the removal and the new bag at the SAME indent, and only the frames the hunk shows open tell them apart: a `filter` removed from `meta` does not certify a `filter` bag declared inside `other`', pathTells(
5460+
'@@ -3,9 +3,11 @@ import { z } from \'zod\';',
5461+
' export const ThingSchema = z.object({',
5462+
' meta: z.object({',
5463+
' a: z.number(),',
5464+
'- filter: z.unknown(),',
5465+
'- }).optional(),',
5466+
'- other: z.object({',
5467+
'+ }),',
5468+
'+ other: strictObject({',
5469+
'+ filter: strictObject({',
5470+
'+ newKey: z.string(),',
5471+
'+ }),',
5472+
' keep: z.number(),',
5473+
' }),',
5474+
' });',
5475+
).length === 1);
54595476
t('⭐ INDENT ALONE — a hunk that shows no enclosing opener at all leaves the two lines’ INDENT as the only nesting evidence, and a key removed one level deeper does not certify a bag re-declared at the top', pathTells(
54605477
'@@ -5,6 +5,8 @@ export const ThingSchema = z.object({',
54615478
' a: z.number(),',

0 commit comments

Comments
 (0)