Commit 51b9053
fix: attach the bridge session before it can serve messages
The worker created its SyncBridgeGateway inside host.call and only
attached it to the sync gateway afterwards on the main thread. A
coordinator message arriving in that window (STATUS, CHANNEL_EXEC as
the first action on a fresh gateway) dispatched into a gateway whose
_trio_session was still None, so the reply fell through to the sync IO
stub and killed the session -- the whole test suite under pytest -n 12
showed this as freshly created gateways being dead on arrival. The
race predates the B.5 facade (ProtocolSession had the same window).
SyncBridgeGateway now attaches itself in __init__, before its serve
task can dispatch anything, and the redundant attach calls at the two
construction sites are gone.
Also drop the apipkg-era unknown-attribute test from the namespace
tests -- unknown attributes are plain Python module behaviour now.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 33decae commit 51b9053
3 files changed
Lines changed: 8 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
223 | 227 | | |
224 | 228 | | |
225 | 229 | | |
| |||
455 | 459 | | |
456 | 460 | | |
457 | 461 | | |
458 | | - | |
| 462 | + | |
459 | 463 | | |
460 | 464 | | |
461 | | - | |
462 | | - | |
463 | 465 | | |
464 | 466 | | |
465 | 467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
228 | 230 | | |
229 | 231 | | |
230 | | - | |
231 | | - | |
| 232 | + | |
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
0 commit comments