Skip to content

Pull TurboWarp security and correctness fixes and the forkphorus test suite - #38

Merged
Mistium merged 18 commits into
developfrom
upstream-fixes
Nov 1, 2026
Merged

Mistium merged 18 commits into
developfrom
upstream-fixes

Conversation

@Mistium

@Mistium Mistium commented Nov 1, 2026

Copy link
Copy Markdown
Member

Stacked on #37.

The first batch of TurboWarp develop commits since our last common point (11 July): security fixes, correctness fixes, the forkphorus test suite and addAddonBlock argument defaults. Every commit keeps upstream's message and a cherry picked from line.

Upstream Result here
984b4f43 Always reject javascript: URLs in canEmbed applied
f26ff67e Fix some limited prototype pollution applied; its tests ported from node:test to tap
TurboWarp#401 Wait for custom fonts to load merged with MistWarp's skip of missing font assets; its test ported to tap
TurboWarp#382 Actually delete assets when unloaded MistWarp already had most of this. Adds disposing a sprite once its last clone goes
TurboWarp#399 Improve extension error handling ported. MistWarp's unsandboxed loader already catches runtime errors and already lets a failed extension load again, so only the sandboxed iframe path changes: it uses upstream's tw-load-script-element, which rejects as soon as the script throws
TurboWarp#400 Query extension permissions concurrently ported onto MistWarp's model, where a denied or failing extension is recorded and the project still opens. All of a project's custom extensions are now asked about at once
e9c6e122 Argument defaults in addAddonBlock applied; its test ported to tap
TurboWarp#303 Import most of the forkphorus test suite applied: 58 new execute fixtures, run both interpreted and compiled
TurboWarp#368, TurboWarp#369, TurboWarp#371, TurboWarp#373, TurboWarp#381, TurboWarp#383, TurboWarp#387 compiler fixes MistWarp already had these code changes. Where upstream's version conflicted (TurboWarp#369 iroptimizer.js, TurboWarp#371 jsgen.js), MistWarp's more precise version is kept, and upstream's fixtures and snapshots now run against it
TurboWarp#385 target hidden class fix already in MistWarp under a different hash, so skipped

Also in this batch

Checks

  • npx eslint src and the conventions check are clean.
  • Full tap suite: 10,534 assertions pass.
  • node test/snapshot: 216/216. test/integration/execute.js: 306/306, including the forkphorus fixtures.
  • Parity in Chromium: 2127/2143, with failing groups identical to develop.
  • Performance: geometric mean 100.9% of develop over 5 runs.

Still to come, as separate stacked PRs: compiler performance (TurboWarp#384, TurboWarp#391, TurboWarp#392, TurboWarp#389, with TurboWarp#395), the sampler API (TurboWarp#394), and moving tests to node:test (TurboWarp#393).

GarboMuffin and others added 18 commits November 1, 2026 06:47
…p#371)

They both should convert to 0
Fixes TurboWarp#359

(cherry picked from commit 32b5428)
fix TurboWarp#380

(cherry picked from commit 042235b)
Ported from TurboWarp ce39f14 (TurboWarp#399, Improve extension error handling). MistWarp's
unsandboxed loader already catches runtime errors by script name, and its failure path
already lets a failed extension load again, so only the sandboxed iframe path changes: it
now loads scripts through upstream's tw-load-script-element, which rejects as soon as the
script throws instead of leaving the load waiting.

(cherry picked from commit ce39f14)
Ported from TurboWarp 0cb82af (TurboWarp#400, Query security manager extension permissions
concurrently). MistWarp keeps its own loading model, where a denied or failing extension
is recorded and the project still opens, but now asks the security manager about all of a
project's custom extensions together, so it can combine them into one prompt, instead of
one after another. Also uses tap assertions in the canEmbed test from 984b4f4.

(cherry picked from commit 0cb82af)
forkphorus has its own test suite, most of which are regression tests for real bugs in a real compiler so it may be worth testing against.

forkphorus-befunge-eratosthenes and forkphorus-string-functions are probably the most meaningful new test cases; at the very least i wouldn't have needed a new test case in TurboWarp#300 to see changes in snapshots if they were merged

The tests also add coverage for specializations like "delete 1 of list" that somehow weren't in the suite before?

(cherry picked from commit 8ce06bc)
MistWarp code carries no comments, so the explanatory comments and JSDoc lines that came
with the TurboWarp ports are removed; tool directives stay.
Adds snapshots for the forkphorus fixtures and removes one for a fixture that does not
exist. No existing compiler output changes.
@Mistium
Mistium changed the base branch from vm-structure to develop November 1, 2026 06:48
@Mistium
Mistium merged commit 56f6d7e into develop Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants