Skip to content

[Streaming][S1] Define ordered Array-block stream contract and bounded backpressure #48

Description

@code-tc

Objective

Define and implement the backend-neutral asynchronous contract for a fallible stream of Array blocks before adding fused CubeCL execution.

Contract

Specify stream dimensions, compatible dtype/rank/shape variation, input/output ordering, partial progress, upstream/downstream errors, cancellation, consumer drop, maximum in-flight blocks and host-memory accounting.

Acceptance criteria

  • Public API and compatibility/version policy are documented.
  • Slow-consumer tests prove bounded buffering and effective backpressure.
  • Ordering and terminal/error semantics are deterministic.
  • Cancellation and downstream drop stop upstream work and release buffers.
  • An incompatible block returns a typed error identifying its sequence and violated metadata.
  • Sequential host execution is the independent result oracle.

Parent: #38

Tembo execution contract

automation:
  eligible: true
  executor_profile: tembo
  readiness: blocked
  primary_repository: TinyChain-Inc/ha-ndarray
  base_branch: main
  writable_scope:
    - src/stream/**
    - src/array.rs
    - src/buffer.rs
    - tests/stream/**
    - docs/**
  prerequisites:
    - "#41"
  concurrency_group: array-stream-contract
  required_commands:
    - "cargo fmt --all -- --check"
    - "cargo test --no-default-features --features cubecl"
    - "cargo test --all-features"
  evidence:
    cpu_conformance: required
    accelerator_conformance: not-required
    actual_browser: not-required
    benchmark_report: not-required
    exact_hardware_and_driver_identity: not-required
  external_actions: none
  draft_pr_only: true
  completion_authority: human
  budget:
    size: large
    max_revisions: 3
    max_wall_minutes: 180

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions