Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-protocols-mv/tree/main/specs/osh-platform/vectors # aien-protocols-mv Canonical specifications, wire protocols, and schemas for the AIEN sovereign ecosystem Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-protocols-mv / specs / osh-platform / vectors` `af2c5cd` docs: Aienux for the kernel, AienOS for the whole system (ADR 0038) Drake Stapleton committed 2026-11-15 ``` .. .crumb 102 README.md 10259 expected.txt 1392 s001_nul_payload.vec 337 s002_capacity_partial.vec 515 s003_zero_length.vec 371 s004_broken_pipe.vec 377 s005_eof_after_drain.vec 402 s006_rights.vec 683 s007_handle_reuse.vec 414 s008_revoke_blocked_read.vec 358 s009_revoke_blocked_write.vec 329 s010_close_reader_race.vec 276 s011_close_writer_race.vec 247 s012_both_closed.vec 310 s013_cancel_blocked_read.vec 332 s014_cancel_latched.vec 396 s015_stalled_consumer.vec 346 s016_blocked_read_progress.vec 359 s017_malformed_frames.vec 1244 s018_limits.vec 390 s019_dup_refs.vec 348 s020_transfer.vec 393 s021_epoch.vec 513 t001_task_stream_binding.vec 564 t002_stage_nonzero_exit.vec 633 t003_pipeline_broken_pipe.vec 392 t004_task_cancel.vec 710 t005_cancel_blocked_task.vec 635 t006_partial_launch.vec 757 t007_refusal_before_effects.vec 660 t008_not_found_stage.vec 507 t009_revoke_between_stages.vec 498 t010_domain1_generation.vec 880 t011_domain2_generation.vec 692 t012_outcome_unknown_crash.vec 448 t013_outcome_unknown_lost.vec 375 t014_reset_cleanup.vec 420 t015_spawn_argument_refusals.vec 422 t016_eof_all_task_writers.vec 564 v001.in 11 v002.in 19 v003.env 28 v003.in 16 v004.in 12 v005.env 16 v005.in 17 v006.in 18 v007.in 9 v008.in 10 v009.in 19 v010.in 6 v011.env 9 v011.in 16 v012.env 6 v012.in 8 v013.in 9 v014.in 10 v015.in 1106 v016.in 11 v017.in 12 v018.in 11 v019.in 13 v020.in 16 ``` README.md # OSH conformance vectors Status: v1 DRAFT with the ABI. Expected outputs v001 to v015 were authored from `../OSH_PLATFORM_ABI.md`; v016 to v020 came from the first implementation (omega#336). The omega lexer, parser and expander tests run all 20 (spec section 14, item 6). Inputs are generated by `../tools/make-vectors.sh`; `expected.txt` is committed by hand. ## Files per vector `vNNN` - `vNNN.in`: the exact input bytes handed to the core, newline-terminated unless the vector says otherwise. May contain NUL and bytes >= 0x80. - `vNNN.env` (optional): answers to variable requests, one per line, raw bytes to end of line (a value cannot contain a newline). `NAME=VALUE` sets a variable. Lines starting with `@` set specials: `@status=N` is the value of `$?` for every request, `@arg0=` to `@arg9=` set positional parameters (the number of `@argK` lines present, counting from `@arg1` with no gaps, is `$#`). A name with no line is unset. The harness never executes pipelines. After each `PIPELINE_READY` it records the request, then calls `expand_run` again, treating `$?` as the fixed `@status` (default 0). ## expected.txt line grammar ``` ok [lex_resumes=N] | P conn=<0-3> | C b=<0-6> argv=,... as==,... rd=:,... refuse off= more ``` - A pipeline is `P`; its commands follow as `C` in order, each preceded by `|`. Lists of argv, assignments and redirections are comma separated; an empty list is written as nothing after `=`. - `` is a double-quoted byte string; `\"`, `\\`, `\xHH` escape `"`, `\` and any byte outside 0x20 to 0x7E. `"a"*1100` means 1100 repetitions. - Redirection `` is `IN`, `OUT`, `APPEND` or `DUP`; `` the redirected descriptor; `` a ``, or for `DUP` the source descriptor number. - `more` means the final call returned `NEED_MORE_INPUT` with no further input available. - `lex_resumes=N` is the exact number of `BUDGET_EXHAUSTED` returns the lexer gave before `PHASE_DONE`. - A core conforms when every line matches byte for byte. Refusal offsets follow spec section 5.4. ## Stream and task vectors (`sNNN_.vec`, `tNNN_.vec`) Status: v1 DRAFT revision 2, with `../STREAM_TASK.md` . Shared by every adapter (Omega's Linux host adapter, the Aienux native harness). The `vNNN` shell-core vectors above are unchanged; `tools/check-stream-vectors.sh` regenerates them and fails if they differ. The grammar is the Aienux native pipe fixture grammar (aienos-mv `native/kernel/tests/fixtures/pipe/README.md` at `f8700d4cb65e`, written so the corpus could move here) with its kernel-only counters removed and task, launch, authority and recovery commands added. `` is the quoted byte string of `expected.txt` (`\xHH`, `\"`, `\\`; spaces may appear inside the quotes). Checked by `tools/osh_sv_ref.c` (reference model) through `tools/check-stream-vectors.sh`, which also proves with `tools/mutate-stream-ref.sh` that every check of the model is caught by some vector. ### Header (all required, before the first step) line meaning `case ` the file is `sNNN_.vec` (streams) or `tNNN_.vec` (tasks) `kind positive\|negative` negative: the vector contains refusals or failures `exec host-logic\|native-qemu` `host-logic`: a host unit run of the adapter's own logic counts as evidence. `native-qemu`: it parks callers, starts tasks or runs them concurrently; Aienux evidence only from a native run under QEMU, Omega evidence only from real Linux processes `domain 1\|2\|any` authority domain of the vector's capabilities (ST5); an adapter without that domain reports `NOT_RUN` `needs ...` `streams`, `frames`, `tasks`, `launch`, `journal` (crash and recovery), `reset`, `test-authority` (the harness can mint and revoke capabilities with chosen generations), `fault-spawn` (make a chosen spawn fail), `fault-lose` (make a task's end unobservable); any missing feature gives `NOT_RUN` `#` at the start of a line is a comment. Every other line is ` => ` or `check ...`. The runner compares the whole result text byte for byte. Every vector ends with `check empty`. ### Stream commands Two principals, tables `A` and `B`, start empty. A handle name keeps its value after `close`, so a later use tests a stale handle. command meaning result on success `create ` `PIPE_CREATE` in table T; each end gets its data right plus `d g v` `OK` `write ` / `fill ` non-blocking `STREAM_WRITE`; `cap` is `LIMITS_GET.max_pipe_bytes` `OK n=` `read ` non-blocking `STREAM_READ` `OK n= data=`, or `OK n=0` `skim ` the same read, result without the bytes `OK n=` `bread ` / `bwrite ` blocking call; the first time it would park, the peer runs `` (`none`, or one `write`, `read`, `close`, `revoke`, `cancel` command that must return `OK`); a second park gives up `INTERRUPTED` (the stalled-peer deadline) as `read` / `write` `close ` `STREAM_CLOSE` `OK` `dup ` `STREAM_DUP` into table T; letters `r w m g d v` (ST4.11) `OK` `revoke ` the authority root revokes the pipe, through H's `v` right `OK` `cancel ` an interrupt aimed at that end (ST4.7) `OK` `release ` / `sweep ` close every handle in T; `release` prints the count (adapter-specific), `sweep` does not `OK n=` / `OK` `saturate last=` duplicate H with its data right into T until `LIMIT`; D names the last duplicate made `LIMIT` `exhaust min=` create pipes in T until `LIMIT`, require at least N and that the refused create left nothing, then close them `LIMIT` `limits` `LIMITS_GET` meets ST9 `OK max_pipe_bytes>=65536 max_streams>=16 max_tasks>=8` `frame ...` raw platform call (ST2) from table T; slice `-` or ``; cells hex, `$` = the adapter's handle cell for H; peer table is the other one `OK`, or `OK n=` for read and write ### Task, launch and authority commands command meaning result `cap [gen=]` the test authority mints a capability for spawning in the vector's domain; default generation 7 (domain 1) or `0x100000007` (domain 2) `OK` `revokecap ` the authority root revokes it `OK` `bind cap= [gen=] [domain=] [index=]` / `bind none` a binding built from C with fields overridden; `none` is no binding `OK` `spawn [in=] [out=] bind=` `TASK_SPAWN` from table A; an omitted slot is empty `OK` or the refusal `run` let every task run until none can move (a deterministic stand-in for time passing) `OK` `wait ` `TASK_WAIT` with deadline 0 `OK status= outcome=`, `WOULD_BLOCK`, `OUTCOME_UNKNOWN status=1 outcome=OUTCOME_UNKNOWN` `state ` `TASK_STATE` `OK state=RUNNING\|ENDED` `tcancel interrupt\|terminate` `TASK_CANCEL` `OK` `launch

