Skip to content

Enforce bounded streaming, cancellation, and execution ownership #1046

Closed

Description

@privateip

Parent: #1041

Deliverable: bounded customer execution and result delivery that stop within the agreed failure bounds without automatically replaying interrupted diagnostics.

Propagate cancellation and absolute deadlines through admission, queueing, fan-out, node calls, and result delivery. Release execution capacity before waiting indefinitely on a downstream consumer. Keep stream buffering and forwarding bounded. The backend responds to cancellation from the customer service; detecting customer session revocation and owning durable session claims remain outside Galactic.

Work items:

  • Bound active streams, messages, total output, buffers, and write waits; enforce backpressure without silently dropping outcomes.
  • Cancel queued and active work on caller cancellation, stream failure, deadline expiry, shutdown, or loss of execution ownership.
  • Prevent automatic customer execution replay during forwarding failure, leader replacement, or stream interruption; preserve only retry behavior explicitly allowed by the contract.
  • Add fault tests for blocked consumers, disconnect during queueing and execution, API isolation, shutdown, stale owners, and leadership replacement.

Dependencies: #1042, #1044, #1045.

Acceptance: Measured tests demonstrate cancellation and resource release within the contract's numeric bounds. Slow consumers cannot retain node execution slots indefinitely or grow buffers without limit. Interrupted requests are not automatically restarted by a replacement owner. Backend output is neither persisted in Kubernetes status nor written to routine logs, and failed streams do not leave diagnostic work running past its bound.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions