From 5373e339afc4bb507070bcc6f216895864edad96 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 8 Sep 2026 14:54:17 +0200 Subject: [PATCH] Narrow the built-in profile lookup so the branch typechecks tsc has been red since 9ebf38b: builtInAppProfiles.repixelizer is Partial-typed, so passing it to isAllowedReturnOrigin and spreading it into an AppProfile literal both fail under exactOptionalPropertyTypes. Clean at 827cdee, red at 9ebf38b and after -- the earlier "pre-existing" reading was taken against a commit inside the same pass rather than against the last green one. Narrowed with a throw rather than a cast: a missing built-in should fail the suite loudly, not be asserted out of existence. tsc --noEmit -p tsconfig.json -> no output, exit 0 vitest run -> Tests 121 passed | 1 skipped (122) The one failing file remains tests/odin-publication.test.ts (Cannot find module 'cultcache-ts'), red on origin/main as well. Co-Authored-By: Claude Opus 5 --- tests/caller-identity-attack-soul.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/caller-identity-attack-soul.test.ts b/tests/caller-identity-attack-soul.test.ts index cf3f49a..9fb8e0a 100644 --- a/tests/caller-identity-attack-soul.test.ts +++ b/tests/caller-identity-attack-soul.test.ts @@ -275,6 +275,11 @@ describe("attempt-handle binding: the public start route may attach a completion describe("isAllowedReturnOrigin: origin comparison, not string matching", () => { const profile = builtInAppProfiles.repixelizer; + // Narrow rather than cast: the lookup is Partial-typed, and a missing + // built-in should fail this suite loudly instead of being asserted away. + if (!profile) { + throw new Error("built-in repixelizer profile is missing"); + } const rejected = [ "https://repixelizer.gamecult.org.evil.com/", "https://evil.com/?x=https://repixelizer.gamecult.org",