Commit fa55403
test(adapter-utils): make the next sandbox flake diagnosable
`execution-target-sandbox` has failed twice in CI and not once in several
hundred local runs. This does not fix it. It makes the next occurrence carry
its own evidence, because a third unreproducible failure would teach nothing.
What is known. The observed signature was an empty stdout with exit code 0 -
the child exited cleanly having produced nothing, which is what a lost stdin
frame looks like from the test's side. Three mechanisms were checked and ruled
out rather than assumed:
- the helper resolving on `exit` rather than `close`, which would truncate
output: a 200-iteration probe produced 0 truncations, and the failure was
empty rather than partial anyway;
- the wrapper reporting exit before stdout drains: it already listens on
`close`, with a comment saying exactly why;
- frame writes racing each other: the stream wrapper's `writeEvent` is
synchronous and sequence-numbered.
What is left needs to be observed where it happens. Two candidates remain and
the runtime tree separates them: a stdin queue file still present means the
host wrote the frame and the wrapper never consumed it; an empty queue with no
output means it was consumed and the reply was lost on the way back. The
report prints that tree, both proxy streams, the exit code, and the elapsed
time - the last because the bridge and proxy run on 5s budgets that are
generous locally and tight on a runner sharing a box with 19 other lanes, and
a fast empty return is a different fault from one that nearly hit the ceiling.
Attached to all four round-trip exchanges, not only the one that failed; they
run the same protocol.
Verified by forcing the assertion to fail and reading what it prints, rather
than trusting that it would print something useful: a healthy run reports
`elapsedMs=330` against that 5000ms budget and an empty stdin queue, which is
the control the failing case will be read against.
Deliberately not raising the timeouts. That would probably make the symptom go
away, which is the reason not to do it blind - if there is a real ordering bug
in the bridge, a longer budget hides it.
adapter-utils typecheck clean; 44 pass, stable over five consecutive runs.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent add65ba commit fa55403
1 file changed
Lines changed: 86 additions & 11 deletions
Lines changed: 86 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
152 | 167 | | |
153 | 168 | | |
154 | 169 | | |
| |||
175 | 190 | | |
176 | 191 | | |
177 | 192 | | |
178 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
179 | 248 | | |
180 | 249 | | |
181 | 250 | | |
| |||
729 | 798 | | |
730 | 799 | | |
731 | 800 | | |
732 | | - | |
733 | | - | |
734 | | - | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
735 | 805 | | |
736 | 806 | | |
737 | 807 | | |
| |||
1026 | 1096 | | |
1027 | 1097 | | |
1028 | 1098 | | |
1029 | | - | |
1030 | | - | |
1031 | | - | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
1032 | 1103 | | |
1033 | 1104 | | |
1034 | 1105 | | |
| |||
1087 | 1158 | | |
1088 | 1159 | | |
1089 | 1160 | | |
1090 | | - | |
1091 | | - | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
1092 | 1164 | | |
1093 | 1165 | | |
1094 | 1166 | | |
| |||
1480 | 1552 | | |
1481 | 1553 | | |
1482 | 1554 | | |
1483 | | - | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
1484 | 1559 | | |
1485 | 1560 | | |
1486 | 1561 | | |
| |||
0 commit comments