Commit c0e45c4
fix: race condition in hop-by-hop routing where state saved after send
The operation state was being pushed AFTER sending the forwarded message.
In cases where the remote peer responded quickly, the response could arrive
before the state was saved, causing load_or_init to fail to find the
operation (returning OpNotPresent).
This caused flaky failures in test_put_contract_three_hop_returns_response
in CI environments where timing was faster than local testing.
Fix: Push state to op_manager BEFORE sending the message to ensure the
state is always available when the response arrives.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 4621744 commit c0e45c4
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
173 | 175 | | |
| 176 | + | |
174 | 177 | | |
175 | 178 | | |
176 | 179 | | |
| |||
0 commit comments