Commit 2124bfa
test(e2e): make overflow-recovery version-agnostic (opencode 1.16 compaction change)
opencode 1.16 commit 7e09660c3 (#30749, 'respect disabled auto compaction on
overflow') changed the post-overflow path: when compaction.auto=false (the Magic
Context default), an overflow now errors the turn and goes idle instead of
setting needsCompaction. Pre-1.16, needsCompaction triggered an in-turn
compaction → a second transform pass → our emergency recovery (95% bump →
historian → clear flag) completed SAME turn. On 1.16 there is no second in-turn
pass, so recovery fires on the user's NEXT prompt.
The plugin is correct on both versions — overflow detection persists
needs_emergency_recovery + detected_context_limit on the overflow turn, and the
transform.ts:519 consumer bumps to 95% and runs the recovery historian on the
next transform pass. Verified live on 1.16.0: after the overflow turn
needs_emergency_recovery=1/historian=0, and after a follow-up turn
needs_emergency_recovery=0/historian=1/compartment written (recovered=YES).
The TEST, however, asserted same-turn recovery (an opencode <=1.15 assumption),
so it failed on 1.16 — which is why CI/release host-e2e was pinned to 1.15.4 and
I had to downgrade locally to release. That pin was masking a stale test, not a
plugin defect. Fixed: assert detection on the overflow turn, then drive a
follow-up turn and assert recovery via persisted state. Verified 2/2 on BOTH
1.15.4 and 1.16.0; full OpenCode host suite 44/44 on 1.16.0.
Co-authored-by: Alfonso [Magic Context] <288211368+alfonso-magic-context@users.noreply.github.com>1 parent 56ca95e commit 2124bfa
1 file changed
Lines changed: 57 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
28 | 37 | | |
29 | 38 | | |
30 | 39 | | |
| |||
174 | 183 | | |
175 | 184 | | |
176 | 185 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
184 | 200 | | |
185 | 201 | | |
186 | 202 | | |
| |||
189 | 205 | | |
190 | 206 | | |
191 | 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 | + | |
192 | 240 | | |
193 | 241 | | |
194 | 242 | | |
| |||
210 | 258 | | |
211 | 259 | | |
212 | 260 | | |
213 | | - | |
| 261 | + | |
214 | 262 | | |
215 | 263 | | |
216 | 264 | | |
| |||
234 | 282 | | |
235 | 283 | | |
236 | 284 | | |
237 | | - | |
| 285 | + | |
238 | 286 | | |
239 | 287 | | |
240 | 288 | | |
| |||
0 commit comments