interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

[OSH][P0] AIENOS-NATIVE-PIPE-1: capability-controlled bounded native byte pipes

Closed · #428 · open 2026-10-18 21:54 UTC · closed 2026-10-31 02:21 UTC (reason completed)

Imported from GitHub aien-dev/aienux#428, by drakestapleton

drakestapleton wrote on 2026-10-18 21:54 UTC

Goal

Make pipes a native AIENOS execution primitive, not merely OSH syntax: two independently scheduled operations can exchange ordered bytes without intermediate files. This issue owns the bounded stream primitive only; task execution and shell dispatch are separate child issues.

Scope: OSH workstream architecture #158; P0 proposed within that finite workstream, NOT A MASTER PLAN or a change to CURRENT_EXECUTION_PLAN.md.

Verified source baseline (2026-10-18)

Work

  • Reuse capability-table/IPC ownership and generation checks; introduce a distinct pipe/byte-stream abstraction (do not silently reinterpret ck_msg queues as byte pipes).
  • Expose PIPE_CREATE, bounded STREAM_READ/WRITE, STREAM_CLOSE, and necessary endpoint transfer/duplication through versioned platform ops; distinguish read versus write capabilities.
  • Define stream epoch, reader/writer reference lifetimes, capability attenuation and revocation, and wakeups on close/revoke/cancel. Validate authority at point of effect, not only at parse/connection time.
  • Implement FIFO byte ordering, partial I/O, a finite buffer and observable backpressure (WOULD_BLOCK or blocking with scheduler progress); last-writer-close => eventual EOF, no readers => BROKEN_PIPE. Never allocate unbounded memory.
  • Handle races: both ends closed, writer blocked at capacity, reader blocked with no data, revoke while waiting, stalled consumer, handle reuse after close, and interrupted I/O.
  • Include host tests, QEMU negative tests, and testable metrics (max resident bytes, wakeups, waits, cancellations). No hardware or production-completion claims from host-only tests.

Definition of done

  • Producer -> consumer transfers a binary payload (including NUL) byte-for-byte without a temporary file.
  • Actual concurrent producer/consumer with bounded memory; slow consumer backpressures producer.
  • EOF, BROKEN_PIPE, cancellation, revocation, and exhaustion are demonstrated with deterministic tests; no data emitted after revocation.
  • All capability and stream handles are released across both success and failure paths.
  • Exact source SHA, harness/compiler version, QEMU result and signed Spark judge evidence linked.

Follow-on dependencies

  • Native task lifecycle/parallel stages, native OSH adapter, and durability/qualification need this stream primitive.
  • Preserve kernel recovery path independent of OSH. Follow active architectural and execution authorities.

No code changes are included in this issue.

No comments.

Sign in to comment