aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / native / omega / allen / PROVIDER.md
| 1 | # Native provider stream v1 (L748) |
| 2 | |
| 3 | Builder choice: an explicitly host-development, bounded binary stream entry for |
| 4 | already-built Omega application functions. It is not a network, clock, storage |
| 5 | or device provider. All executable implementation and fixtures are Omega; host |
| 6 | shell only compiles and compares. The legacy development stdio main stays intact. |
| 7 | |
| 8 | Input header:40 bytes, magic ASCII ALNPRV01, then four little-endian u64 fields: |
| 9 | operation, monotonic milliseconds, argument, body length. Body follows exactly. |
| 10 | No separators/padding after body. Header/body fragmentation is permitted. |
| 11 | |
| 12 | | op | operation | argument | body | |
| 13 | |---|---|---|---| |
| 14 | |1|BOOT|nonzero unique run ID|empty| |
| 15 | |2|ASK|0|1..159 prompt bytes| |
| 16 | |3|POLL|link0/1|empty| |
| 17 | |4|SENT|actual whole-datagram success0/1|empty| |
| 18 | |5|RECV|0|65..1200 datagram bytes| |
| 19 | |6|CANCEL|0|empty; timestamp must0| |
| 20 | |7|RESET|0|empty; timestamp must0| |
| 21 | |8|COPY|slot0/1|4096 record bytes; timestamp0| |
| 22 | |9|NOTE|index0..511|4096 record bytes; timestamp0| |
| 23 | |10|LOAD|0|empty; timestamp0| |
| 24 | |
| 25 | LOAD is optional before BOOT. It explicitly resets restore staging and begins a |
| 26 | new two-copy read. COPY accepts each slot once, valid or damaged, choosing the |
| 27 | newest valid memory copy with existing codec; both invalid means empty memory. |
| 28 | After both copies, ctxbegin runs. NOTE visits each declared slot once; damaged |
| 29 | records are visited as gone. BOOT refuses until restore is complete. LOAD may |
| 30 | restart restoration only before BOOT. COPY/NOTE/LOAD refuse after BOOT. Raw record |
| 31 | bytes come from a future provider; no physical persistence claim. |
| 32 | |
| 33 | Output header uses same magic and four u64 fields: echoed op, status, application |
| 34 | event, body length. Status0 refused/no successful dispatch,1 accepted,2 accepted |
| 35 | record visit but damaged,3 accepted POLL with outgoing datagram. POLL without an |
| 36 | offer is status1, not refusal. On accepted non-offer event1, body is exact visible |
| 37 | Answer bytes. When that event also completes a valid code request, one additional |
| 38 | record op11/status1/event1 carries the exact Code bytes. No fabricated text. |
| 39 | ## Retained presentation attachment (L763) |
| 40 | |
| 41 | The actual provider dispatch uses dask for ASK, drecv for RECV and dreset for |
| 42 | RESET. Accepted event1 updates the retained D* scene/code state; malformed or |
| 43 | semantically refused operations never project stale event state. RESET clears |
| 44 | all retained presentation, while CANCEL retains it. BOOT still initializes once. |
| 45 | The source concatenation places presentation.om before provider-core.om because |
| 46 | the seed requires definitions before calls. There is no new operation or output |
| 47 | record: the external wire contract and exact answer/code bytes remain unchanged. |
| 48 | The renderer must consume retained D* buffers, not mutable assembly scratch. |
| 49 | This connects provider dispatch to display state, not yet to pixels or hardware. |
| 50 | |
| 51 | Qualification: expand native prdo tests first (136 assertions;24 fail against |
| 52 | unchanged provider), bind the three existing calls, then replay the complete |
| 53 | host gate and three compiled call-bypass mutants. File/fragmented-pipe output |
| 54 | fixtures remain unchanged. Independent exact-source review follows publication. |
| 55 | |
| 56 | The stream reply writer uses a separate buffer: application Outb/Outlen/Err remain |
| 57 | intact until SENT reports the real transport outcome. Writing an offer to stdout |
| 58 | never counts as sending its datagram. |
| 59 | |
| 60 | Bad magic/op/unused fields/size => immediate exit65 before body or later command |
| 61 | execution. A well-framed semantic refusal produces status0 and permits subsequent |
| 62 | records. EOF between records is exit0; partial header/body is exit65. Read/write |
| 63 | errors are exit74 (inherited Linux signal disposition remains a separate limit). |
| 64 | No synthetic timestamps, link readiness, datagram send outcomes or storage writes. |
| 65 | |
| 66 | Implementation/qualification sequence: native compilable stub + behavioral RED; |
| 67 | provider core with real application calls; native stream entry and real pipe/file |
| 68 | replay; valid workflow golden, partial/oversized/unknown frame refusal; combined |
| 69 | native gate and compiled mutations; immutable independent review. No target or |
| 70 | live-model acceptance from these host fixtures. |