Skip to content

feat(session,cli): add compaction epoch APIs, summary parser, and ox sessions show - #1233

Merged
hakula139 merged 2 commits into
mainfrom
feat/session-compaction-epochs
Dec 6, 2026
Merged

hakula139 merged 2 commits into
mainfrom
feat/session-compaction-epochs

Conversation

@hakula139

Copy link
Copy Markdown
Member

Summary

  • Add SessionEpoch, SessionStore::list_session_epochs, SessionStore::load_epoch_messages, and SessionStore::fork_session_at_seq in ox-core using the existing compactions and messages tables with zero schema migration, and expose SessionSummary::compaction_count from list_session_summaries.
  • Add CompactionSummaryView and parse_compaction_summary in ox-core, and include an <archived-transcript session="<id>" seq="<start>..=<end>" command="ox sessions show <id> --full" /> pointer when persisting compaction summaries in Agent::compact and maybe_auto_compact.
  • Add ox sessions show <id> with --full, --epoch <n>, and --grep <pattern> flags, and document the new CLI subcommand and compaction epoch APIs in docs/reference/core/cli.md and docs/reference/core/sessions.md.
  • Update SessionSummary test fixture literals in crates/ox-tui/tests/common/preview_scenes.rs for the new compaction_count field (leaving TUI /resume grouping and transcript rendering for Part 2).

Test plan

  • nix develop -c run-hooks (all 20 hooks passed, including clippy, cspell, rustfmt, dprint, and markdownlint-cli2)
  • cargo test -p ox-core -p ox (62 ox unit tests, 290 ox-core unit tests, and 2 plugin_subprocess integration tests passed, with 4 opt-in live tests ignored)
  • cargo doc --no-deps (workspace documentation built with zero warnings)

Related

@hakula139 hakula139 added enhancement New capability area: session Touches session storage, listing, or resume area: cli Touches CLI argument parsing, subcommands, or headless execution labels Dec 6, 2026
@hakula139 hakula139 self-assigned this Dec 6, 2026
@codecov

codecov Bot commented Dec 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.19713% with 38 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/ox/src/sessions.rs 89.83% 19 Missing ⚠️
crates/ox-core/src/compaction.rs 92.07% 8 Missing ⚠️
crates/ox-core/src/session.rs 95.51% 7 Missing ⚠️
crates/ox-core/src/agent/compaction.rs 76.92% 3 Missing ⚠️
crates/ox/src/lib.rs 96.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@hakula139
hakula139 merged commit cd5dbf3 into main Dec 6, 2026
10 checks passed
@hakula139
hakula139 deleted the feat/session-compaction-epochs branch December 6, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Touches CLI argument parsing, subcommands, or headless execution area: session Touches session storage, listing, or resume enhancement New capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant