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 /check.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 'check.lua')
| -rw-r--r-- | check.lua | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -30,6 +30,8 @@ local function check() {name='fixture.echo',description='Echo',input_schema_json='{"type":"object"}'}}} local _,none=catalog(req,{}); assert(#none==0) local by,one=catalog(req,{'std.read'}); assert(#one==1 and by.std__read and not by.fixture__echo) + local configure=dofile(root..'/extensions/antigravity-acp.lua').configure + assert(not pcall(configure,{providers={antigravity={protocol='antigravity-acp',save_session=true}}})) local cfg, data = home .. '/.panto', home .. '/.local/share/panto' assert(run('/bin/mkdir', {'-p', cfg .. '/extensions', data}) == 0) assert(run('/bin/cp', {'-cR', assert(os.getenv('HOME')) .. '/.local/share/panto/rocks', data .. '/rocks'}) == 0) @@ -42,7 +44,6 @@ local function check() [providers.antigravity] protocol="antigravity-acp" -save_session=true ]]) write(cfg .. '/models.toml', '[antigravity.fast]\nmodel="gemini-test"\ninput=10.0\noutput=10.0\ncache_read=1.0\ncache_write=10.0\n') write(cfg .. '/SYSTEM.md', 'Short answers.') @@ -105,6 +106,7 @@ end} if tui~=0 then error('TUI check failed: '..read(home..'/screen'):gsub('\27%[[0-9;?]*[A-Za-z]', ''):sub(-3500)) end assert(uv.fs_stat(home..'/thinking-rendered'),'ACP thought did not reach the native thinking component') local agents = assert(uv.fs_scandir(google .. '/config/agents')); assert(not uv.fs_scandir_next(agents), 'Generated agent left in private profile') + assert(not uv.fs_stat(data .. '/state.toml') or not read(data .. '/state.toml'):find('antigravity', 1, true), 'state.toml polluted with session checkpoint') local screen = read(home .. '/screen'):gsub('\27%[[0-9;?]*[A-Za-z]', '') assert(screen:find('1.3k/1M ctx',1,true),'expected ACP context occupancy, not summed turn inputs') assert(screen:find('3.4k tok',1,true),'expected primary and steering usage counted exactly once') |
