Skip to content

feat(session): preserve finalized session evidence#20

Merged
msmps merged 1 commit into
mainfrom
feat/session-tombstones
Jul 11, 2026
Merged

feat(session): preserve finalized session evidence#20
msmps merged 1 commit into
mainfrom
feat/session-tombstones

Conversation

@msmps

@msmps msmps commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • retain bounded in-memory tombstones after natural exit and explicit kill
  • preserve exit metadata, launch settings, final full screen, output completeness, and the last 64 KiB of raw output
  • keep tombstones separate from live sessions with a 100-entry cap and 10-minute TTL
  • allow snapshot and logs to recover final evidence while live-only commands return SESSION_EXITED
  • preserve legacy protocol compatibility with a version-gated error fallback
  • document the exited-session evidence window

Lifecycle guarantees

  • natural exit transitions atomically from live discovery to finalized evidence
  • tombstones do not count toward live-session limits or daemon idle activity
  • live names resolve before tombstoned names and tombstoned names may be reused
  • expired, evicted, unknown, and daemon-restarted sessions receive honest recovery guidance

Verification

  • cargo build
  • cargo build --release
  • cargo test --all
  • cargo clippy --all --benches --tests --examples --all-features -- -D warnings
  • cargo fmt --all -- --check
  • isolated manual validation recovered final screen and raw output after exit code 7, then confirmed input returned SESSION_EXITED

@msmps
msmps merged commit ccf1e36 into main Jul 11, 2026
6 checks passed
@msmps
msmps deleted the feat/session-tombstones branch July 11, 2026 16:48
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.

1 participant