Fix the three real PML mods that didn't work: numeric enum + all families + real call shapes - #135
Merged
Merged
Conversation
Owner's diagnostic log: "4 mods 1 tspml works 3 pml dont" — three mods, three refusals, three real call shapes the collector had never met. All three mods' sources were fetched from the CDN and read; all three now carry. - 3decspeed refused as "no type" because its spec's type IS a type — a NUMBER. PML's real MixinType (PolyTypes.js, read from the CDN) is a numeric enum (INSERT=3, REPLACEBETWEEN=5), and every mod importing PolyTypes.js by its absolute CDN URL — all of them — puts that number in the spec. The parser is now bilingual: names and numbers, mapped from the real enum. - husplits' registerFuncMixin(name, spec) and noitalics' registerGlobalMixin(spec) were refused BY FAMILY. Family is PML's targeting hint — it decides where PML looks — and the exactly-once token rule subsumes looking. Every source-op family collects now; what still refuses, by name: method-extent values (0/1/2), class-wide values (4/7/8, they apply at every site at once), the two wasm families, and calls with no spec object. The re-run exposed a trap in the fixture itself: in comma-expression context a bare parenthesized func PARSES as a call of the preceding call's result — it sets its marker, then throws, truncating the game's boot tail after the marker. #133's "passing" splice was almost certainly doing exactly that while green. The discipline (now in the fixture's comments): leading comma in comma-sequence context, semicolon-statement in block context. And the numeric splice's first token was lazy-path code (verifier catch) — applied but never ran; a marker proves execution only where the token's site executes at bundle eval. The fixture now pins: string enum, numeric enum, lone-object global twin-anchor — 3/3 applied in the browser, both markers firing in the game frame. Three catalog summaries that said these mods' mixins "are refused and reported" now say they carry after one restart. Portal 728 -> 734 tests; repo-wide 1,347 green; smoke typecheck after the last script edit.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What
Owner's diagnostic log: "4 mods 1 tspml works 3 pml dont" — three mods, three refusals, three real call shapes the mixin collector had never met. All three mods' sources were fetched from the CDN and read; all three now carry.
MixinType(PolyTypes.js, read from the CDN) is a numeric enum (INSERT=3, REPLACEBETWEEN=5), and every mod importing PolyTypes.js by absolute CDN URL puts that number in the specregisterFuncMixin)(name, {type, token, func})— token-anchored like any class mixinregisterGlobalMixin)registerGlobalMixin({type, tokenStart, …})The design correction
Family is a targeting hint, not a barrier. PML's mixin families exist to tell PML where to look; our exactly-once token rule subsumes looking — a token that matches once in a surface needs no help being found, and one that matches nowhere refuses with the count. Every source-op family collects now, and the parser is bilingual (names + the real numeric enum). What still refuses, each by name: method-extent values (0/1/2), class-wide values (4/7/8 — they apply at every site at once, unverifiable by an exactly-once anchor), the two wasm families (gate unchanged), and spec-less calls.
The trap the fix's own test run exposed
The fixture's numeric splice first hit
transform-threw— and chasing it exposed that #133's "passing" splice was almost certainly breaking the game's boot tail: in comma-expression context a bare parenthesized func parses as a call of the preceding call's result, sets its marker, then throws. The discipline (now in the fixture's comments): leading comma in comma-sequence context,;-statement in block context. Also: the numeric splice's first token was lazy-path code (applied but never ran) — a marker proves execution only where the token's site executes at bundle eval; it now uses the animation-loop registration.Proof
smoke:pmlPASS with 3/3 splices applied in a real browser: string-enum class insert, numeric-enum class insert (__pmlSpliceRan2fires in the game frame), lone-object global twin-anchor REPLACEBETWEEN — all three CDN shapes.tsc+ smoke typecheck clean (run after the last script edit).Docs (same merge)
docs/project/progress.mdnew section,docs/concepts/pml-compatibility.md("The family is not a barrier" replaces the families-refused list), README count.