Skip to content

Run WASI suites through the standard test runner - #9804

Merged
youknowone merged 1 commit into
RustPython:mainfrom
youknowdot:wasi-standard-test-runner-20261111
Nov 12, 2026
Merged

youknowone merged 1 commit into
RustPython:mainfrom
youknowdot:wasi-standard-test-runner-20261111

Conversation

@youknowdot

@youknowdot youknowdot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Run WASI stdlib suites with the standard -m test runner through the same launcher used by snippets.
  • Set the guest PWD to the mounted checkout. RustPython already uses this variable for WASI startup; Wasmer's --cwd does not change WASI preview 1's cwd.
  • Use -X frozen_modules=off so traceback and source-sensitive tests read the checkout rather than frozen modules. Keep the standard resource policy explicit with -u none.
  • Add test_unpack, test_unpack_ex, test_ntpath, test_calendar, test_math, test_hashlib, and test_unicodedata. Re-enable the passing builtin_hash, builtin_open, and stdlib_types snippets.

No CPython test files or interpreter behavior are changed. CPU-heavy and other opt-in resource tests remain disabled. test_sort, threading, mmap, and network expansion are outside this change.

Validation

  • Built the current-main WASI binary with the workflow's exact feature set and ran it with Wasmer 7.5.0.
  • Source-backed stdlib regression: 78 of 78 suites passed (all 71 existing suites plus the 7 additions).
  • Snippet harness: 201 passed, 48 skipped, 249 CPython cases deselected.
  • Verified checkout cwd, readable absolute sys.executable, nonzero exit for a deliberately failing suite (2), and exact propagation of SystemExit(17).
  • bash -n, actionlint, pre-commit hooks, and git diff --check pass. Zizmor reports the same four pre-existing low-severity self-repository findings as main, with no new findings.
  • Native workspace/C-API tests and clippy are still pending on the companion implementation change. Remote CI is pending.

AI assistance: Codex assisted with implementation, validation, and this PR description. The runtime did not expose an exact model version.

Summary by CodeRabbit

  • Tests
    • Expanded WebAssembly (WASI) test coverage to include additional standard-library areas, including math, hashing, Unicode, calendar, path handling, and unpacking.
    • Updated test selection and execution to run under the default resource policy, with CPU-heavy, network, and other opt-in resources disabled.
    • Set the working directory consistently when running tests in the WASI environment.

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The WASI CI workflow changes its snippet exclusions and Lib/test selection. It runs selected tests through the WASI wrapper with frozen modules disabled and the default resource policy. The wrapper sets PWD to the repository root for Wasmer.

Changes: WASI CI

Layer / File(s) Summary
WASI test selection and execution
.github/workflows/ci.yaml, extra_tests/rustpython_wasi.sh
The workflow updates snippet exclusions and adds seven Lib/test suites. It runs tests through the WASI wrapper with frozen modules disabled. The wrapper passes the repository root as PWD to Wasmer.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Possibly related PRs

Suggested reviewers: youknowone

Merge Risk: Minimal · up to d2ebb

This change only adjusts how WASI test suites run in CI, so it does not change shipped behavior. No concrete merge-blocking risk was found. Confirm that remote CI passes before merging.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: running WASI test suites through the standard test runner.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 4e1c5d3 and d2ebb19.

Files selected for processing: 1

  • .github/workflows/ci.yaml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@youknowone
youknowone marked this pull request as ready for review November 11, 2026 14:59
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-11T14:59:54.628301Z
We couldn’t complete this review. Comment @codex review to try again.
4e1c5d3 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@youknowone youknowone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @jiwahn

@youknowone
youknowone enabled auto-merge (squash) November 11, 2026 15:00
Use the mounted checkout as the guest working directory and load source-backed tests through regrtest. Add seven suites and restore three passing snippets without changing CPython tests.

Assisted-by: Codex:unreported
auto-merge was automatically disabled November 11, 2026 19:08

Head branch was pushed to by a user without write access

@youknowdot
youknowdot force-pushed the wasi-standard-test-runner-20261111 branch from 4e1c5d3 to d2ebb19 Compare November 11, 2026 19:08
@youknowone
youknowone merged commit 998a807 into RustPython:main Nov 12, 2026
28 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.

2 participants