Skip to content

test+fix(codegen): broaden to generated .twasm corpus; authoritative parse errors#168

Merged
hyperpolymath merged 1 commit into
mainfrom
feat/twasm-broaden-reinforce
Jun 16, 2026
Merged

test+fix(codegen): broaden to generated .twasm corpus; authoritative parse errors#168
hyperpolymath merged 1 commit into
mainfrom
feat/twasm-broaden-reinforce

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Follow-on to #167 ("broaden & reinforce at this level").

Broadengenerated_twasm_source_round_trips: 256 random valid .twasm source modules (random regions / scalar fields / arrays / align + named-param fns), each parses, emits valid wasm, and round-trips the verifier. Arbitrary schemas, not just the six examples.

Reinforcetw build no longer silently falls back to hardcoded string-matching on parse failure; a parse error is authoritative (clean diagnostic + non-zero exit). The Rust parser covers example/paint-type + general .twasm, so the fallback is removed.

33/33 codegen tests pass. Still v0; next is real region.get/set body lowering.

🤖 Generated with Claude Code

…tative parse errors

Broaden: generated_twasm_source_round_trips builds 256 random valid .twasm
SOURCE modules (random regions/scalar fields/arrays/align + named-param fns)
and asserts each parses, emits valid wasm, and round-trips the verifier —
exercising arbitrary schemas, not just the six hand-written examples.

Reinforce: tw build no longer silently falls back to hardcoded-schema
string-matching on a parse failure (which masked real errors behind a
confusing double message). A parse error is now authoritative: clean
diagnostic + non-zero exit. The Rust parser covers the example/paint-type
schemas and general .twasm, so the fallback is removed.

33/33 codegen tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hyperpolymath
hyperpolymath merged commit f682066 into main Jun 16, 2026
25 checks passed
@hyperpolymath
hyperpolymath deleted the feat/twasm-broaden-reinforce branch June 16, 2026 07:40
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