-
-
Notifications
You must be signed in to change notification settings - Fork 107
Closed
Labels
A-networkingArea: Networking, ring protocol, peer discoveryArea: Networking, ring protocol, peer discoveryE-mediumExperience needed to fix/implement: Medium / intermediateExperience needed to fix/implement: Medium / intermediateP-highHigh priorityHigh priorityT-bugType: Something is brokenType: Something is broken
Description
Problem
In test_ping_blocked_peers_solution (currently #[ignore]), gateway PUT times out waiting for response even though the operation completes successfully on the node side.
Symptoms
From test logs:
- Gateway PUT starts, caches state, forwards (to self), seeds contract
- Child auto-subscribe spawned (transaction 01KAA6JC...) for parent PUT (01KAA6J...)
- Inbound RequestPut processed without errors
- Child subscribe created via start_subscription_request
- Session actor logs: "No clients waiting for transaction result: 01KAA6JC..." (expected - client waits on parent)
- Parent PUT never delivers result to WebSocket client
- wait_for_put_response times out
Root Cause Hypothesis
When child subscribe completes, parent PUT is not marked completed/delivered. The completion flow:
- handle_op_result should place parent in root_ops_awaiting_sub_ops
- OpManager::completed(child) should remove parent from awaiting
- Spawn parent result delivery
Something in this flow is broken - either:
- Parent never makes it into root_ops_awaiting_sub_ops, OR
- Child completion doesn't trigger parent cleanup, OR
- Parent result delivery fails
Relevant Code
- crates/core/src/operations/put.rs - PUT operation handling
- crates/core/src/node/op_state_manager.rs - root_ops_awaiting_sub_ops tracking
- start_subscription_request - auto-subscribe creation
- OpManager::completed - child completion handling
Discovered During
Work on #2021 (blocked peers fix). This is a pre-existing bug - main branch fails the test even earlier (contract loading), but with that fixed, this PUT bug is exposed.
Testing
Run: cargo test test_ping_blocked_peers_solution -- --ignored --nocapture
Test is currently #[ignore] until this bug is fixed.
Impact
Blocks completion of #2021 test validation. May affect other PUT operations with child subscribes in production.
Metadata
Metadata
Assignees
Labels
A-networkingArea: Networking, ring protocol, peer discoveryArea: Networking, ring protocol, peer discoveryE-mediumExperience needed to fix/implement: Medium / intermediateExperience needed to fix/implement: Medium / intermediateP-highHigh priorityHigh priorityT-bugType: Something is brokenType: Something is broken
Type
Projects
Status
Done