Skip to content

Gateway: durable turn idempotency and message-index reservation #178

Closed

Description

@jsam

Problem

A process-local conversation lock cannot protect retries across gateway instances or cancellation during a partially applied turn. Turn identity and message indexes must commit atomically with facts.

Evidence

Source: 5c1f313379a5cb2995a43a66ddba0b5cc9798b7f (inspected 2026-10-03). These are source findings; the acceptance scenarios below still need implementation and execution.

Acceptance criteria

  • Store the turn idempotency key/result and monotone message indexes in the same engine transaction as its facts.
  • Reserve/commit in short stages around extraction; do not hold the conversation lock across the model call. Own cancellation/shutdown/drain behavior with bounded tasks.
  • Test two gateway instances retrying the same turn and cancellation before/during/after commit; exactly one result, unique indexes and no lost replacement.
  • Use the per-tenant engine deployment model; shared-gateway isolation inputlayer/inputlayer-platform#18 is not a prerequisite. Pass Performance: baseline and mandatory pre-PR regression pipeline #163 under same- and different-conversation contention.

Delivery

Plan item: T04. R3 - Streaming SDK subscriptions.

Dependencies / related work: #170; contributes #131, inputlayer/inputlayer-symbolic#142 and inputlayer/inputlayer-symbolic#150.

Contributes to #131; completing this slice alone does not close the broader issue.

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

    Moved to Later / deferred. Durable idempotency for gateway turns; revisited when the gateway milestone's details arrive from the captain.

    The neurosymbolic decision layer plan narrows the roadmap to two milestones: Engine production readiness (current focus), then Gateway neural integration (Jev, CLM, Laya) (#266). This issue stays open and can be pulled back in. 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