WIP: reperform pass/delegate from current handler frame#368
Open
WIP: reperform pass/delegate from current handler frame#368
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
handle_forward()to read the current handler'sProgramDispatchfrom the current segment instead of recovering forwarding context viacurrent_dispatch_id()/dispatch_origin_for_dispatch_id()effect,handler_continuation, and prompt marker when building the parent reperform path forPass/DelegateValidation
cargo checkinpackages/doeff-vm-core✅uv run --with maturin maturin develop --releaseinpackages/doeff-vm✅uv run pytest tests/core/test_vm_ocaml5_violations.py -q✅34 passed in 0.12suv run pytest tests/test_pass_dispatch_context_regression.py -q❌ timed out insiderun(...)uv run pytest tests/test_cache_memo_rewriter_with_env.py -q❌ timed out insiderun(...)timeout 12s uv run python -u ...) printed only:start runprogram perform EffectAand then hung before any Python handler body executed
Current status
This is intentionally incomplete per issue guidance. The change moves
Pass/Delegatetoward an OCaml-5-style reperform that takes(effect, k)from the current handler frame instead of looking the dispatch context up by ID, but built-in handler layers are still reperforming into the wrong place before user handlers are reached.Refs: vm-fix-dispatch-regression