Skip to content

[WASM R3] build: own implicit execution artifacts - #226

Closed
cpunion wants to merge 2 commits into
codex/wasm-r3-runner-diagnostics-20260905from
codex/wasm-r3-artifact-lifecycle-20260905
Closed

cpunion wants to merge 2 commits into
codex/wasm-r3-runner-diagnostics-20260905from
codex/wasm-r3-artifact-lifecycle-20260905

Conversation

@cpunion

@cpunion cpunion commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • place implicit llgo run, llgo test, and comparison executables in per-invocation LLGo-owned directories
  • remove the successful-child os.Exit(0) path so build cleanup and trace defers actually run
  • reclaim Emscripten entry modules and sibling .wasm files after both successful and failed runner execution
  • preserve explicit -o and llgo test -c outputs
  • prove named-target multi-package tests continue after the first successful runner

Root cause

Implicit target outputs were created as isolated temp files but did not carry directory ownership, so target-generated sidecars could not be enumerated. Even after grouping them, successful runners called mockable.Exit(0), bypassing every caller defer. That also terminated a multi-package named-target test after its first successful package.

CI coverage

The single-worker wasm lane gives each public run/test invocation an isolated TMPDIR and fails if any .mjs or .wasm execution artifact remains. It covers:

  • successful public runs for EC32, EC64, WC32, wasm, and wasip1
  • a forced EC32 runner failure
  • two packages in one llgo test command for EC32, EC64, and WC32
  • explicit compile-only artifacts retained and validated for all canonical profiles

Validation

  • go test ./internal/build ./cmd/internal/run ./cmd/internal/test -count=1
  • focused output ownership tests
  • direct EC32 success/failure cleanup reproductions
  • direct EC32 two-package llgo test
  • full dev/test_wasm_single_worker.sh with Binaryen wasm-opt and cache disabled
  • bash -n dev/test_wasm_single_worker.sh

This is stacked on #223 and contains no multi-worker runtime work.

@cpunion

cpunion commented Sep 4, 2026

Copy link
Copy Markdown
Owner Author

CI triage: both current failures occur before this PR's code runs.

No artifact-lifecycle change is indicated by either log.

@cpunion
cpunion force-pushed the codex/wasm-r3-artifact-lifecycle-20260905 branch from 4a36fa0 to f06850e Compare September 5, 2026 14:47
@cpunion
cpunion force-pushed the codex/wasm-r3-runner-diagnostics-20260905 branch from 561e950 to 2be342a Compare September 5, 2026 14:47
@cpunion
cpunion force-pushed the codex/wasm-r3-artifact-lifecycle-20260905 branch from f06850e to 5435e47 Compare September 5, 2026 15:22
@cpunion
cpunion force-pushed the codex/wasm-r3-runner-diagnostics-20260905 branch from 2be342a to 946f93e Compare September 5, 2026 15:22
@cpunion

cpunion commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

Rebased in dependency order onto LLVM 22 main bf3071fdd.

  • This PR's new head: 5435e470c; current dependency: codex/wasm-r3-runner-diagnostics-20260905.
  • R2's 28 patches and R2.1's six lifecycle patches remain equivalent. R3/R4 inherit the independent fork-runner repair ci: keep hosted runners available to forks #236; upstream continues using Qiniu, forks use hosted runners. R4's separate stdlib workflow now also installs LLVM 22.
  • LLVM 22 integration validation passed: 30 single-worker checks (7 expected failure paths, 1 timeout, no unexpected failures/skips); nine R3 stdlib package runs; five R4 lanes with six packages / 74 top-level tests per lane. Go-reference lanes remain Go output, not LLGo official-Go-ABI evidence.

To keep CI load bounded, this intermediate PR retains Format/Targets. Repeated functional matrices are canceled here and kept on the updated stack tip #235. Per-layer benchmark reruns are deferred, not replaced by the top PR's performance comparison. Canceled checks are not passing checks, and the integration result is not independent complete validation of every intermediate revision.

@cpunion

cpunion commented Sep 23, 2026

Copy link
Copy Markdown
Owner Author

Retiring this old R3 stack while its still-useful changes are extracted into a new PR based on the current Wasm direction. The branch remains available for reference.

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