Delete the ported TypeScript specs (#227) - #360
Merged
Conversation
Phase 7's first cut. 85 spec files go, 17 lose only the blocks that graded deleted code, and nothing outside `test/` changes. 28,241 lines out and 5 in, and all 5 of those are rewritten import lines rather than new code. ## Every file was classified, not bulk deleted #227 asks for this explicitly, because `src/noise/` is imported by most of the suite. Each spec was checked against the "dead set" - the TypeScript symbols the Rust port replaced. | bucket | count | rule | | --- | --- | --- | | delete | 85 | every symbol it grades is in the dead set | | arm | 17 | it grades live code too, so only the dead blocks come out | | defer | 10 | it needs a symbol rehomed first, so it is untouched here | 23 of the 85 deletions imported nothing but dead symbols, so they had no surviving assertion at all. The largest single file is `test/oracle/capture.ts` at 7,334 lines. That is the harness that captured the fixtures, and every caller of it is in this delete list. One file changed bucket mid-run. `test/cliffOrientationMargin.spec.ts` was armed first, but its file-level setup calls `makeVulcanusCliffFields`, `smoothingKnots` and `crossesCliff`. Arming it left ten TypeScript errors and no test that could still run, so it is a delete. ## What is deliberately still here Ten specs touch the dead set and are untouched by this PR. They do not need porting. They need a symbol moved out of a file that is about to be deleted, and that move is PR D. | file | what survives | | --- | --- | | `test/cliffOreLeverTileConfound.spec.ts` | 6 of 6 blocks; file-level setup is dead | | `test/multisampleChannelAudit.spec.ts` | 1 of 3 blocks | | `test/wasmElevationRenderParity.spec.ts` | 9 of 9 blocks | | `test/wasmEvalParity.spec.ts` | 11 of 13 blocks | | `test/wasmMultioctaveParity.spec.ts` | 4 of 8 blocks | | `test/wasmNauvisParity.spec.ts` | 3 of 14 blocks | | `test/wasmNauvisRenderParity.spec.ts` | 37 of 38 blocks | | `test/wasmPrimitiveParity.spec.ts` | frozen oracle: only the TypeScript arm dies | | `test/wasmVulcanusParity.spec.ts` | frozen oracle: only the TypeScript arm dies | | `test/wasmVulcanusRenderParity.spec.ts` | 6 of 17 blocks | The symbols that block them are `ResourceControlLevers` (still read by 4 source files), `VULCANUS_CLIFF_BLOCKING_TILES` (7), `LAND_RGBA` and `WATER_RGBA`, `TREE_MAP_COLOR`, and `VULCANUS_RESOURCE_CATALOG`. ## Verification Full `pnpm run verify` on this tree: - static: all 386 files formatted, 359 files with no warning, lint error or type error - vitest: 162 files, 1,594 passed, 3 skipped, 609.64s - preview-service worker: 4 files, 13 tests - `node --test`: 10 tests - `scripts/verify-rust.sh`: 35 crate tests and 2 doc-tests, zero dependencies in anything that ships, `engine.wasm` matches its source, and `cargo deny` clean on advisories, bans, licenses and sources The Rust anti-vacuity check still fails against a deliberately broken port, so the crate tests are grading something. No assertion anywhere broke. Claude-Session: https://claude.ai/code/session_01KLPHLUpGn1cqN46xwhmev8 Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
wormeyman
force-pushed
the
feat/227-delete-the-typescript-specs
branch
from
August 30, 2026 19:09
f1a2ed6 to
8cc27ab
Compare
wormeyman
added a commit
that referenced
this pull request
Aug 30, 2026
Four groups of symbols live in files phase 7 is about to delete, but surviving code still needs them. This moves them out first, so the deletion can be a deletion rather than a deletion plus a scramble. No behaviour changes and no test coverage is lost. | symbol | left | arrived | | --- | --- | --- | | `ResourceControlLevers` | `resources/resolveResource.ts` | `resources/resourceCatalog.ts` | | `VULCANUS_CLIFF_BLOCKING_TILES` | `preview/renderVulcanusCliffs.ts` | `cliffs/cliffCatalog.ts` | | `LAND_RGBA`, `WATER_RGBA`, `TREE_MAP_COLOR` | `preview/renderElevation.ts`, `preview/renderTrees.ts` | new `preview/palette.ts` | | `PlacedCliffCell` | `cliffs/cliffPlacement.ts` | inlined into `cliffs/cliffConnections.ts` | Measured effect: files outside the dead set that still import from it drop from 14 to 6, and 11 of the 6 remaining edges belong to one file, `preview/elevationRenderRequest.ts`, which the deletion PR has to rewrite anyway. ## Why each target `resourceCatalog.ts` and `cliffCatalog.ts` were chosen because both have zero imports of their own, so neither can form a cycle, and two of the three consumers of `ResourceControlLevers` already imported from `resourceCatalog.ts`. `palette.ts` is new because there was nowhere to put these. The repo keeps per-domain leaf catalogs rather than one palette module, and the obvious home for `TREE_MAP_COLOR` would have been a trees catalog - but every file in `src/noise/trees/` is in the dead set, so that directory disappears. A one-constant `trees/` directory whose name promises tree math that no longer exists is worse than grouping the three render colours together. It also keeps the colour out of the tree field's import graph, which pulls `moisture` and `temperature` behind it. `LAND_RGBA` and `WATER_RGBA` are not game data. They are the two colours this repo picked to paint a sign test on the elevation tree, which is why they have no domain catalog to belong to. `TREE_MAP_COLOR` is game data, from `utility-constants.lua:201`, and its doc comment carries that. These three stay in `src/` rather than moving into `test/` even though the only readers left are two parity specs. They are hand-written oracles for the Rust output, and an oracle that lives in the file it grades is a weaker check. ## `PlacedCliffCell` is a required inline, not a tidy-up `cliffConnections.ts` is kept deliberately: it has no importers at all since #360, and it survives because `crates/fmw-noise/src/cliffs/connections.rs:4` names it as the file the Rust was ported from. `tsconfig.json` includes `src/**/*` by glob rather than by reachability, so a file with zero importers is still fully type-checked. Leave the type-only import of `PlacedCliffCell` pointing at `cliffPlacement.ts` and the dead-set deletion turns `verify:lint` red on the one file it is trying to preserve. Its two doc comments also cited `test/cliffConnections.spec.ts`, which #360 deleted along with the rest of the 23-spec investigation corpus. They now point at the Rust that runs over the same fixture. A file kept as a human-readable reference is not worth much with dead citations in it. ## Two corrections `test/cliffCatalog.spec.ts` re-pins that `VULCANUS_CLIFF_BLOCKING_TILES` is exactly `["lava", "lava-hot"]`. #360 stripped the block that asserted this when it armed `cliffOreDirection.spec.ts`, and nothing replaced it, so the constant survived with its value ungraded. The Rust holds the same pair inlined twice, with no shared definition - worth its own issue. `CLAUDE.md` said `cliffConnections.ts` has "zero `src/` consumers - only 23 investigation specs import it". Those 23 are gone; it now has no consumers of any kind. The sentence justifying the file no longer described the tree. ## What this deliberately does not do Five parity specs still import from the dead set: `wasmNauvisParity` (15 edges), `wasmMultioctaveParity` (2), `wasmPrimitiveParity` (2), `wasmEvalParity` (1) and `wasmVulcanusParity` (1). Every block that would have to be cut from them compares the TypeScript against the Rust, and all of them pass today. They only become impossible when the TypeScript goes, so they are cut in the deletion's own commit rather than a PR early - removing the evidence before taking the step it justifies would be the wrong order. The rehome made five of the ten specs that were deferred for this work need no edit at all, and saved three blocks that were slated for deletion only because the constants they read were assumed to die. ## Verification Full `pnpm run verify`, `VERIFY_RC=0`: - static: all 387 files formatted, 360 files with no warning, lint error or type error, `vue-tsc` clean - vitest: 162 files, 1,595 passed, 3 skipped, 606.83s. The count is up one from #360's 1,594, which is the re-pinned lava assertion running. - preview-service worker: 4 files; `node --test`: 10 tests - Rust: 440 and 35 crate tests, 2 doc-tests, the anti-vacuity check still fails against a deliberately broken port, `engine.wasm` matches its source, and `cargo deny` clean on advisories, bans, licenses and sources Claude-Session: https://claude.ai/code/session_01KLPHLUpGn1cqN46xwhmev8 Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
wormeyman
added a commit
that referenced
this pull request
Aug 31, 2026
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 first cut. 85 spec files go, 17 lose only the blocks that graded
deleted code, and nothing outside
test/changes. 28,241 lines out and 5 in,and all 5 of those are rewritten import lines rather than new code.
Every file was classified, not bulk deleted
#227 asks for this explicitly, because
src/noise/is imported by most of thesuite. Each spec was checked against the "dead set" - the TypeScript symbols the
Rust port replaced.
23 of the 85 deletions imported nothing but dead symbols, so they had no
surviving assertion at all. The largest single file is
test/oracle/capture.tsat 7,334 lines. That is the harness that captured the fixtures, and every caller
of it is in this delete list.
One file changed bucket mid-run.
test/cliffOrientationMargin.spec.tswas armedfirst, but its file-level setup calls
makeVulcanusCliffFields,smoothingKnotsandcrossesCliff. Arming it left ten TypeScript errors and notest that could still run, so it is a delete.
What is deliberately still here
Ten specs touch the dead set and are untouched by this PR. They do not need
porting. They need a symbol moved out of a file that is about to be deleted, and
that move is PR D.
test/cliffOreLeverTileConfound.spec.tstest/multisampleChannelAudit.spec.tstest/wasmElevationRenderParity.spec.tstest/wasmEvalParity.spec.tstest/wasmMultioctaveParity.spec.tstest/wasmNauvisParity.spec.tstest/wasmNauvisRenderParity.spec.tstest/wasmPrimitiveParity.spec.tstest/wasmVulcanusParity.spec.tstest/wasmVulcanusRenderParity.spec.tsThe symbols that block them are
ResourceControlLevers(still read by 4 sourcefiles),
VULCANUS_CLIFF_BLOCKING_TILES(7),LAND_RGBAandWATER_RGBA,TREE_MAP_COLOR, andVULCANUS_RESOURCE_CATALOG.Verification
Full
pnpm run verifyon this tree:type error
node --test: 10 testsscripts/verify-rust.sh: 35 crate tests and 2 doc-tests, zero dependencies inanything that ships,
engine.wasmmatches its source, andcargo denycleanon advisories, bans, licenses and sources
The Rust anti-vacuity check still fails against a deliberately broken port, so
the crate tests are grading something. No assertion anywhere broke.
Claude-Session: https://claude.ai/code/session_01KLPHLUpGn1cqN46xwhmev8
Co-authored-by: Claude Opus 5 (1M context) noreply@anthropic.com