Repository navigation
Release object tree lock before awaiting dispatch - #53
Conversation
Co-authored-by: Medulla <medulla@tinyhumans.ai>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (3)
✨ Finishing Touches
Comment |
…se-bus # Conflicts: # crates/tinybus/src/connection.rs # crates/tinybus/src/service/tree.rs
Tiny Sweeper reviewTiny Sweeper reviewed this change across 5 lane(s) and found 0 active actionable finding(s). The pull request scopes the object-tree read guard in the dispatch path so it is released before `ObjectTree::invoke` is awaited, letting method callbacks mutate the tree (serve or unserve paths) while another call is in flight; a new in-crate regression test covers serving and unserving during a call. All lanes judged the change safe to merge, with no unanswered items. State: Incomplete Review snapshot
Completeness: Incomplete Features
TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. FindingsNo active actionable findings. Could not review: crates/tinybus/src/connection.rs, crates/tinybus/src/connection_tests.rs Before merge
How this fits togetherflowchart LR
n0["brokered_pair<br/>changed"]:::changed
n1["clone"]:::impacted
n2["call"]:::impacted
n3["path"]:::impacted
n4["serve_at"]:::impacted
n5["pair"]:::impacted
n0 -->|calls| n1
n0 -->|calls| n3
n0 -->|calls| n4
n2 -->|calls| n1
n2 -->|calls| n3
n2 -->|calls| n4
n5 -->|calls| n3
n5 -->|calls| n4
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
There was a problem hiding this comment.
tinysweeper found nothing blocking. Approving.
$0.0053 · 290,789 in / 55,927 out · 21,568 cached (7%) · ladder/vectors-oai3, deepseek-v4.1-flash, glm-5.3-flash · 165 embedded
critique: $0.0016 · 132,860 in / 11,971 out · 12,608 cached (9%) · deepseek-v4.1-flash, glm-5.3-flash
security: $0.0010 · 82,338 in / 5,555 out · 1,792 cached (2%) · glm-5.3-flash, deepseek-v4.1-flash
tests: $0.0013 · 48,507 in / 19,477 out · 7,168 cached (15%) · deepseek-v4.1-flash
description: $0.0012 · 24,313 in / 15,516 out · 0 cached (0%) · deepseek-v4.1-flash
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: crates/tinybus/src/connection.rs, crates/tinybus/src/connection_tests.rs.
$0.0038 · 217,304 in / 53,260 out · 77,184 cached (36%) · ladder/vectors-oai3, deepseek-v4.1-flash, glm-5.3-flash · 165 embedded
critique: $0.0008 · 42,584 in / 11,908 out · 10,240 cached (24%) · deepseek-v4.1-flash
security: $0.0012 · 106,892 in / 14,244 out · 53,632 cached (50%) · deepseek-v4.1-flash
tests: $0.0014 · 50,974 in / 21,595 out · 13,312 cached (26%) · deepseek-v4.1-flash
description: $0.0003 · 13,978 in / 4,291 out · 0 cached (0%) · glm-5.3-flash, deepseek-v4.1-flash
Async method dispatch kept the connection's object-tree read guard alive while awaiting the service method. A method that served or removed an object on that same connection then waited forever for the write lock. Dispatch now resolves and retains the selected interface under the read lock, releases the guard, and performs member/confidentiality checks and the call afterward.
The regression uses a real MemoryBus proxy to serve a second object from a method, call it, remove it from another method, and verify the removed path returns the existing wire-level UnknownObject error.
Validation: TinyBus library tests pass (274/274); the focused mutation regression passes. The same regression failed before the fix with a 250 ms timeout at Serve.
cargo fmt --all -- --checkandgit diff --checkpass.Summary by CodeRabbit