test-case: :resume refuses to clobber an active conversation #21

Closed
opened 2026-05-10 21:38:00 +00:00 by claude-noether · 1 comment
Collaborator

Prereq

Run the session-save test first so test-session-alpha.jsonl exists.

Steps

  1. cd ~/src/aish && luajit main.lua
  2. Ask anything (e.g., Reply: ping), wait for response.
  3. :resume test-session-alpha

Expected

  • Status: [aish] resume into non-empty ctx refused (2 turns); :reset first
  • :history still shows your current ping/response turns — the resume did not overwrite.
  • Recovery path: :reset then :resume test-session-alpha succeeds.

What this exercises

The review-pass guard added in commit 7d62eb5 — silent ctx clobbering was the Q15-default; this test makes sure the guard fires.

## Prereq Run the session-save test first so `test-session-alpha.jsonl` exists. ## Steps 1. `cd ~/src/aish && luajit main.lua` 2. Ask anything (e.g., `Reply: ping`), wait for response. 3. `:resume test-session-alpha` ## Expected - Status: `[aish] resume into non-empty ctx refused (2 turns); :reset first` - `:history` still shows your current ping/response turns — the resume did **not** overwrite. - Recovery path: `:reset` then `:resume test-session-alpha` succeeds. ## What this exercises The review-pass guard added in commit 7d62eb5 — silent ctx clobbering was the Q15-default; this test makes sure the guard fires.
claude-noether added the test-case label 2026-05-10 21:38:00 +00:00
Owner

mfritsche@noether:~/src/aish$ cd ~/src/aish && luajit main.lua
aish: loaded config from ./config.lua
[aish:fast]> Reply: ping
CMD: ping 8.8.8.8
execute 'ping 8.8.8.8'? [y/N] y
─── exec output ───
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=118 time=2.35 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=118 time=2.02 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=118 time=1.95 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=118 time=1.99 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 1.950/2.077/2.348/0.158 ms
─── exit 130 ───
[aish:fast]> :resume test-session-alpha
[aish] resume into non-empty ctx refused (2 turns); :reset first
[aish:fast]> :history
[1] user: Reply: ping
[2] assistant: CMD: ping 8.8.8.8

Testcase passed.

mfritsche@noether:~/src/aish$ cd ~/src/aish && luajit main.lua aish: loaded config from ./config.lua [aish:fast]> Reply: ping CMD: ping 8.8.8.8 execute 'ping 8.8.8.8'? [y/N] y ─── exec output ─── PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=118 time=2.35 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=118 time=2.02 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=118 time=1.95 ms 64 bytes from 8.8.8.8: icmp_seq=4 ttl=118 time=1.99 ms ^C --- 8.8.8.8 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 1.950/2.077/2.348/0.158 ms ─── exit 130 ─── [aish:fast]> :resume test-session-alpha [aish] resume into non-empty ctx refused (2 turns); :reset first [aish:fast]> :history [1] user: Reply: ping [2] assistant: CMD: ping 8.8.8.8 Testcase passed.
Sign in to join this conversation.