Skip to content

Integrate WSON and parsed AST output with shared Python CI procedures - #837

Merged
LunaStev merged 6 commits into
wavefnd:masterfrom
LunaStev:refactor/utils-wson-and-ci
Oct 1, 2026
Merged

LunaStev merged 6 commits into
wavefnd:masterfrom
LunaStev:refactor/utils-wson-and-ci

Conversation

@LunaStev

@LunaStev LunaStev commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Unify compiler serialization under Utils WSON, give parsed AST output an explicit schema, and move CI/release procedures from shell-heavy workflows into tools/ci/.

  • Replace utils::json and duplicated diagnostic/CLI serializers with a shared WSON value model, parser and writer. Preserve strict JSON output contracts, exact integer/decimal spelling, Unicode handling and bounded nesting without adding Rust dependencies.
  • Add schema-versioned parsed AST output: S-expression debug dumps and --emit=ast --ast-format=wson|json|sexpr. Keep import declarations and original literal spellings/bytes without import expansion or type checking for AST-only emission.
  • Consolidate build/case workflows into ci.yml. Shared Python plans account for the previous 29 jobs and 225 procedures, retain feature-isolated and platform-specific checks, and record failure, timeout, cancellation, interruption and unstarted work. Provisioning and release publication require explicit flags.
  • Provide typed output in the embedded Node WebAssembly host for wasm32, wasm64 and WASI: decode the existing variadic ABI for Wave-generated printf formats and explicit puts, preserve raw bytes and exact six-decimal float formatting, and propagate exit status. No external runtime dependency is added.
  • Keep temporary Windows user profiles outside uploaded native execution evidence so protected profile directories do not break artifact collection.
  • Include matching std in all eight existing native distributions, preserve archive names/layouts and native dependency checks, and produce checksums plus source/target/std metadata. Preserve previous archive/sidecar files if replacement fails and recheck canonical master immediately before publication.

Motivation

Separate JSON implementations and Rust-derived AST dumps make output contracts difficult to maintain. Workflow-owned procedures cannot be reproduced through the same local commands and repeat platform/toolchain decisions.

Closes #835.
Closes #836.
Closes #824.
Closes #825.
Closes #826.
Closes #827.
Closes #828.
Closes #829.
Closes #830.

Part of #832. Nightly publication (#831) remains a separate final step. Vex artifact selection for Windows MSVC/ARM64 and Linux LoongArch64 is tracked separately in wavefnd/Vex#154.

Target and compatibility impact

  • Diagnostic JSON/JSONL and CLI JSON fields remain unchanged. WSON integers use Utils ConstInt; duplicate keys and unsupported JSON-mode WSON values are explicit errors.
  • AST output intentionally changes from Rust Debug to a parsed-source schema. Default AST artifacts are .ast.wson; JSON uses .ast.json, S-expression uses .ast. CLI help and deterministic snapshots describe the new selection.
  • Existing Linux, macOS, Windows MSVC, FreeBSD, freestanding and wasm32/wasm64 validation lanes and check names are retained. The case manifest and runtime classification are unchanged; no cases are excluded or marked as expected failures. The default Node host now supplies the existing Wave output imports; unsupported external printf formats still fail explicitly.
  • Existing compiler package names remain compatible; std and .metadata.json sidecars are additive. OS SDK/system-library prerequisites remain external. Native toolchain pins are shared with the provisioning helpers.

Validation

Rust commands used LLVM_SYS_211_PREFIX=/usr/lib64/llvm21 where required and Cargo --jobs 2:

  • cargo +1.89 test --jobs 2 --workspace --lib: 65 passed.

  • cargo +1.89 test --jobs 2 --test ast_serialization --test frontend_regressions --test release_stabilization --test release_constants: 35 passed.

  • cargo +1.89 clippy --jobs 2 --all-targets -- -D warnings and cargo +1.89 fmt --all --check passed.

  • All tools.test_* unittest modules: 220 tests, 27 skipped under their platform/runtime prerequisites; no failures. Coverage includes stage failure/cancellation, publication gates, all eight package layouts and rollback at each archive/sidecar replacement boundary.

  • Browser/WASI smoke passed with the source-built compiler through both the Node hosts and wavec run. Invalid WASI fixture contents return status 10 through both paths; a minimal guest verifies that the host propagates status 7.

  • Actual python3 -m tools.ci.test --target linux-amd64 --lane cases/case-config passed; build and release plan commands also succeeded.

  • AST JSON output was independently parsed with Python's JSON parser; WSON/JSON/S-expression snapshots and literal-preservation tests passed.

  • Actionlint passed for both migrated workflows with existing newer runner labels declared locally; git diff --check and Python compilation passed.

  • Full manifest-selected WebAssembly runtime suites passed locally through the compiler's actual execution plans: wasm32 unknown 146/146, WASI 146/146, wasm64 unknown 147/147 (439 total, no failures or exclusions). This resolves the previously deferred 63 host-import failures in each lane.

  • Exact output and exit status passed at O0/O2 on all three WASM targets. Node host unit checks cover byte/pointer handling, memory growth, mixed variadic alignment, floating-point ties/negative zero/large values, invalid memory, unsupported formats and write failures. Existing WASM ABI, allocator and WASI process-exit regressions passed.

  • Windows profile-isolation regression passed: installed std remains available in the isolated profile, while the upload tree contains only execution evidence. Hosted Windows amd64/ARM64 builds, runtime checks and artifact uploads now pass after the profile-directory separation.

  • The latest hosted run passed 25/26 checks, including all Windows and WASM lanes. macOS ARM64 exposed a removed Node/V8 --experimental-wasm-memory64 startup flag. The host now probes memory64 at execution time, starts directly when supported, or restarts once with the legacy flag for older engines. Dry-run plans no longer unconditionally pass the flag.

  • The same O0/O2 output and exit-status regression passed with Node 22.0.0 (legacy-flag path), 22.22.1 and 24.19.0 (native memory64 path), for all three WASM targets. The dry-run argument regression, Clippy and formatting checks passed. The macOS hosted result for this final compatibility fix is pending.

Extracted production-release package execution remains for the release pipeline.

Checklist

  • Commits include a DCO Signed-off-by line.
  • Tests cover new behavior or the PR explains why no test is needed.
  • User-facing changes include documentation or diagnostics updates.
  • The change preserves the license boundary between the compiler and std/.

@LunaStev
LunaStev merged commit 448370f into wavefnd:master Oct 1, 2026
26 checks passed
@LunaStev LunaStev mentioned this pull request Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment