Skip to content

P1: Implement idempotent ordered ManagedSession inbound events #52

Description

@wms2537

Parent

Dependency

Scope

Add authenticated-source, idempotent inbound ManagedSession events with durable canonical receipt order and deterministic dispatch classification.

Required behavior

  • Source identity is bound to the authenticated caller/configured connection, never self-granted by payload.
  • Deduplication uses tenant + authenticated source + event ID and stores a canonical payload digest.
  • Exact replay returns the original receipt; conflicting reuse returns 409 event_conflict.
  • Concurrent first deliveries serialize and assign one monotonic session receivedSequence.
  • current-run events match a durable wait contract and consume once; future-run events queue without interrupting the active Run.
  • Large input transfer uses immutable digest-bearing snapshot references; signed URLs are not durable IDs.

Public seams under test

  • authenticated POST /v1alpha1/sessions/:id/events
  • ordered GET /v1alpha1/sessions/:id/events
  • session Run list/state after queued event dispatch

Acceptance criteria

  • duplicate and conflicting payload behavior is covered through HTTP
  • concurrent receipt order is gap-free and deterministic
  • unknown event types fail closed
  • payload and snapshot-reference bounds are enforced
  • crash/retry tests preserve one logical effect and canonical order
  • exact-commit CI, independent review, and post-merge main evidence pass

Activity

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

    enhancementNew feature or requestready-for-agentScoped, dependency-declared work ready for an implementation agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions