Delete the ported TypeScript under src/noise/ (#227) - #366
Merged
Conversation
Phase 7's deletion. The app has rendered from WASM since #362, so the TypeScript math under `src/noise/` has no live caller left. This removes it and rewires the twelve specs that were still reading it. 42 source files go, not the 43 in `deadlist.txt`: `src/noise/resources/vulcanusResourceCatalog.ts` stays and is trimmed in place, 223 lines to 113. Its two math functions (`makeVulcanusOreFootprint`, `sulfuricAcidGeyserProbability`), the placement threshold and the three closure-valued fields are all owned by Rust now; what is left is the order and the map colours, which `wasmVulcanusRenderParity` grades the engine's pixels against. #227's done-when is that `src/noise/` holds orchestration and catalogs only, and that file is now a catalog. It has no imports at all. `src/noise/preview/elevationRenderRequest.ts` loses its TypeScript fallback arms, 309 lines out and 97 in. The four views that used to fall through to plain TypeScript terrain were normalised onto their planet's terrain code in #362, and the error path and the `startingLakePositions` guard landed in #365, so nothing reaches the fallback any more. ## The parity specs are converted, not deleted `tier2Frozen.ts` and `tier3Frozen.ts` were built in #345 and #360 for exactly this step: `expectFrozen` takes its reference arm as an optional last argument, so a spec whose TypeScript is gone drops that argument and keeps grading the engine against a value captured while the two ports demonstrably agreed. Deleting the specs instead would take the port's arithmetic out of `wasm32-unknown-unknown` altogether, which is the one thing `cargo test` cannot cover and the reason the freeze exists. Tier 2: 68 of Vulcanus's 74 fields keep both arms, and the six whose reference implementation went (`geyserProbability`, `cliffinessBasic`, `decorativeKnockout`, `rockHuge`, `rockBig`, `rockDensity`) drop to frozen-only. `NO_TS_ARM` names them and a new test asserts the list matches what `tsFields` actually withholds, so a seventh field losing its arm fails rather than downgrades quietly. Nauvis loses its arm entirely - its whole expression core was in the dead set. Tier 3 needed the same treatment and the notes had cleared it. Those specs have no dead-set imports, which is what was checked; they get their reference arm by calling `runRenderRequest(req)` with the engine argument left off, which the rewrite above now refuses. That was 76 failing tests across seven files, and `tier3Frozen.ts` had written down the trap in advance: after the deletion the no-engine call "is not a weaker arm, it is the SAME arm - so the comparison would pass while grading nothing". `test/tiledEquality.spec.ts` is the one that changes character rather than shrinking. It passed no engine at all, so it graded the TypeScript renderers and could not see the WASM gate; it now runs every render through the engine, which closes a gap the #227 notes had already identified. ## Anti-vacuity guards were re-based, not dropped, wherever the claim survived Vulcanus's slider guard (still 50 of 74 fields) and window guard (still all 74) now read the engine; the counts are unchanged because every field with both arms is pinned to the same frozen value. The off-grid sweep's "these really are different points" check moved the same way. The routing tests in both render specs became the sharper statement they always stood in for: with no fallback left, a view that reaches the engine is exactly a view that REFUSES to render without one. Two of those rewrites failed on the first run, and both were findings rather than test bugs. Recorded where they were measured: - `checksum_pow` takes its exponent as an `f32`, so the 2.0000001 that used to prove the dispatcher leaves the squaring branch narrows to exactly 2. The perturbation is now one f32 ULP, asserted to survive the boundary. - `checksum_distance_from_nearest_point` folds `f64::from(distance_from_nearest_point(...))`, and that function returns an `f32`, so an f64 ULP on the cap comes back as the same number. Three tests flipped because they said in their own comments that they should. `viewNormalisation`'s last block was labelled "the arm #227 deletes"; `elevationRenderRequest.spec`'s KNOWN HOLE row asked to "flip to asserting the refusal" if `runRenderRequest` ever refused a Nauvis-only view on another planet, which is what the rewrite does; and `wasmNauvisRenderParity`'s ABI-cap row said it "belongs to the carve-out, and the #227 deletion removes both together". The cap is now a refusal, with a companion case at eight points so the refusal is about the list's length rather than its presence. Seven Nauvis tier-2 guards could not be re-based: each counts how many swept positions satisfy a predicate, and the export returns an order-sensitive fold that cannot be decomposed back into counts. They are deleted here and their frozen numbers recorded in a follow-up issue, so restoring them behind a predicate-counting export re-measures rather than re-derives.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 7's deletion, and the last of the four PRs on #227. The app has rendered from WASM since #362, so the TypeScript math under
src/noise/has no live caller left.57 files, -8,884 / +758. Full
pnpm run verifygreen locally:VERIFY_RC=0in 9m35s, 1,587 JS tests, 13 preview, 477 Rust.What goes
42 source files, not the 43 in
deadlist.txt.src/noise/resources/vulcanusResourceCatalog.tsstays and is trimmed in place, 223 lines to 113. Its two math functions (makeVulcanusOreFootprint,sulfuricAcidGeyserProbability), the placement threshold and the three closure-valued fields are all owned by Rust now; what is left is the order and the map colours, whichwasmVulcanusRenderParitygrades the engine's pixels against. #227's done-when is thatsrc/noise/holds orchestration and catalogs only, and that file is now a catalog with no imports at all.elevationRenderRequest.tsloses its fallback arms, 309 lines out and 97 in. The four views that used to fall through to plain TypeScript terrain were normalised onto their planet's terrain code in #362, and the error path and thestartingLakePositionsguard landed in #365, so nothing reaches the fallback any more.The parity specs are converted, not deleted
tier2Frozen.tsandtier3Frozen.tswere built in #345 and #360 for exactly this step:expectFrozentakes its reference arm as an optional last argument, so a spec whose TypeScript is gone drops that argument and keeps grading the engine against a value captured while the two ports demonstrably agreed. Deleting the specs instead would take the port's arithmetic out ofwasm32-unknown-unknownaltogether, which is the one thingcargo testcannot cover and the reason the freeze exists.Tier 2. 68 of Vulcanus's 74 fields keep both arms. The six whose reference implementation went -
geyserProbability,cliffinessBasic,decorativeKnockout,rockHuge,rockBig,rockDensity- drop to frozen-only.NO_TS_ARMnames them and a new test asserts that list matches whattsFieldsactually withholds, so a seventh field losing its arm fails rather than downgrades quietly. Nauvis loses its arm entirely; its whole expression core was in the dead set.Tier 3 needed the same treatment, and the notes had cleared it. Those specs have no dead-set imports, which is what had been checked. They get their reference arm by calling
runRenderRequest(req)with the engine left off, which the rewrite above now refuses - 76 failing tests across seven files.tier3Frozen.tshad written the trap down in advance: after the deletion the no-engine call "is not a weaker arm, it is the SAME arm - so the comparison would pass while grading nothing."test/tiledEquality.spec.tschanges character rather than shrinking. It passed no engine at all, so it graded the TypeScript renderers and could not see the WASM gate. It now runs every render through the engine, closing a gap the #227 notes had already identified.Anti-vacuity guards were re-based wherever the claim survived
Vulcanus's slider guard (still 50 of 74 fields) and window guard (still all 74) now read the engine, and the counts are unchanged because every field with both arms is pinned to the same frozen value. The off-grid sweep's "these really are different points" check moved the same way. Both render specs' routing tests became the sharper statement they always stood in for: with no fallback left, a view that reaches the engine is exactly a view that REFUSES to render without one.
Two rewrites failed on the first run, and both were findings rather than test bugs. Recorded where they were measured:
checksum_powtakes its exponent as anf32, so the2.0000001that used to prove the dispatcher leaves the squaring branch narrows to exactly2. The perturbation is now one f32 ULP, asserted to survive the boundary.checksum_distance_from_nearest_pointfoldsf64::from(distance_from_nearest_point(...)), and that function returns anf32, so an f64 ULP on the cap comes back as the same number.Three tests flipped because they said in their own comments that they should.
viewNormalisation's last block was labelled "the arm #227 deletes".elevationRenderRequest.spec's KNOWN HOLE row asked to "flip to asserting the refusal" ifrunRenderRequestever refused a Nauvis-only view on another planet, which is what this does - closing a wrong-planet bug where Fulgora'selevationview drew the Nauvis field.wasmNauvisRenderParity's ABI-cap row said it "belongs to the carve-out, and the #227 deletion removes both together"; the cap is now a refusal, with a companion case at eight points so the refusal is about the list's length rather than its presence.What is lost, and why
Seven Nauvis tier-2 guards could not be re-based. Each counts how many swept positions satisfy a predicate, and
checksum_nauvisreturns an order-sensitive fold that cannot be decomposed back into counts. They are deleted here and every frozen number they held is recorded in the follow-up issue, so restoring them behind a predicate-counting export re-measures rather than re-derives.Closes #227.