refactor(storage): verify replaceable execution persistence - #5090
refactor(storage): verify replaceable execution persistence#5090MicroGery wants to merge 7 commits into
Conversation
Architecture review: moving contracts is not backend substitutabilityReviewed at Not yet. This PR improves dependency hygiene, but does not establish a replaceable persistence boundary. The description explicitly excludes a remote adapter, so the points below are gaps against that broader architecture goal, not claims of newly introduced local regressions. 1. The actual composition boundary still only admits the local implementation
A structurally conforming implementation is therefore insufficient: a separately constructed complete store fails authentication. Narrow Keep the lease/authentication protections. But let trusted composition construct an alternative backend and wrap it in the same authenticated lifecycle facade. If even a stateful in-memory implementation cannot enter through the supported composition path, S3-readiness is premature. 2. The hard part is preserving transactions, not extracting DTOsThe atomic Do not weaken these into CRUD to make an object-store adapter look easy. S3 provides strong consistency and conditional writes, not native multi-key transactions (AWS). Independent PUTs to per-Session objects cannot satisfy this contract. An S3-backed implementation needs an explicit commit protocol, such as immutable state plus a CAS-published manifest covering the transaction's full scope, or a transactional metadata service. A separate head per Session does not solve a cross-Session commit. 3. The extracted interface still carries the current implementation's organization
Some of these are legitimate capabilities, but exposing the current legacy/runtime index machinery obliges every new backend to understand that representation. Move rebuildable indexing/migration concerns behind the implementation where possible, and expose narrow consumer-facing capabilities. Also specify whether transcript subscriptions observe this instance's commits or remote writers. Numeric revisions and event ordinals are not inherently SQLite leaks. The concern is semantic responsibility, not cosmetic type purity. 4. The tests establish local correctness, not substitutabilityThe new contract tests instantiate the real local composition and inject failures with SQLite triggers. The dependency guards inspect imports. Both are useful; neither demonstrates that an independent implementation satisfies the same contract. The minimum convincing next step is:
Bottom line: this is a reasonable local dependency cleanup. It is not yet evidence of a clean, interchangeable storage architecture. Keep live transactional state, immutable object storage, and checkpoint publication as distinct contracts; do not conflate “can publish checkpoints to S3” with “can replace live SQLite with S3.” Static architecture review only; I did not rerun the tests. This review comment was prepared and posted with OpenAI Codex assistance. |
Follow-up architecture review at
|
Preserve existing leased SQLite domain transactions and verify WorkHub recovery across commit-before-dispatch process death. Fix copied attachment validation and durable replay identity. Generated-by: OpenAI Codex
Opt WorkHub into locked, metadata- and payload-verified reuse without weakening strict conversation-copy defaults. Cover duplicate delegations, pre-assignment failures, partial batches, reopen/concurrent replay and conflicting copies. Generated-by: OpenAI Codex
Compose an authenticated execution provider with the existing lease lifecycle. Keep Graph provisioning and Goal retirement in its transaction scope, implement an independent Memory reference, and run shared conformance plus a real Host replacement scenario. Generated-by: OpenAI Codex
Retain grouped Goal and Interaction backend bindings until successful group shutdown. Validate copied runtime ledgers and rebuild Memory Tool projections atomically. Preserve approved sandbox profiles through configuration changes and temporary permission modes. Add shared Local/Memory regressions for child lifecycle, copy identity and replay, recovery evidence, sandbox authority and metadata conflicts. Generated-by: OpenAI Codex
Adapt real Host recovery tests to admitted coordination Turns, bind delegated text and target attachments in the reference provider, and preserve recoverable catalog role reads after rebasing main. Generated-by: OpenAI Codex
Hide preparing conversation copies from catalog queries while preserving recovery access. Use one ASCII Session ID comparator for ordering and cursor advancement, with shared Local and Memory regression coverage. Generated-by: OpenAI Codex
e3ae678 to
bcc0ca2
Compare
Follow-up review at
|
Match Local catalog semantics by restricting subagent parentage only when explicitly requested. Add shared Local and Memory list and pagination coverage for two parent Sessions and their children, including empty filters, unmatched parents, and complete traversal. Generated-by: OpenAI Codex
Summary
Refs #2370. This is PR1 of the 2026-09-09 local Runtime follow-up, not the earlier SessionRepository PR. It now takes responsibility for demonstrating the live-state persistence boundary, not only extracting interfaces.
Supported composition, with the existing authority checks
ExecutionPersistenceProvider; the default remains Local. Clients, model output and per-Session options cannot select a backend.Independent reference backend and shared evidence
Retained Local recovery and attachment fixes
create_newanddelegate_existing, with and without attachments.See the execution persistence boundary note for composition, transaction ownership, lifecycle and limitations.
Explicit limits
Verification
macOS, Node 24.18.0:
AI use
OpenAI Codex assisted with implementation, tests, documentation, verification and PR preparation. Implementation commits carry
Generated-by: OpenAI Codex. Independent human review and the merge decision remain required.Checklist
Does this PR entail a change in behavior?