Skip to content

Fix the three real PML mods that didn't work: numeric enum + all families + real call shapes - #135

Merged
roowus merged 1 commit into
mainfrom
fix/pml-real-mod-shapes
Aug 29, 2026
Merged

Fix the three real PML mods that didn't work: numeric enum + all families + real call shapes#135
roowus merged 1 commit into
mainfrom
fix/pml-real-mod-shapes

Conversation

@roowus

@roowus roowus commented Aug 29, 2026

Copy link
Copy Markdown
Owner

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.

Mod Was refused because Actually was
3decspeed "the mixin spec has no type" Its 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 absolute CDN URL puts that number in the spec
husplits refused by family (registerFuncMixin) (name, {type, token, func}) — token-anchored like any class mixin
noitalics refused by family (registerGlobalMixin) a lone object specregisterGlobalMixin({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:pml PASS with 3/3 splices applied in a real browser: string-enum class insert, numeric-enum class insert (__pmlSpliceRan2 fires in the game frame), lone-object global twin-anchor REPLACEBETWEEN — all three CDN shapes.
  • Portal 734 tests (728 → 734), repo-wide 1,347 green; tsc + smoke typecheck clean (run after the last script edit).
  • Three catalog summaries that told players these mods "are refused and reported" now say they carry after one restart.

Docs (same merge)

docs/project/progress.md new section, docs/concepts/pml-compatibility.md ("The family is not a barrier" replaces the families-refused list), README count.

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.
@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tspml Ready Ready Preview Aug 29, 2026 5:33am

@roowus
roowus merged commit 11629e0 into main Aug 29, 2026
5 checks passed
@roowus
roowus deleted the fix/pml-real-mod-shapes branch August 29, 2026 05:41
roowus added a commit that referenced this pull request Aug 29, 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.

1 participant