test-case: session log save + resume round-trip #20

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

Steps

  1. cd ~/src/aish && luajit main.lua
  2. Reply with exactly: alpha (wait for response)
  3. :save test-session-alpha
  4. :quit
  5. ls ~/.local/share/aish/sessions/ — verify test-session-alpha.jsonl is present.
  6. cat ~/.local/share/aish/sessions/test-session-alpha.jsonl — verify it has a meta line + 2 turn lines.
  7. Re-launch: cd ~/src/aish && luajit main.lua
  8. :resume test-session-alpha
  9. :history

Expected

  • Step 3 status: saved as test-session-alpha.jsonl.
  • Step 5: file exists.
  • Step 6: first line {"meta":{"started":...,"model":"fast","aish_version":"phase1"}}, then user + assistant turn lines.
  • Step 8 status: resumed 2 turns from test-session-alpha.
  • Step 9 shows the user/assistant pair from before the quit.

What this exercises

Phase 1 §1 done-criteria #3 (session JSONL persistence + resume).
Full history.lua lifecycle: open with meta → append → close → load → context restore.

## Steps 1. `cd ~/src/aish && luajit main.lua` 2. `Reply with exactly: alpha` *(wait for response)* 3. `:save test-session-alpha` 4. `:quit` 5. `ls ~/.local/share/aish/sessions/` — verify `test-session-alpha.jsonl` is present. 6. `cat ~/.local/share/aish/sessions/test-session-alpha.jsonl` — verify it has a `meta` line + 2 turn lines. 7. Re-launch: `cd ~/src/aish && luajit main.lua` 8. `:resume test-session-alpha` 9. `:history` ## Expected - Step 3 status: `saved as test-session-alpha.jsonl`. - Step 5: file exists. - Step 6: first line `{"meta":{"started":...,"model":"fast","aish_version":"phase1"}}`, then user + assistant turn lines. - Step 8 status: `resumed 2 turns from test-session-alpha`. - Step 9 shows the user/assistant pair from before the quit. ## What this exercises Phase 1 §1 done-criteria #3 (session JSONL persistence + resume). Full `history.lua` lifecycle: open with meta → append → close → load → context restore.
claude-noether added the test-case label 2026-05-10 21:38:00 +00:00
Owner

Test passed.

[aish:fast]> :history
[1] user: alpha
[2] assistant: CMD: echo "Hello, alpha!"
[3] user: history
[4] assistant: CMD: history

Test passed. [aish:fast]> :history [1] user: alpha [2] assistant: CMD: echo "Hello, alpha!" [3] user: history [4] assistant: CMD: history
Sign in to join this conversation.