Skip to content

Checkpoint completed transcript turns during live sessions - #71

Merged
R055LE merged 2 commits into
mainfrom
live-transcript-checkpoints
Oct 1, 2026
Merged

R055LE merged 2 commits into
mainfrom
live-transcript-checkpoints

Conversation

@R055LE

@R055LE R055LE commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Changes

  • Checkpoint each completed command during a non-ephemeral live session using the existing session ID and Room replacement transaction.
  • Serialize checkpoint and final writes. Capture checkpoints after acquiring the save lock and reject a closed or replaced shell context, so an older save cannot overwrite final history.
  • Keep unfinished commands out of live checkpoints. Normal finalization can still retain them with their disconnected status.
  • Label archive timestamps as saved times and explain the crash boundary in History. Keep the existing database schema and retention limits.
  • Add an emulator-only real SSH runner that kills the production app process while a second command is running, then verifies history from a fresh application process.

Fixes #49.

Validation

  • The new live-checkpoint regression failed on the old finalization-only implementation, then passed with this change.
  • ./gradlew test lint assembleDebug assembleDebugAndroidTest: passed. After the fixture test correction, the exact CI command ./gradlew --no-daemon test lint assembleDebug assembleRelease also passed with 110 app JVM tests. The three opt-in JVM fixture cases were skipped in the routine run.
  • ./scripts/verify-release-shrinker-contracts.sh: passed.
  • Focused connectedDebugAndroidTest: all five Room retention/reopen and History UI tests passed on API 35.
  • ./fixtures/openssh/test-android-transcript-process-death.sh: passed both durable and ephemeral cases against real OpenSSH. Each preparation was still connected with an unfinished command when force-stopped. Fresh processes reopened disconnected with only the completed durable turn, or no ephemeral history.
  • ./fixtures/openssh/test-android-structured.sh: all three production SSH tests passed, covering persistent shell state, replies, encrypted key reload, raw terminal behavior, interruption, and bounded output.
  • Shell syntax and git diff --check: passed.
  • CI on the corrected head: passed, including the full Android instrumented suite.

The first CI run hit a two-second timeout in the ephemeral unit test. The archive tests now wait for recorded fake client sends before injecting server lifecycle markers, and allow five seconds for those waits under CI build load. This follow-up changes only tests. The missing CI failure reports are tracked separately in #72.

Limits

Only completed turns are checkpointed while connected. A crash can lose an unfinished command and a database write still in flight. No live SSH connection or shell state is resumed after process death. Signed phone acceptance remains separate.

@R055LE
R055LE merged commit c0aa9f9 into main Oct 1, 2026
1 check passed
@R055LE
R055LE deleted the live-transcript-checkpoints branch October 1, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Checkpoint completed transcript turns during a live session

1 participant