Fix instance lookups that trusted stale data

Two regressions from the template-resolution rework, plus the harness gap
that hid them:

- `instanceTargetOf` decided from the shape of the id. Unpacking keeps the
  derived ids, so unpacked content still counted as template content. It now
  asks whether the object is spelled out in the holder.
- The parent picker captured its holder when the row was built. Since
  `viewOf()` returns a derived copy, the menu listed the objects of that
  moment (measured: 40 in the model, 17 in the menu). It resolves on open.
- `evaluate()` swallowed page exceptions, so a mutate that died half-way let
  every later check pass or fail for the wrong reason.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5 committed 2026-09-08 21:59:22 +02:00
1 parent ead649eec3
commit f40b8a0523
5 files changed
+45 -6

No files matched your search

+12
View File
@@ -393,6 +393,18 @@ export async function containers(t) {
);
await setTemplate(`tpl.position.x = -135`);
await selectObject(redC);
// Unpacking keeps the derived ids, so an id that merely *looks* like content of a template must
// not freeze the picker any more – the inspector has to read the holder, not the id.
const unpackedParentRow = await locate('Parent');
await click(unpackedParentRow.x + 55, unpackedParentRow.y);
await sleep(150);
check(
'unpacked content offers the Parent picker like any ordinary object',
(await json('__gm.overlayTexts()')).includes('None'),
JSON.stringify(await json('__gm.overlayTexts()')),
);
await press('Escape');
await sleep(100);
noticeAfter = await notice();
const redCRow = await rowAt(redC);
await click(redCRow.x, redCRow.y, 'right');