diff options
| author | t <t@tjp.lol> | 2026-12-03 08:44:58 -0700 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-12-04 13:53:47 -0700 |
| commit | f1f1c5bc66ea1d6019f84050aa21e4476330a719 (patch) | |
| tree | 0ba0fe085a704b03e92d9cdcd29ddf089c7064dd /tests/fake-agy.lua | |
| parent | ea36b1af7dc5e553b26c46b7dda2cb0dd5bcc2b7 (diff) | |
Preserve ACP sessions across Esc and resume unconditionally
Killing agy on Esc and defaulting save_session off forced cold ACP restarts
that re-billed the flattened conversation transcript as uncached input.
Storing session checkpoints in Panto's global state.toml also leaked
unbounded per-session keys into UI preferences.
Send ACP session/cancel on Esc with a non-extendable 3s SIGKILL fallback and
reconcile post-cancel prefix hashes so follow-up prompts and /proceed keep
the warm session. Remove save_session and panto.ext.state usage, tracking
each ACP session's valid resume tip atomically under the isolated Google
profile instead.
Breaking: [providers.<name>].save_session is rejected; native session resume
is now always enabled.
Diffstat (limited to 'tests/fake-agy.lua')
| -rw-r--r-- | tests/fake-agy.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/fake-agy.lua b/tests/fake-agy.lua index 4f76d8d..b1537ad 100644 --- a/tests/fake-agy.lua +++ b/tests/fake-agy.lua @@ -141,11 +141,20 @@ elseif resumed then local resumed_prompt=prompt('resume'); check_relay(); finish if current~='boundary workflow notice' then assert(text:find('[Assistant]: primary-tool-ok',1,true)) end if current=='branch-probe' then finish(q,'branch-seed-ok'); finish(prompt('warm-probe'),'warm-after-seed-ok') + local esc=prompt('esc-probe') + send({method='session/update',params={sessionId='test-session',update={ + sessionUpdate='agent_message_chunk',content={type='text',text='esc-window-open'}, + }}}) + local cancel=request('session/cancel'); assert(cancel.id==nil and cancel.params.sessionId=='test-session') + reply(esc,{stopReason='cancelled'}) + finish(prompt('after-esc-probe'),'after-esc-ok') reply(prompt('cancel-probe'),{stopReason='cancelled'}) elseif current=='boundary workflow notice' then assert(text:find('[User]: boundary steer',1,true) and text:find('[Tool result',1,true)); finish(q,'proceed-recovered-ok') else - assert(current=='cold-probe' and text:find('[Assistant]: warm-after-seed-ok',1,true)); finish(q,'cold-resume-ok') + assert(current=='cold-probe' and text:find('[Assistant]: warm-after-seed-ok',1,true) + and text:find('[User]: esc-probe',1,true) and not text:find('esc-window-open',1,true) + and text:find('[Assistant]: after-esc-ok',1,true)); finish(q,'cold-resume-ok') end else q = prompt('hello') |
