Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ pub fn build(b: *std.Build) void {
const native_fs_application_profile = b.option(bool, "native-fs-application-profile", "Separate bounded Zsh application composition; existing ABI31 owner") orelse false;
if (native_fs_application_profile and (!native_fs_owner_stack or release_artifact)) @panic("filesystem application profile requires its private ABI31 owner-stack profile");
options.addOption(bool, "native_fs_application_profile", native_fs_application_profile);
const native_zsh_external = b.option(bool, "native-zsh-external", "Private selected Zsh parent and one immutable helper child") orelse false;
options.addOption(bool, "native_zsh_external", native_zsh_external);
const native_zsh_terminfo = b.option(bool, "native-zsh-terminfo", "Private large-Zsh MODE/SIGINT composition with retained Owner namespace custody") orelse false;
options.addOption(bool, "native_zsh_terminfo", native_zsh_terminfo);
const block_test = b.option([]const u8, "block-test", "Disposable disk bring-up: write or verify");
Expand Down Expand Up @@ -240,6 +242,8 @@ pub fn build(b: *std.Build) void {
options.addOption(bool, "native_tty_signal_probe", native_tty_signal_probe);
if (native_zsh_terminfo and (!native_fs_application_profile or !native_tty_mode_probe or !native_tty_signal_probe))
@panic("Zsh terminfo requires its private large-application MODE and exact-generation SIGINT closure");
if (native_zsh_external and (!native_zsh_terminfo or !native_process_copy or !native_process_exec or !native_copy_signals or !native_signal_actions or !native_signal_public or !native_signal_suspend or !native_parent_identity))
@panic("Zsh external requires its selected terminfo, copy/exec and generation-safe child signal closure");

options.addOption(bool, "native_exec_copy", negativeOption(b, release_artifact, af09_diagnostic, "native-exec-copy", "Copy an unpublished replacement for rejection testing"));
options.addOption(bool, "native_exec_early", negativeOption(b, release_artifact, af09_diagnostic, "native-exec-early", "Publish replacement before owner confirmation"));
Expand Down
68 changes: 68 additions & 0 deletions docs/NATIVE-C.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,30 @@ and compact hashes are in [results](evidence/af07-owner-native-2026-10-23/README
No new VM before fresh one-sequence disposition. A successful diagnostic without
recurrence does not resolve the panic or authorize resumed affected acceptance.

## Selected external-Zsh Owner capacity

The [issue143 owner decision](https://github.com/gonz0w/Aether/issues/143#issuecomment-6591806304)
selects73,728 Owner RX bytes and a12,288-byte mapped stack (12,280 usable)
only with the existing `native-zsh-external` closure. AENFS006/AENMX011 bytes do
not select this allowance: the kernel boot gate and loader explicitly choose
`parseExternalApplication`; old `parseApplication`, owner-stack and other
profiles retain their original code, stack and envelope limits.

The selected stack grows downward to `[0x7ff000,0x802000)`, with three zeroed
RW/NX pages and absent guards at0x7fe000 and0x802000. ABI31, initial
RSP0x802000-8 and the8KiB data region at0x900000 stay exact. Runtime and
workspace remain4,096 bytes each. Maximum mapping is18 RX+3 stack+2 data pages,
23 of the existing128 Owner pages; total application backing stays11,520 pages.
This adds no allocator, syscall, namespace grant or peer mapping authority.

`scripts/owner_stack.py` accepts an explicit `stack_bytes=12288` for this fit;
its4KiB default,8KiB selection and dynamic/recursive/unknown-edge rejection
remain. Run the pure inspector and fixture-source controls with
`python3 -B -m unittest discover -s tests -p test_zsh_owner_capacity.py -v`.
The same test file supplies actual parser/boot/mapping body fixtures for bounded
Zig execution recorded separately. These host checks do not execute page tables
or qualify a guest. Fresh matched fit and separate review still precede an image.

## Guarded complete-owner candidate — AENFS005 / ABI31

The maintainer approved a separate8KiB guarded stack and measurement-led code
Expand Down Expand Up @@ -4577,3 +4601,47 @@ The syscall scaffold executes the actual write, query and reset bodies over host
storage. It does not establish hardware protection, linked static growth or a
native reader result. Those remain matched kernel/artifact gates. Routine reviewed
checks follow the [standing execution direction](policy/execution.md#current-milestone-execution-direction-2026-11-01).


## Selected Zsh parent/helper kernel composition

Issue143 adds default-off `-Dnative-zsh-external=true`, requiring the existing
terminfo, copy/exec, copied signal actions, public actions, suspension and parent
identity selections. The exact Owner/A001 launch admits only parent1/C002.
Cooperative freeze accepts that live bound parent or its exact child2; only the
Owner may copy parent1 into unadmitted child2. The child receives a fresh native
generation and clock binding with retained namespace provenance only, process
endpoints and explicitly null TTY signal ownership. Owner generation0 remains
valid for the parent. Existing selected startup omits namespace/AENAP export.

Only child2 can replace its image with the Owner-held C003 helper. Its current
parent relationship, child clock and namespace provenance must still match;
exec preserves native generation/binding and the existing receipt/publication
transaction. Parent exec and other copy targets remain denied. Existing
SIGCHLD17 validates the real parent generation. Ordinary profiles retain their
limits; this external profile uses only the
[approved Owner capacity](#selected-external-zsh-owner-capacity). See the selected
[parent/helper contract](../userland/docs/ZSH-FILESYSTEM.md#selected-parenthelper-extension).

The fixed issue143 target trial passed in34.169s: actual Zsh launched the held
helper, collected status7, printed7 and returned to its prompt before normal
parent/engine exit and export. The Owner completed33/96 requests with mode
cleanup0; all21 cleanup phases and three reclamations completed, with halt
at2884/6000ticks. Screen/PTY and once-only staged input were observed; all
original host holders and clients were reaped with absent groups and output EOF.
[PR144](https://github.com/gonz0w/Aether/pull/144) records the source delivery.
This is the approved fixed-workload checkpoint, with full-host coverage still
open in [issue141](https://github.com/gonz0w/Aether/issues/141). General resource
peaks, arbitrary filesystem execution, child input/job control, login, persistent
shell writes/reboot readback, packages and R1 remain separate gates.

Run focused public source checks from the repository root:

```sh
python3 -B -m unittest discover -s tests -p test_native_zsh_external.py -v
```

The actual-body fixture uses real Binding/Pending and copy/exec/freeze/notification
bodies over host storage; MMU/device/scheduler installation is substituted. Its
private qualified compiler entry and cleanup records remain separate from these
stdlib-only public checks. No private runner API is required by the public test.
51 changes: 51 additions & 0 deletions docs/policy/execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,57 @@ No extra guest, unknown-effect retry or cleanup authority follows. External
commands, login, persistent write/reboot/readback, packages and R1 retain their
own gates. The earlier design and fixed diagnostic-fit decisions remain effective.

## Selected Zsh parent/helper composition —2026-11-02

Cam directly approved
[the scoped parent/helper design](https://github.com/gonz0w/Aether/issues/142#issuecomment-6589424662):
“Approve scoped parent/helper design (Recommended)”. Reviewed proposal03 in
issue142 selects one real Zsh parent and one immutable helper child with the
actual internal pipe, existing copy/exec/SIGCHLD, one context per process and
Rust Owner namespace custody. [Issue143](https://github.com/gonz0w/Aether/issues/143)
owns implementation; the [local consumer contract](../../userland/docs/ZSH-FILESYSTEM.md#selected-parenthelper-extension)
records the selected ownership and compatibility requirements.

Child bindings are local to its real native slot/generation. MODE/private restore
and SIGINT stay parent-only; child SIGINT ownership is explicitly null. Only
READ/WRITE proxy descriptions are delegated, with an exclusive read lease and
truthful unsupported canonical/ISIG child input. Use complete336-byte selected
snapshots, preserve old304-byte profiles, and retain actual wait status through
known delivery/collection, reclaim and parent read-lease restoration. Unknown
effects contain without replay. No namespace grant, new syscall/capability kind,
global process table or numeric limit increase is selected.

This approves scoped implementation under the standing milestone direction.
Correct and measure the known oversized external frame before any image; fresh
actual integrated fits and applicable verification/artifact/media/cleanup gates
remain. No image/run result, general utility or filesystem-exec installation,
child job control/input, login, persistence, package or R1 acceptance is claimed.
Issue137's diagnostic-fit/full-host exceptions remain issue-only; issue141 retains
its failed coverage and unverified cleanup.

## Selected issue143 capacity and verification decision —2026-11-02

Owner direction,2026-11-02: Cam directly approved the
[scoped issue143 plan](https://github.com/gonz0w/Aether/issues/143#issuecomment-6591806304), including the reviewed proposal in comment6591273627.
Only native-zsh-external/native_zsh_process may use73,728 bytes of Owner RX
code and a12,288-byte mapped stack (12,280 usable), within unchanged128-page
Owner backing. Preserve ABI31/RSP0x802000-8, Runtime/workspace4,096 each,
RW/NX stack, absent guards and old-profile code/stack/parser/boot limits.
Fresh matched selected fit, boundary/guard tests and separate artifact/media
review precede an image/trial. The one fixed helper/status7/parent-prompt/clean
exit trial may establish remaining scoped workload fit despite unknown complete
parser/handler/heap/copied-peak proof. No general peak qualification follows.
Focused contract checks, separate review, required protected CI and successful
exact trial may qualify this issue143 checkpoint while issue141's full-root
integration gate stays open. This is an explicit issue143 policy exception,
not a full-host pass or transfer of issue137's exceptions. Preserve unknown
history/quarantines. Other app/time/request/mutation/capture/no-network,
disposable-media, finite-attempt and known-cleanup limits remain binding.
Login, persistence/reboot, packages, assembled-system and R1 gates remain separate.
Routine implementation, builds, reviewed bounded tests and delivery proceed
under standing approval; this decision grants no new syscall/capability kind,
arbitrary executable authority or unknown-effect retry.

## Ordinary-app namespace and clock contract —2026-10-28

The owner approved the separately reviewed [issue98 proposal02](https://github.com/gonz0w/Aether/issues/98#issuecomment-6477628920)
Expand Down
10 changes: 10 additions & 0 deletions docs/workflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -2665,6 +2665,16 @@
"invariants": "One retained Owner namespace Client/epoch; exact app generation; readonly closed336/AEFP0004; actual held directory, no fake stat; AENAP002 process-only transfer and positive large/MODE/SIGINT closure. Existing resource/default/cleanup limits; old profiles preserved. Application boot-module bound derives from existing AENFS006 component caps; ordinary/large defaults unchanged. Fixed Screen4 private FIFO and original live holder association survive closed diagnostic pipes.",
"oracle": "Actual realproducer epoch/inplace constructor and semantic omissions; exact libc/raw errno/mask/publication; compiled app/Owner origins, derived-source pins, current loader/TLS/layout/stack; known child cleanup and real hostVT100 input/render/exit. Actual extracted boot guard admits selected9,081,744/exactcap and rejects one-over/u64max before dispatch; compiling old/omitted gate controls reject. Source-only public checks are distinct from the private actual compiler run.",
"gaps": "No current image/guest or complete Zsh startup/parser/handler stack/peakheap/whole-session request demand. Expected33requests and capacity are models, not native evidence; externalexecute still overbudget. Unknown historical interrupted hostattempt remains quarantined."
},
{
"id": "zsh-external-parent-helper",
"reference": "userland/docs/ZSH-FILESYSTEM.md",
"invariants": "Selected one-parent/one-helper copy/exec/wait with full descriptor snapshots, Owner namespace custody, child-local binding, parent-only MODE/SIGINT, shared FILE lifetime, known wait delivery before reclaim/read-lease restoration. External Owner RX73728/stack12288 within128 backing; old profiles and other execution bounds stay exact.",
"command": "python3 -B -m unittest discover -s tests -p test_native_zsh_external.py -v; python3 -B -m unittest discover -s tests -p test_zsh_owner_capacity.py -v; actual changed parser/boot/mapping bodies and C/Rust controls in the owning qualified private recipes; lead-frozen selected target/Owner fit, reviewed image/media and fixed native helper/status/prompt workload.",
"oracle": "Real helper ELF executes and exits7; Zsh observes actual status7 and returns to its prompt; normal final app/engine exit, mode restoration, export and three known reclamations. Qualified issue143 fixed trial:33/96 requests,21 cleanup phases, halt2884/6000ticks, known host cleanup. Malformed/stale/unknown effects contain without replay.",
"gaps": "Approved comment6591806304 limits acceptance to the fixed helper/status/prompt workload and selected Owner capacity. Full-root141 stays open. No full-host/general peak, child input/job control, arbitrary filesystem exec, login, persistent shell write/reboot readback, packages or R1 qualification. Private recipes are not a standalone distribution.",
"owner": "Aether kernel, userland and sys-init",
"budget_seconds": 300
}
]
}
Loading
Loading