Narrow the built-in profile lookup so the branch typechecks
tsc has been red since9ebf38b: builtInAppProfiles.repixelizer is Partial-typed, so passing it to isAllowedReturnOrigin and spreading it into an AppProfile literal both fail under exactOptionalPropertyTypes. Clean at827cdee, red at9ebf38band 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 <noreply@anthropic.com>
This commit is contained in:
parent
8476c0290b
commit
5373e339af
1 changed files with 5 additions and 0 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue