Skip to content

host: verify dispatch completion snapshot and guard freshness invariants #468

Description

@eggplantiny

Context

Derived from the 2026-04-25 and 2026-04-28 Claude Code usage review.

Claude Code observed stale-state behavior around dispatch listeners and rapid dispatch gating. Current SPEC expectations suggest the runtime should provide a fresh completed snapshot and evaluate guards against the current dequeued snapshot.

Current assessment

SPEC status: provided, but implementation/adapters may be non-compliant or easy to misuse.

dispatch:completed should carry the fresh terminal snapshot. Guard/admission checks for queued or rapid dispatch should evaluate against the current snapshot at processing/dequeue time, not against stale React state or enqueue-time projections.

Desired outcome

Add compliance coverage and implementation audit for dispatch completion and guard freshness invariants.

Acceptance criteria

  • Tests verify dispatch:completed includes the fresh terminal snapshot payload.
  • Tests verify rapid sequential dispatch uses current/dequeue-time state for dispatchability or guard evaluation.
  • Adapter examples avoid reading React-mediated stale state inside dispatch lifecycle listeners.
  • If implementation is already compliant, docs/tests make the intended usage unambiguous.

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

    P1Priority: high, next upbugSomething isn't workingpkg:hostOwning package: @manifesto-ai/hostpkg:sdkOwning package: @manifesto-ai/sdkstatus:triageStatus: needs active triage or decision

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions