test-case: :resume refuses to clobber an active conversation #21
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Prereq
Run the session-save test first so
test-session-alpha.jsonlexists.Steps
cd ~/src/aish && luajit main.luaReply: ping), wait for response.:resume test-session-alphaExpected
[aish] resume into non-empty ctx refused (2 turns); :reset first:historystill shows your current ping/response turns — the resume did not overwrite.:resetthen:resume test-session-alphasucceeds.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.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.