Skip to content

[codex] Revive doeff-vm test layer#473

Merged
proboscis merged 1 commit into
mainfrom
issue/vm-pyvm-stale-test-layer/run-20260612-151733
Jun 12, 2026
Merged

[codex] Revive doeff-vm test layer#473
proboscis merged 1 commit into
mainfrom
issue/vm-pyvm-stale-test-layer/run-20260612-151733

Conversation

@proboscis

Copy link
Copy Markdown
Owner

Summary

  • Replaced the stale packages/doeff-vm/tests/test_pyvm.py legacy API layer with current bridge contract tests for PyVM, low-level doeff_vm.WithHandler, doeff.run(...), handler installers, scheduled(...), and vm_live_counts().
  • Updated package-local export, memory/liveness, and Rust source-guard tests to match the current public API.
  • Wired packages/doeff-vm/tests into the standard pytest path via pyproject.toml testpaths.
  • Made packages/doeff-vm/src/pyvm.rs VMError/Value matches explicit so the refreshed source guard does not rely on catch-all arms.

Deleted stale tests grouped by removed feature

  • Removed module-level doeff_vm.run / doeff_vm.async_run, RunResult, run_with_result, raw_store, and env/store result-shape tests.
  • Removed doeff_vm.state, reader, writer, scheduler, put_env, state_items, env_items, logs, and PyStore sentinel/store API tests.
  • Removed old async step-driver tests for start_program, step_once, feed_async_result, and feed_async_error.
  • Removed legacy scheduler effect pyclass tests (SpawnEffect, GatherEffect, CreatePromiseEffect, old race/promise imports) and rewrote scheduler coverage through scheduled(Spawn/Gather).
  • Removed legacy tag constants, DoeffGeneratorFn, FlatMap, Discontinue, no-arg Delegate, and ResumeContinuation assertions that no longer describe the public API.

Rewritten coverage retained

  • PyVM().run(...) for current @do programs and low-level DoExpr nodes.
  • Python handler semantics for Resume, Transfer, ResumeThrow, Pass, nested WithHandler, and GetHandlers(k).
  • Current state(), reader(), and writer() Program -> Program installers.
  • Current scheduler path via doeff.run(scheduled(...)).
  • Current package exports and liveness diagnostics through vm_live_counts() / arena_stats().

Verification

  • uv sync --reinstall --group dev passed.
  • PATH="$HOME/.local/bin:$PATH" make sync passed and rebuilt packages/doeff-vm with maturin develop --release.
  • uv run python -m pytest packages/doeff-vm/tests -q -> 28 passed.
  • uv run python -m pytest tests/core/test_vm_legacy_tag_parser_fail_loud.py -q -> 6 passed.
  • uv run python -m pytest tests -q -> 880 passed, 90 skipped.
  • uv run ruff check packages/doeff-vm/tests packages/doeff-vm/doeff_vm -> passed.
  • cargo fmt --manifest-path packages/doeff-vm/Cargo.toml --check -> passed.
  • PATH="$HOME/.local/bin:$PATH" semgrep --config .semgrep.yaml --baseline-commit origin/main doeff/ packages/ --error -> 0 findings introduced by this commit.

Note: full PATH="$HOME/.local/bin:$PATH" make lint-semgrep still fails on 77 pre-existing repository findings; the baseline semgrep check above reports no new findings from this PR.

Refs: vm-pyvm-stale-test-layer

@proboscis proboscis marked this pull request as ready for review June 12, 2026 13:26
@proboscis proboscis merged commit 119b120 into main Jun 12, 2026
1 check 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.

1 participant