Skip to content

E3 engine fixes: alias=maybe miscompile fixed (#292); #293/#295 re-verified closed and pinned - #867

Merged
ronaldtse merged 2 commits into
mainfrom
e3-fixes-ruby
Nov 17, 2026
Merged

ronaldtse merged 2 commits into
mainfrom
e3-fixes-ruby

Conversation

@ronaldtse

@ronaldtse ronaldtse commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The E3 round's engine-side findings on the ruby reference runtime and the vendored py runtime. One fix (maps#292), and two findings (maps#293, maps#295) that were re-verified probe-by-probe against origin/main before writing anything — both were already closed by work that landed after the fuzz campaign ran, so they are pinned with regression tests rather than "fixed" (nothing fabricated).

maps#292 — ruby miscompiled alias = maybe(...) (FIXED, red→green)

The runtime compiled a Maybe/Some/MaybeSome over a multi-atom body by appending the suffix to the UNWRAPPED body: maybe(any([x,y,z]) + any(1..3)) built (?:x|y|z)[1-3]? — the optionality bound to the last atom, the rule silently never matched, and abc transliterated unchanged (52 fuzz cases; ts/py/rs were the consistent reference). The wrap condition was inverted: only a single-character String body is its own atomic unit; every other body needs the non-capturing group.

  • spec/interscript/fixtures/fuzz/alias-maybe.isc + fuzz_findings_spec.rb: both rows red before the fix (abc, y), green after; outputs are the four-runtime reference values from the issue.
  • Full suite 440 examples, 0 failures. Golden: the ruby gate replays the E3-refreshed capture (interscript-rs#33) against the maps PR checkout — 13,788 forward + 10,056 reverse rows, cross-runtime delta 0 — which also proves the wrap change alters no corpus map's output (no corpus map uses an alias-top-level maybe over a multi-atom body; the pins cover it).

Observed, not touched: lib/interscript/compiler/{ruby,python,javascript}.rb (the legacy cross-compilers, CI-maintained) carry the byte-identical inverted condition in their emit paths — same latent defect class, out of this finding's scope; flagged for the owner.

maps#293 — py parse accept/reject boundary (VERIFIED ALIGNED; pinned)

Every family re-run against origin/main py:

family fuzz-time py origin/main py today
nested parallel inside sequence accepts rejects (matches ruby/ts/rs)
unknown keyword in item position accepts rejects
malformed escape in rule string accepts rejects
zero-width primitive in compound from rejects (UnsupportedConstruct) accepts at parse (matches the other three)
ruleset inside metadata rejects rejects — stays: the canonical .parg metadata_field production has no ruleset_block, so py rejecting is grammar-canonical; ruby/ts/rs accepting is the lax side and needs the owner ruling the issue itself notes ("three-way laxness vs py")

The first four were closed by the grammar-sync/generated-parser work that landed after the campaign (the sha-pinned .parg embed is byte-identical and the pin test passes). tests/test_isc_parser.py::TestParseBoundaryFuzzFamilies pins all five so the boundary cannot drift back silently. Full-corpus boundary check: py parses 429/435, failing only the 6 documented dependency-resolver maps (the parity README §A.5 semantics, not drift).

maps#295 — py note-text brace corruption (VERIFIED CLOSED on A; B no longer divergent)

  • A: the committed fuzz evidence map (din-kaa with standard's → standa{d's) was run through current main py next to the clean map — every embedded row produces identical output; the parser's block/string scanning no longer corrupts. TestNoteTextIsInert pins the defect class (a { in description free-text must not alter the parsed rule set or the output).
  • B (the var-kor duplicated-line mutation): ruby and rs now accept the mutation exactly like py (re-verified on all three) — the fuzz-era "three raise / py succeeds" split no longer exists; the residual duplicate-definition question is the parity README's G7, owner-held.

Test plan

The runtime compiled an alias body of the form maybe(X + Y) into
X-prime Y-optional - the optionality suffix bound to the body's LAST
atom instead of the body, so the rule silently never matched
(maps#292, 52 fuzz cases; ts/py/rs were the consistent reference).
The wrap condition was inverted: only a single-character String body
is its own atomic unit; every other body needs the non-capturing
group. Failing spec + fixture pin the agreed outputs.
Re-verified every fuzz-filed family against origin/main before writing
these: the nested-block, unknown-keyword, malformed-escape and
zero-width-in-compound-from families already match ruby/ts/rs on the
shared .parg grammar (the fuzz-era drift was closed by the generated
parser work), and the note-text brace corruption no longer reproduces
(the din-kaa evidence map parses to the same rule set clean or braced).
The pins keep those boundaries from drifting back. One residual stays
open on purpose: ruleset-inside-metadata is rejected here because the
canonical .parg metadata_field production has no ruleset_block - the
ruby/ts/rs acceptance is the lax side and needs the owner ruling the
issue itself asks for; py rejecting is grammar-canonical, not a defect.
@ronaldtse
ronaldtse merged commit 9d0d049 into main Nov 17, 2026
20 of 22 checks passed
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