bind= [in=] [inject=:] [revoke=:] : ! ...` launch one pipeline (ST7); stdin of the first command is `in` then end of stream, stdout of the last is captured; `inject` makes the spawn of command k fail with ERR; `revoke` revokes C just before command k's effect `OK`, or ` status= outcomes=,... statuses=,...` `waitp

` wait for every command (deadline 0) `OK status= outcomes=... statuses=... out=` or `WOULD_BLOCK` `cancelp

interrupt\|terminate` `TASK_CANCEL` every running command of P `OK` `reset` session reset with ABI section 12 cleanup `OK cancelled=` `crash` / `recover` the adapter dies with no cleanup and restarts; recovery reports intents without outcome `OK` / `OK unknown= replayed=0` `lose ` the ended task's status becomes unobservable to the adapter (Linux: someone else reaped it) `OK` Programs the harness provides (not shell commands; the adapter's test harness implements them natively): `exit `; `emit []` writes the bytes then exits N (default 0); `cat` copies input to output until end of stream; `drain` reads to end of stream; `flood` writes `y\n` forever; `hang` waits until interrupted; `stubborn` ignores interrupts; `nosuch` is a name `RESOLVE` does not find; `foreign` is a name that resolves to a class this adapter does not provide. A program that gets `BROKEN_PIPE` on output exits 141; an obeyed interrupt ends it with 130 (ST6.3). Outcomes are the section 10 names; a status `-` is a command that never started. `check` items: `empty` (both tables, every pipe, every task and every intent record are gone and no recovery report is pending) and `pipes=` (live pipes). ### Run reports and receipts An adapter runner prints one line per vector, `PASS `, `MISMATCH : got "" want ""` or `NOT_RUN ` (missing feature or domain), then `OSHSV1_CONFORMANCE impl= vectors= pass= fail= not_run=`. Its first line is `OSHSV1_RUN impl=@<40-hex commit> corpus=aien-protocols-mv@<40-hex commit> toolchain= target=host|qemu-`; a report whose first line lacks any of these pins is not a receipt (ST10.3). The reference model prints the same format with `impl=reference-model`; its result is a check of the corpus only. ## Human-Directed Agentic Engineering Development follows Human-Directed Agentic Engineering (HDAE): humans define goals, architecture, constraints, acceptance criteria, and stopping points; agents implement, execute checks, diagnose failures, and revise within those boundaries. Human review retains responsibility for claims, acceptance, and release decisions. This describes the development method, not a change to runtime autonomy or historical evidence. For the documented method and a systems-software case study, see Gregory M. Kurtzer (2026), *Ginux: Building an Independent Kernel That Runs Linux Userspace through Human-Directed Agentic Engineering*, technical report, v1, Zenodo, https://doi.org/10.5281/zenodo.`23682548` .