Two more catalogue invariants in contracts.test.ts, locking in audit fixes:
- VG-8: every component morfo must be declared `as const satisfies Morfo`,
never `: Morfo` (the annotation widens the literal so the schema can't check
it — how alert-dialog-001 shipped). Green; proven to catch drift (annotating
toggle as `: Morfo` makes it fail).
- A31: a per-item membership predicate (`isSelected` / `isItemPressed` / …) must
not do `.current.includes(...)` — that is O(N²) per render. Lift a Set, use
`.has()`.
The A31 guard immediately surfaced a real violation the human audit missed:
`toolbar-provider` ToolbarGroupProvider.isItemPressed did
`this.opts.value.current.includes(value)`, called from the per-item `isPressed`
$derived — the exact O(N²) pattern, in a component not on the audit's 9-item
A31 list. Fixed with the same lift (`pressedSet` + `.has()`). That catch IS the
guard's proof.
Both guards exclude the active-dev-track set so they stay green for the
maintained catalogue. check: 0 new type errors; toolbar provider tests 3/3.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>