Some checks failed
The previous revision allowed vi.mock for virtual modules on the "consumer import is static" argument. #553 proved that argument wrong: a statically- imported module with an async factory body whose dynamic import landed after teardown still produced the race. The factory body — not the consumer — is the failure surface. - Drop the "residual exceptions" table. - Add the binding invariant: factory bodies under `**/*.svelte.{test,spec}.ts` must be synchronous (no `await`, no `import(...)`). - Document the canonical vi.hoisted + getter pattern, with file references. - Record the $app/stores → $app/state architectural call (Markus's recommendation), removing one of the last two deprecated-import outliers. - Record the preload-data=off hardening (Tobias's recommendation) as a pattern note. - Update the Enforcement section to list all four defence layers (ESLint, CI grep, in-suite meta-test, CI birpc assert) and the coverage-flake- probe verification workflow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>