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/5Safe to merge; the new async context manager path correctly acquires and releases the state lock in all exit scenarios and the three new test cases exercise all documented failure modes. The aenter_ok flag plus the unconditional _self_actx_state = None reset in the except block address the edge case raised in the previous review thread. Path tracking is consistent across all three access patterns, with the iter case deliberately rejected. No silent failure modes remain. No files require special attention. Important Files Changed
Reviews (5): Last reviewed commit: "Handle mutable proxy enter failures" | Re-trigger Greptile |
Merging this PR will degrade performance by 15.26%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | test_var_access[mutable_dataclass_list] |
206.6 ms | 251.5 ms | -17.86% |
| ❌ | test_var_access[mutable_dict] |
88.5 ms | 101.3 ms | -12.57% |
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 (7063e53) with main (86cf989)
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:
|
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