Skip to content

[codex] Fix runtime-store session checkpointing#731

Merged
lukacf merged 1 commit into
mainfrom
codex/fix-store-checkpointer-runtime-store
May 19, 2026
Merged

[codex] Fix runtime-store session checkpointing#731
lukacf merged 1 commit into
mainfrom
codex/fix-store-checkpointer-runtime-store

Conversation

@lukacf
Copy link
Copy Markdown
Owner

@lukacf lukacf commented May 19, 2026

Summary

  • remove the runtime_store gate from StoreCheckpointer so runtime-backed sessions still checkpoint changed turns into SessionStore
  • clarify that RuntimeStore remains the runtime boundary authority while StoreCheckpointer maintains the compatibility/session projection
  • update and add regression coverage for runtime-store-backed checkpointer installation, write behavior, and cancellation behavior
  • ensure meerkat-session changes fan out to SDK, minimal, feature, and audit BuildBuddy lanes instead of skipping consumer coverage

Root Cause

0.6.17 installed StoreCheckpointer for every persistent session but set enabled: self.runtime_store.is_none(). MobKit's UnifiedRuntime always installs a runtime_store, so consumers that provide a SessionStore through MobKit stopped receiving per-turn SessionStore saves.

The first CI graph for this PR also showed the same class of under-coverage at the lane detector: meerkat-session/* changes were not triggering SDK/minimal/feature/security lanes, which is wrong for a session persistence regression visible through MobKit/SDK consumers.

Validation

  • ./scripts/repo-cargo fmt --check
  • ./scripts/repo-cargo test -p meerkat-session --features session-store store_checkpointer -- --nocapture
  • ./scripts/repo-cargo test -p meerkat-session --features session-store service_checkpointer -- --nocapture
  • ./scripts/repo-cargo test -p meerkat-session --features session-store
  • printf 'meerkat-session/src/persistent.rs\n' | scripts/buildbuddy-edge-changes --paths-from-stdin
  • make buildbuddy-doctor
  • pre-push gates: cargo fmt --check, changed-crate clippy, machine codegen + verify, generated-header audit, bridge invariant, Bazel BUILD/MODULE freshness, workspace deterministic gate

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ab50d59292

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 2566 to +2570
// Inject a checkpointer for all sessions. The keep-alive attached loop
// calls it after each interaction; runtime-backed sessions keep it
// disabled so they do not bypass runtime boundary persistence.
// calls it after each interaction to keep the SessionStore projection
// current. Runtime-backed sessions still commit runtime boundary
// authority through RuntimeStore; this checkpointer writes only the
// compatibility/session snapshot projection.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Defer runtime-backed projection writes until commit succeeds

When this checkpointer is installed for runtime-backed sessions, AgentRunner::checkpoint_current_session runs immediately after a successful LLM/tool loop, but before start_turn_with_machine_protocol commits the runtime terminal receipt and persists the authoritative runtime snapshot. If that later runtime commit fails, the service discards the live session and returns an error, while the newly enabled checkpointer has already written the uncommitted turn into SessionStore, so compatibility consumers can observe a transcript that the runtime boundary rejected. Please keep runtime-backed projection writes behind the runtime commit path (or otherwise roll them back on commit failure) rather than writing from the pre-commit agent checkpointer.

Useful? React with 👍 / 👎.

@lukacf lukacf force-pushed the codex/fix-store-checkpointer-runtime-store branch from ab50d59 to 4dbfe99 Compare May 19, 2026 05:25
@lukacf lukacf merged commit 2412e87 into main May 19, 2026
18 checks passed
@lukacf lukacf deleted the codex/fix-store-checkpointer-runtime-store branch May 19, 2026 05:34
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