Skip to content

Fix factory inference, add snapshots, and partition RISC-V CI - #34

Merged
284km merged 2 commits into
mainfrom
feat/factory-snapshots-and-riscv-ci
Nov 7, 2026
Merged

284km merged 2 commits into
mainfrom
feat/factory-snapshots-and-riscv-ci

Conversation

@284km

@284km 284km commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Changes

Wasm now accepts unannotated builtin factories when their uses resolve to one concrete return type, including aliases and nested scopes. C emits factory adapters before lifted functions and gives with bindings the same mangled names and lexical type information as body references. A regression fixture exercises Vec, Map and OwnedVec factories across interpreter, C, LLVM and Wasm.

Add snapshot : 'a -> 'a for immutable plain data that must survive container compaction and recycling. It evaluates its argument once in the caller's scope and uses region-result copying on compiled targets. Containers, functions, borrows and capabilities are rejected recursively; unresolved wrapper and alias types remain monomorphic to preserve the bound. Documentation marks the API as unreleased.

Partition the hosted RISC-V sweep into RV32 corpus, RV64 corpus and shared boundary checks across existing groups. Preserve default all-mode behavior, output comparisons, named refusals and known-difference freshness checks. A routing audit compares the three partitions against all-mode, including refusal paths. CI now requires 191 gates across the same nine groups and four build configurations.

Stabilize the resumed-pinner lifetime negative control by forcing reclamation at the intended boundary; incidental conservative pins could previously hide the injected fault.

Validation

  • 2,946 unit tests, 250 parity fixtures and all ten README commands pass.
  • New factory and snapshot fixtures agree across interpreter, C, LLVM and Wasm.
  • Snapshot passes O0/O2 ASan/UBSan and 84 type-refusal checks across seven modes; removing the copy exposes heap-use-after-free. Recycling churn overwrites reclaimed storage before reading the copy.
  • Full native lifetime checks and poison controls pass, along with Clang/GCC 15 compiler checks and scaling checks.
  • Partition audit retains all 1,046 compiler invocations from the original script, current all-mode and the three CI partitions, including multiplicity.
  • CI routing/result/checkout/setup controls, workflow syntax, generated host matrix and documentation checks pass locally.

Hosted verification

Final PR CI passes all 17 jobs and all 191 required gates, once each in the assigned group. Execution logs confirm all three real emulator modes, the partition audit and all 84 snapshot refusals. RV32 reports 220 agreements, seven expected differences and 20 named compile refusals; RV64 reports 244 agreements, two expected differences and one named refusal. The factory fixture is explicitly refused on RISC-V because its with expression is an existing unsupported feature. The snapshot fixture also executes and matches at both widths in focused local checks.

RV64-only mode now prints only the RV64 corpus summary; the audit rejects a misleading RV32 compile-only footer.

Merged-main CI also passes all 17 jobs and all 191 required gates on the merged source. Pages builds and deploys that same commit successfully. The merged tree matches the tested PR tree.

Main CI takes 25m19s, compared with 25m29s for the previous main run. RISC-V drops from 25m15s to 13m10s; compiler is now the longest group at 25m06s. Overall CI remains approximately 25 minutes, so an overall speedup is not established. Setup, cache state and runner load vary. The partition preserves coverage and removes RISC-V as the longest group in these runs.

@284km
284km merged commit 0cb0f05 into main Nov 7, 2026
17 checks passed
@284km
284km deleted the feat/factory-snapshots-and-riscv-ci branch November 7, 2026 08:25
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