Commit 9e4144e
committed
🤖 fix: update tb.lock before resume to apply concurrency changes immediately
Addresses Codex feedback: Previously, concurrency adjustments were written to
tb.lock AFTER a burst completed, but the next resume command would read the
tb.lock at the START of the burst. This created a 1-burst delay where the
old concurrency was used even after adjustment.
Now updates tb.lock BEFORE calling 'terminal-bench runs resume', ensuring
the new concurrency takes effect immediately. This is critical when the system
is overloaded - we need to reduce concurrency on the very next burst, not one
burst later.
Flow before fix:
Burst N completes → adjust_concurrency() → write tb.lock
Burst N+1 starts → resume reads OLD tb.lock value
Flow after fix:
adjust_concurrency() completes
Burst N+1 starts → write tb.lock → resume reads NEW tb.lock value1 parent fbc0b46 commit 9e4144e
File tree
2 files changed
+17
-19
lines changed- benchmarks/terminal_bench
2 files changed
+17
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| |||
124 | 128 | | |
125 | 129 | | |
126 | 130 | | |
127 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
128 | 136 | | |
129 | 137 | | |
130 | 138 | | |
| |||
166 | 174 | | |
167 | 175 | | |
168 | 176 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | 177 | | |
174 | 178 | | |
175 | 179 | | |
| |||
184 | 188 | | |
185 | 189 | | |
186 | 190 | | |
187 | | - | |
188 | | - | |
189 | | - | |
| 191 | + | |
190 | 192 | | |
191 | 193 | | |
192 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
170 | | - | |
171 | | - | |
| 169 | + | |
172 | 170 | | |
173 | 171 | | |
174 | 172 | | |
| |||
250 | 248 | | |
251 | 249 | | |
252 | 250 | | |
253 | | - | |
254 | | - | |
255 | | - | |
| 251 | + | |
256 | 252 | | |
257 | 253 | | |
258 | 254 | | |
| |||
0 commit comments