Skip to content

Add the guarded aether-apply entry point (item 05) - #5

Merged
jrcruciani merged 12 commits into
mainfrom
jrcruciani-05-apply-entry-point
Sep 21, 2026
Merged

jrcruciani merged 12 commits into
mainfrom
jrcruciani-05-apply-entry-point

Conversation

@jrcruciani

Copy link
Copy Markdown
Owner

Scope

Implements item 05 only. Adds the requested ADR, aether-apply build|test|switch, human-only aether-confirm, protected snapshot/staging/build/activation handling, and synchronized prompt/playbook/README/hardening/rescue guidance. No LICENSE changes, later work-order items or live-host timer experiments.

  • Conservative static syntax and risk floors; --risk only raises the floor. R4/unsupported proposals print a bounded source diff without mutation. Kernel/initrd/hardware changes are build-only with manual boot/reboot handoff.
  • Exact root-owned candidate snapshots, explicit configured host selection, isolated command environment and protected auto-importer. Activation runs the built closure in a detached scope, not a fresh evaluation of mutable source.
  • R3 test auto-arms. A different human principal confirms after fresh SSH access; confirmation owns successful disarm and a single-use candidate/context-bound token. Commits happen only after successful final activation.
  • Recovery cancels blocked activation without waiting on its apply lock, never evaluates a flake, and preserves an uncommitted failed candidate. The recovery gate requires safe running and boot-default paths plus a fresh repository build equal to the running system; it survives reboot without preserving approval.

This is a cooperative-agent guardrail, not a hostile-Nix sandbox. Trusted packages/modules can execute privileged behavior. Root/wheel, additive sudo grants or another privileged route defeat the restricted-account assumptions. SSH freshness is human attestation.

Executed evidence

Tested executable/test/config SHA: b30cb4406dbe293867c2a0bf0db209959c333cce

Successful Linux run: https://github.com/jrcruciani/aether/actions/runs/35635585546

All three jobs passed:

  • 17 policy/identity/state tests and all 13 actual restricted-account NixOS VM scenarios: real ripgrep 15.1.0/fd 10.4.2 build and installation; R3 firewall test, separate-human SSH confirmation/disarm and exact-candidate switch/commit; sudo denials; unchanged R4 state; unexpected paths/links; kernel/hardware refusal; lower declared risk; foreign/edited approval; failed arming/disarming; blocked-worker cancellation; failed activation; a real failed profile update followed by recovery activation and gate refusal until repair; and a real reboot with token removal, mismatch refusal and successful cleanup/build equality.
  • All eight existing deadman VM subtests.
  • Real host-pinned options-index builds at the existing 25.05 and 25.11 pins.

The VM uses the exact fixture flake/importer/proposal bytes for preloaded closures and persistent writable store storage. Checks/builds/activations/sudo/systemd are real, not command mocks. This remains direct-boot VM evidence, not a bootloader or live-host test.

PR head: 7af6e28ba0c0c5ee49dc1958a1e8041bd0bc305a. Its only delta from the fully tested SHA is the requested single section-05 evidence paragraph in docs/CHANGELOG.md; exact equality outside that file was verified. Automatically triggered PR CI may run, but no duplicate manual VM rerun is required for this documentation-only delta.

Parent review/merge remains the handoff boundary; this PR has not been merged.

JL Revilla and others added 12 commits September 21, 2026 17:40
Restore prior staging on preparation failure and reject a changed running-system context before activation.

Co-authored-by: Copilot App <[email protected]>
Reject executable option hooks, preserve original sudo identity, verify isolated environments, and keep cleanup errors from rolling back an already committed candidate.

Co-authored-by: Copilot App <[email protected]>
Add actual failed-profile-update coverage and prevent interactive prompts from hanging the restricted-account VM fixture.

Co-authored-by: Copilot App <[email protected]>
NixOS makes /var/empty immutable; use Aether's private state home without restoring caller configuration or environment.

Co-authored-by: Copilot App <[email protected]>
Use one filtered fixture layout and its own flake outputs for base, package and firewall closures instead of equivalent inline modules with different merge ordering.

Co-authored-by: Copilot App <[email protected]>
…as its agent

Fsync atomic state directory changes, escape Unicode display controls, and avoid relying on a login PATH in the systemd-launched cancellation test.

Co-authored-by: Copilot App <[email protected]>
Wait for QMP reset and assert the boot identity changes before checking volatile approval and persistent recovery state.

Co-authored-by: Copilot App <[email protected]>
Retain fetched flake inputs on the fixture disk and assert the R1 build prints both package changes without activating.

Co-authored-by: Copilot App <[email protected]>
@jrcruciani
jrcruciani merged commit 6f6979f into main Sep 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant