Skip to content

Atomic multi-statement programs (stage then commit, one WAL record) #131

Closed

Description

@jsam

Multi-statement programs apply statement by statement. Validation failures continue while other statements commit (handler.rs:2668-2704), and a storage error aborts after earlier statements persisted. A gateway turn can apply a retraction and lose the replacing assert behind a success response. Gateway retries then duplicate data, and client cancellation can release the conversation lock mid-write.
Plan: parse and validate the whole program first, then apply all writes at one logical time under the KG lock as one WAL record, all or nothing. Builds on wp-write-effective-delta and the segmented WAL. Gateway follow-up: idempotency key per turn, and run the critical section in a spawned task.

Roadmap checkpoint — 2026-10-03

R2 delivers the engine transaction boundary; R3 adds durable gateway retry/cancellation semantics. This umbrella is assigned to R3 for whole-issue completion and must remain open until all four slices pass.

Activity

  1. added
    backendBackend/server related
    gatewayGateway API, conversation lifecycle and findings
    P0Immediate correctness, data-safety or live-credential blocker
    on Oct 3, 2026
  2. jsam commented on Oct 4, 2026

    @jsam
    ContributorAuthor

    Closing as delivered: atomic multi-statement programs shipped in #208 (T01 WAL envelope, T02 staged fact programs, T03 atomic rule and schema programs). The remaining T04 item, durable idempotency, is carried by #178. Tracker: #199.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Immediate correctness, data-safety or live-credential blockerbackendBackend/server relatedgatewayGateway API, conversation lifecycle and findings

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions