Conversation
Make tx_rx_vt_pr-generated Tx facades resolve through explicit sessions or a default fallback session instead of a process-wide true singleton. This lifts the pseudo-singleton runtime from example-local prototype code into src/instances, updates the macro expansion to generate session-aware facades, migrates the constant-prop pseudo-singleton examples to the library API, and adds regression tests for session isolation, async routing, and reset-for-bench behavior. Focused verification: - cargo test --test session_aware_tx --test pseudo_singleton_constant_prop - cargo run --example constant_prop_pseudo_singleton - cargo run --example constant_prop_pseudo_singleton_async - subagent review: no findings
Make session routing the default Tx story in user-facing names. This removes the pseudo-prefixed example and test filenames, deletes examples/support, renames the internal runtime module to session_runtime, and updates README copy to describe sessions as the default Tx behavior rather than a separate pseudo-singleton mode. Focused verification: - cargo test --test tx_sessions --test session_tx_constant_prop - cargo run --example constant_prop_sessions - cargo run --example constant_prop_sessions_async - subagent review: no findings
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.
This PR removes the macro-generated
ctx.read_*/ctx.try_read_*helpers from stable-side#[eggplant::func]rule contexts and rewrites the remaining read sites to query/pattern style.The old read helpers let rule actions reach into function tables directly. That is a poor fit for stable because the lookup happens in the closure path instead of the pattern/query phase, and the
try_read_*fallback path makes the semantics uneven. This change deletes read-helper generation entirely, keeps theset_*API, and moves reads into the rule pattern where the function result is bound and devalued explicitly. There is no fallback path left.Updated call sites include the read smoke test and fib demo in
src/test.rs,examples/func_read_complex.rs, and the bench cases underbenches/runners/eggplant_rewrite/.Validation:
cargo fmt --all --checkcargo build --example func_read_complex --lockedcargo test --lib func_ctx_query_smoke -- --nocapturecargo test --bench ci_benchmarking --no-run --locked