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

branch main Branches Tags History

aienux / native / omega / allen / README.md

297 lines · 19406 bytes Raw Blame History Source

Allen in seeded Omega (L694, WIP)

This directory contains handwritten seeded Omega implementations of Allen's transport-independent state, protocol, memory codecs, scene state, code layout and paint primitives. It compiles directly to static native Linux AArch64 ELF. It has no foreign implementation, interpreter, C translator, launcher or fallback.

It is not the complete iMac Allen replacement. The old production C/Rust paths remain live. No service, machine, physical disk or boot path was changed.

Build on Linux AArch64 from the pinned public compiler source. These are component build instructions, not a released interactive alpha. The compiler is omega-mv commit b8bd1d03 on the local branch fix/imac-net-L974-snp (L974; a compiler change that needs its own review, not yet published), stacked on 81ab1900, which the tag allen-omc-pin-81ab1900 holds (the feat/x86efi-file-word head of #981, stacked on #980 register slots and #977 site tables; #980 is not merged, so neither commit is on omega-mv main): look-paint.om needs its const and bitcast, the firmware unit its larger trap/exit-site tables, look-install.om its efi 11 file word, efi-main.om the efi 8 that leaves an adapter refused only for its link initialized (so the next attempt sees the link) and reports each scan through efi 0, and the x86 back end's live-slot calls and register-resident slots make the firmware's per-pixel code run. From this repository root, with the branch fetched from its bundle (imac-net-L974-omc.bundle on the Spark under ~/handoffs/imac-boot-repair-20261107/net/) until it is published:

git clone https://github.com/aien-dev/omega-mv.git build/allen-toolchain
git -C build/allen-toolchain fetch PATH/imac-net-L974-omc.bundle fix/imac-net-L974-snp
git -C build/allen-toolchain checkout --detach b8bd1d03
sha256sum build/allen-toolchain/seed/out/omc     # expect 2eeab5147deb8320...

The committed seed/out/omc on that branch is the pinned compiler; its self-rebuild (sh seed/omega-from-seed.sh in a disposable clone) reproduces the same bytes. Self-rebuild equality does not establish diverse compiler ancestry; that qualification is a separate claim. The expected SHA-256 is 2eeab5147deb8320cb1bc7f86a5f3de534955ff89f76be2832155348706e0164; pass the executable as OMEGA_COMPILER (on the Spark: ~/work/imac-net-L974-omc/seed/out/omc).

The firmware image for the iMac is one unit of every module in the order build-fw.sh lists (platform, base, sha256, font, the look, surface, GitHub, HTTP, net, TLS, session, repository screen, runtime, courier, memory, intent, reply, context, application, chat, install, stopwatch, show, efi-main, demo):

OMEGA_COMPILER=... sh native/omega/allen/build-fw.sh target/BOOTX64.EFI

The typed line stats makes Allen say the stopwatch's last line (look-stat.om), network first: STAT net=N e=E h=H l=L c=C p=P m=MAC s=... gives the network flag, the last efi 8 / efi 0 error code, the SNP handle count, the LocateHandleBuffer status low byte, the number of scans, one probe step per handle (0 not reached, 1 no Mode, 2 MAC size, 3 IfType, 4 Start, 5 Initialize, 6 GetStatus, 7 state, 8 no link and kept initialized, 9 filter mask, a ReceiveFilters, b not opened, e chosen without link detection, f chosen with a link) and the chosen MAC. install allen on this computer copies the image to the internal EFI System Partition (look-install.om); nothing is written at boot.

Run the complete component gate:

sh native/omega/allen/gate.sh target/allen-omega-L694/fresh-output

On the shared Spark, prefix bootstrap and gate commands with quiet-build. For a compiler reconstructed elsewhere, set OMEGA_COMPILER to its executable path. The same fixed digest is mandatory; this setting does not permit an unqualified compiler. Paths containing spaces are supported. Build-orchestration checks are available through sh native/omega/allen/test-build.sh COMPILER FRESH_OUTPUT.

The output directory must be fresh. build-one.sh hashes the compiler before every invocation, rejects empty/wrong-machine/nonstatic ELF and marks only qualified output executable. Failed compilation leaves no published executable; existing outputs, including dangling links, are never replaced. The gate builds all modules together for every test, executes handwritten Omega test programs, compares a byte-exact independent memory fixture and rejects compiled behavioral mutants. The build uses POSIX shell, Git (source reconstruction), GNU file/text utilities, readelf, dd, xxd and sha256sum as external development tools. Existing Rust courier --split was used once as a fixture oracle, never as an Omega runtime dependency.

Modules and API boundary

Fixed global pools model the platform boundary because seeded Omega globals cannot be passed as array parameters. Functions are serialized, not reentrant. Caller-owned metadata is trusted only where stated; lengths and external wire values are validated at entry. Kernel/platform ABI and object ownership wrappers must be specified when a qualified native provider exists.

Bound conversation/provider API

application.om connects the runtime, intent/job builder, courier scheduler, CODE assembly and SAY/WAIT handling. This is an executed native core entry path, not a bound socket/device loop. The older development main.om stdio entry remains separate; it does not exercise this datagram binding.

  1. appinit(run,now) initializes one boot session using a nonzero unique run ID and actual monotonic milliseconds supplied by the future qualified provider. Reinitialization is refused rather than reusing job IDs.
  2. Put a prompt into In/Inlen, then appask(now). It validates admission before adding a transcript entry, builds the real JOB text and queues it. Code requests expose the existing acknowledgement immediately. Restored facts and up to six newest live notes are included in the queued job. Busy, outstanding-send, pending-receipt, invalid-prompt and ID-exhaustion cases refuse admission.
  3. apppoll(now,link) advances silence/slow deadlines and returns whether one datagram is offered in Outb/Outlen. Send those exact bytes and call appsent(now,success) with the real whole-datagram outcome. Do not call core serializers yourself while a send is pending.
  4. Copy a received datagram into In/Inlen and call appreceive(now). Its boolean reports transport acceptance, not acceptance of the inner reply. A[2] distinguishes visible text1, queued code recovery2, code give-up3, refused payload4, slow notice5 and silence timeout6; zero means no UI event. Consume events after each successful call; later successful calls may replace them. Answer/R[8], Code and transcript remain the actual retained content.
  5. appcancel cancels both layers; appreset additionally clears runtime session display/history state, without resetting conversation or wire counters.

A missing-code response queues AGAIN with the original conversation ID. The triggering LINE is acknowledged first, then AGAIN uses a new wire sequence. Consequently the two counters can differ; subsequent valid responses still bind correctly. Incoming reply parsing preserves any outstanding outgoing datagram. Old CODE cannot populate or change a code buffer during a newer chat request. WAIT updates the silence deadline without fabricating an answer. Silence timeout cancels courier retries as well as the conversation. Calls remain serialized; fixed global arrays are not thread-safe. Provider must not mix direct core queue operations with this application API.

Runnable bound provider entry

provider-core.om and provider.om expose the actual bound application through versioned length-framed stdin/stdout. See PROVIDER.md for the exact 40-byte header, operations and status/event/body format. The gate produces the static native executable at <output>/provider, plus native input and output verification programs. For example the already-built fixture can drive it:

printf 0 | <output>/provider-input > /path/to/private/events.bin
<output>/provider < /path/to/private/events.bin > /path/to/private/results.bin
<output>/provider-output < /path/to/private/results.bin

These are deterministic test events, not a live model conversation. The entry actually calls the memory/catalog/application/scheduler/code functions, reads and writes real streams, and keeps offered datagrams pending until an explicit SENT outcome. It emits actual retained answers and completed code, never canned ordinary replies. Restore records are supplied by the caller, not read from disk. Malformed/oversized/truncated frames stop immediately with exit65; well-framed semantic refusals return status0. Real pipe replay with byte-at-a-time writes and six framing/refusal cases run in the full gate. The old line-oriented main.om remains separate and its byte-exact goldens are unchanged.

This is an executable host integration boundary, not a qualified socket, monotonic clock, storage/device provider, live-model service or EFI/iMac build.

Stable application presentation

presentation.om binds successful dask/drecv application events to retained scene state and completed code rows. See PRESENTATION.md. The display snapshot survives hidden/invalid replies and later reuse of the code assembly buffer. Input bytes and pending wire output are preserved; reset clears retained presentation bytes. Native tests exercise real courier envelopes through these wrappers, not merely direct scene-parser calls.

The provider executable now calls these display wrappers for ASK/RECV/RESET, while exporting the same raw answer/code records as before. Native provider tests check retained scene/code updates, refused-frame isolation and complete reset; compiled bypass mutants catch regressions in each attachment. This is a host-side presentation binding, not a pixel renderer or display device. Existing SAY folding and its 159-byte bound remain; multiline model-scene transport is not yet attached.

Native stroke font

font-data.om retains Allen's existing95 printable-ASCII glyph designs and91 integer sine samples; font.om is a handwritten fixed-buffer Omega rasterizer. It supports cap heights1..64 and weights1..2500, maps nonprintable bytes to ?, and produces one antialiased glyph mask at a time without a C font runtime. The full gate compares native output for294 glyph/size/weight/fallback records against frozen bytes collected from the unmodified legacy implementation. That legacy code is an external reference oracle, not an Omega compiler or runtime. <output>/font-specimen.ppm is drawn entirely by the native Omega executable.

See FONT.md and evidence/allen-omega-L694/L758/. This implements the font rasterization component, not scene layout, frame animation or the display driver. The presentation/provider attachment still needs the actual screen renderer.

Intentional refusals and unfinished compatibility

Overflow refuses whole prompts/answers/scene fields instead of silent truncation. Reply capacity159, prompt capacity159, code32768, job4096, note127. Conflicting CODE duplicates and differing language headers are refused rather than overwriting. Numeric overflow, backward timestamps, request ID wrap and v4 sky pad are refused. Job instructions and record bytes retain legacy structure; envelope metadata is never added to Store v1 superblocks. No identity migration fields are rewritten.

Remaining portable work: remaining scene aliases/missing-colon repairs, field ellipsis, timer interpretation, transcript-to-notes restore, full notes indexing/retrieval, catalog update/store integration, transport binding, full sky/catalogue/font/animated-network/canvas visual parity, integration and broader malformed-input coverage. Partial modules are not whole compatibility.

Required target gates: qualified seeded x86 EFI target (FR9), privileged/MMIO and interrupt/native device access(FR8), durable I/O(FR1), bounded networking(FR16), keyboard/framebuffer/disk/NIC providers, iMac QEMU boot/chat/keyboard/bootdisk, then signed physical trial. No C bridge can satisfy these. L408 owns compiler work; L690 owns Hermes JSON/WebSocket/admission. Neither tree was modified.