support async context for mutable proxies#6691
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e0d0b19a90
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Greptile SummaryThis PR adds
Confidence Score: 5/5The core async context manager logic is correct and all critical edge cases (failed enter, failed cleanup, double-entry guard) are covered by tests. Path tracking works correctly for attr/item access patterns. The _wrap_recursive_decorator gap for dict.get/setdefault results is an unlikely usage pattern and does not affect normal operation of the feature. reflex/istate/proxy.py — the _wrap_recursive_decorator method and whether it should forward the item key as a path segment for wrap_mutable_attrs methods. Important Files Changed
Reviews (7): Last reviewed commit: "Clear mutable proxy context after cleanu..." | Re-trigger Greptile |
Merging this PR will degrade performance by 19.5%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | test_var_access[mutable_dataclass_list] |
206.7 ms | 256.7 ms | -19.5% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing harsh21234i:fix/mutable-proxy-async-context-6689 (78dec36) with main (46be552)
Footnotes
-
8 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
|
Addressed the review feedback in d8f12f3. Changes made:
Checks passed:
|
|
@codspeedbot fix this regression |
Fixes #6689
Summary
ImmutableMutableProxy
context
async with proxyTesting
test_state.py::test_immutable_mutable_proxy_async_context_manager tests/
units/test_state.py::test_rebind_mutable_proxy tests/units/istate/
test_proxy.py -q
upstream/main