Skip to content
Closed
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
16 changes: 13 additions & 3 deletions .github/workflows/linux-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,16 @@ jobs:
--iso dist/linux/phios-linux-0.1.0-alpha.1-x86_64.iso \
--source "$(cat dist/linux/source-commit.txt)" \
--output "$RUNNER_TEMP/phios-boot"
- name: Install only to a disposable virtual disk and qualify no-ISO recovery
run: |
python3 packaging/linux/tests/qemu_install.py \
--iso dist/linux/phios-linux-0.1.0-alpha.1-x86_64.iso \
--source "$(cat dist/linux/source-commit.txt)" \
--output "$RUNNER_TEMP/phios-installed"
- name: Convert display evidence even when qualification fails
if: always()
run: |
if [[ -f "$RUNNER_TEMP/phios-boot/screen.ppm" ]]; then
/usr/bin/python3 -c 'from PIL import Image; from pathlib import Path; import os; [Image.open(p).save(p.with_suffix(".png")) for p in Path(os.environ["RUNNER_TEMP"] + "/phios-boot").glob("*.ppm")]'
fi
/usr/bin/python3 -c 'from PIL import Image; from pathlib import Path; import os; [Image.open(p).save(p.with_suffix(".png")) for directory in ["phios-boot", "phios-installed"] for p in Path(os.environ["RUNNER_TEMP"], directory).glob("*.ppm")]'
- name: Preserve candidate and qualification evidence
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
Expand All @@ -69,6 +73,9 @@ jobs:
${{ runner.temp }}/phios-boot/*.log
${{ runner.temp }}/phios-boot/*.json
${{ runner.temp }}/phios-boot/*.png
${{ runner.temp }}/phios-installed/*.log
${{ runner.temp }}/phios-installed/*.json
${{ runner.temp }}/phios-installed/*.png
if-no-files-found: warn
retention-days: 7
- name: Preserve reviewable logs and screenshot separately
Expand All @@ -84,5 +91,8 @@ jobs:
${{ runner.temp }}/phios-boot/*.log
${{ runner.temp }}/phios-boot/*.json
${{ runner.temp }}/phios-boot/*.png
${{ runner.temp }}/phios-installed/*.log
${{ runner.temp }}/phios-installed/*.json
${{ runner.temp }}/phios-installed/*.png
if-no-files-found: warn
retention-days: 7
20 changes: 14 additions & 6 deletions docs/os/IMPLEMENTATION_STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ proof that PhiOS is a completed OS. Preserve the repository AGENTS.md rules.
| --- | --- | --- |
| R1: HTTP callers cannot mint operator authority | Decision, binding and lease POSTs held; explicit terminal review | HTTP rejection, cancellation and stale-review tests; same-user isolation and Windows ACL evidence remain required |
| R2: Freeze a truthful Linux release contract | Candidate contract and generated metadata corrected | docs/os/RELEASE_CONTRACT.md and packaging/linux/release.json; Python and OS release tracks separate |
| R3: Install current Python and UI packages | Candidate PKGBUILDs, JS lock and native pacman adapter | CI must build/install exact source packages; fixed Arch snapshot and signed upstream inputs |
| R4: Real non-root graphical login and supervised services | Candidate Wayfire session and user service target | Live/VM qualification pending; no privileged browser or agent auto-start |
| R5: Produce and UEFI boot exact live ISO | Candidate isolated Archiso/QEMU workflow | Exact ISO/source/hash/serial/screenshot evidence required; no ready claim until observed |
| R6: Recover durable private state | Candidate locking/sync, transactional outbox and data-only recovery | Contention, interruption, backup/restore and schema refusal tests; installed reboot/power-loss evidence still required |
| R7: Explicit blank-disk installation | Pending | Disposable VM install, boot without ISO, persistence |
| R3: Install current Python and UI packages | Current-source PKGBUILDs, JS lock and native pacman adapter | Pinned Arch image package/install smoke passed in runs 36786368318 and 36798467774; signed upstream inputs; local development packages unsigned |
| R4: Real non-root graphical login and supervised services | Wayfire session and user service target | Run 36798467774 passed real live/installed login, observer/browser readiness, sidecar restart and logout; no privileged browser or agent auto-start |
| R5: Produce and UEFI boot exact live ISO | Isolated Archiso/QEMU workflow | Exact source 0253b6e0fb27251fe2da37b6d8c1e31245a64290 and ISO SHA-256 recorded below; live lifecycle and two distinct boots passed |
| R6: Recover durable private state | Locking/sync, transactional outbox and data-only recovery | Contention, interruption, backup/restore and schema refusal tests; installed acknowledged state survived abrupt VM restart in 36798467774; physical power-loss qualification pending |
| R7: Explicit blank-disk installation | Experimental root-owned offline CLI and disposable qualification lane | 20 local refusal/cancellation/identity tests; cancellation, actual installation, no-ISO desktop boot and fresh data restoration passed on the named disposable VM; hardware beta pending |
| R8: Whole-OS update and recovery | Pending | Signed artifacts, failed update recovery; app rollback is insufficient |
| R9: Qualify hardware and one Linux governed workflow | Pending | Named hardware matrix and observed effect verification |
| R10: Sign and publish the exact qualified artifact | Held | Proven preceding gates, hashes, SBOM, signatures, source/license notices and maintainer release decision |
Expand All @@ -38,4 +38,12 @@ Validation: 73 focused Python tests passed; Ruff and mypy (301 source files) pas

## Linux foundation handoff

The candidate implements release-contract, package, session and live-image build milestones. 85 focused Python release/desktop/profile tests, lint and types pass locally. PhiShell build and the Arch inventory/security transport tests pass. The CI image workflow must provide the installed-package and actual UEFI boot evidence before these milestones are called qualified. Root autologin and unrelated releng services are removed. The CI-only live qualification fixture is excluded from normal local previews. Installation, durable crash recovery, OS update/rollback, Linux effect execution, hardware beta and signed public release remain held; no code or evidence in this milestone grants those claims.
The candidate implements release-contract, package, session and live-image build milestones. 85 focused Python release/desktop/profile tests, lint and types pass locally. PhiShell build and the Arch inventory/security transport tests pass. Image run [36786368318](https://github.com/MichaelWave369/PhiOS/actions/runs/36786368318) qualified the live lifecycle for source `5339f180ad9f8dbac11906c5e962728f80853e91`, ISO SHA-256 `5f3eacd5ce24c6cb8ea0067aad23054f5ca33caa146c5600eb4d625942c049ca`. Root autologin and unrelated releng services are removed. The CI-only qualification fixture is excluded from normal local previews.

## Installed VM evidence

Image run [36798467774](https://github.com/MichaelWave369/PhiOS/actions/runs/36798467774) passed for source `0253b6e0fb27251fe2da37b6d8c1e31245a64290`, ISO SHA-256 `8599bbc7ff2ed35432bae23692464d4d5afa9ffdfc787699a7be88f2cfc62f5c`. A newly created 32-GiB disk, serial `PHIOS_CI_BLANK`, was the only target. The VM had x64 UEFI/KVM, two CPUs, 4 GiB RAM, no network or shared folders, and no attached host disk. Cancellation preserved the blank target; production installation, normal password/PAM and greetd logins, the actual Wayfire/PhiShell desktop, verified backup/fresh restore, and acknowledged state after abrupt virtual restart passed. Installed boot IDs were `e5ba8528af464b8192312d9aab0db869` and `caa9695c41c64c3d898e12c1bd3234f5`.

Evidence receipt: `docs/os/evidence/installation-0253b6e0.json`. [Reviewable logs and screenshots](https://github.com/MichaelWave369/PhiOS/actions/runs/36798467774/artifacts/11135321615) and [unsigned image/packages](https://github.com/MichaelWave369/PhiOS/actions/runs/36798467774/artifacts/11134958214) expire 2026-10-08 under the seven-day CI retention policy. CI-only serial-console injection and public disposable credentials are recorded; they are excluded from normal installations. The screenshot was visually inspected. Ordinary CI runs 36798467750 and 36798463744 also passed for installer head `f135a24d3d88173f611829317e4ad04ebc22eff3`.

These are bounded VM qualifications. Whole-OS updates/recovery, physical power loss, Linux governed effects, named hardware support and signed public release remain held. No adapter is promoted and no publication authority follows from the receipts.
120 changes: 120 additions & 0 deletions docs/os/INSTALLATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Experimental blank-disk installation

The candidate manual installer is `phios-install`, packaged behind a root-owned
isolated Python launcher. The disposable installed-image gate passed in
[run 36798467774](https://github.com/MichaelWave369/PhiOS/actions/runs/36798467774).
This remains an experimental development installation; a hardware-supported beta additionally
requires update/recovery and the declared hardware matrix. Keep the verified
live media available. An installed filesystem alone is not a completed OS
release.

## Scope

Supported candidate shape: x86_64, x64 UEFI with Secure Boot disabled, one
canonical disk with a stable serial/WWN, at least 16 GiB, no partitions,
mounts, swap, holders, slaves or recognized signatures. Before installation
the tool reads every byte and requires zeroed contents, including unsigned data
that has no filesystem signature. This can take time on large hardware.
Existing data is refused. There is no automatic disk selection, erase-existing
option, unattended mode, HTTP installer or confirmation bypass.

The layout is a 1 GiB FAT32 ESP and a Btrfs filesystem with separate `@root`,
`@home`, `@log` and `@snapshots` subvolumes. Installation is unencrypted and has
no swap/hibernation setup. Btrfs subvolumes prepare a recovery layout; they do
not by themselves implement OS rollback or protect against drive failure.
BIOS, dual boot, Secure Boot, disk encryption, RAID, existing partitions and
storage migration are held.

## Review and install

Boot the configured PhiOS live preview. Open Foot and inspect the real disks:

```sh
lsblk --bytes --paths --output NAME,TYPE,SIZE,MODEL,SERIAL,WWN,MOUNTPOINTS
```

Replace both placeholders below with a reviewed canonical path and a new
lowercase account name. `--plan` performs read-only inventory and reports the
source, disk, account, hostname, unencrypted layout and held release status:

```sh
sudo phios-install --disk /dev/DEVICE --username YOURNAME --plan
sudo phios-install --disk /dev/DEVICE --username YOURNAME
```

The public volatile `phios` account can invoke this one interactive installer
through sudo; it receives no general passwordless root shell. Root/TTY checks
do not prove a human or isolate a malicious same-user process. The supported
custody boundary is the operator-controlled live boot and reviewed device.

The tool validates the target, checks zeroed contents, requests a fresh password
(at least 12 characters), and displays a confirmation containing the exact
device path and SHA-256 of the complete reviewed plan. Type that full phrase
or cancel. A wrong phrase, EOF or cancellation before the first disk command
does not change the disk. The disk inventory and zeroed contents are rechecked
after confirmation; stale identity is held. Passwords are passed through stdin
only, never argv, logs or receipts.

The first destructive command creates GPT on the selected empty disk. The tool
copies the immutable live squashfs, never the current live overlay or another
user's state. It creates a fresh account and private state, locks root, removes
live credentials/autologin/test fixtures, installs a normal greetd/PAM login,
generates an installed initramfs and installs systemd-boot's fallback loader.
It leaves firmware boot variables/order unchanged. Select the installed disk
in firmware if needed. The live password is never installed as an account
credential.

Installed package repositories remain on the signed pinned Arch snapshot.
The transient unsigned local build repository is removed. A supported PhiOS
package update channel and signed OS publication are separate pending gates;
do not change mirrors or perform partial package upgrades to imply a supported
update policy.

## Failure and first boot

The tool preserves private stage/error evidence under `/run/phios-install-*`.
After disk writes begin, failure does not undo a partial installation or make
the disk blank again. Preserve the evidence off volatile media, inspect the
reported stage and mounts, and recover deliberately. A cleanup failure reports
remaining mounts and returns nonzero; do not reboot while cleanup is held.
There is no implicit retry or automatic wiping of failed targets.

Successful installation writes `/var/lib/phios/install-receipt.json` with exact
source, target identity and filesystem UUIDs. `release_ready` remains false and
installed boot remains unqualified until observed. Remove the ISO, boot the
disk, authenticate the new account and verify Wayfire/PhiShell, private memory
state, package observations and services. Optional memory configuration stays
disabled unless the operator explicitly enables it. See STATE_RECOVERY.md for
data-only migration and backup; authority is never imported from the live
session.

## Disposable qualification

The CI lane creates a new 32 GiB qcow2 image with serial `PHIOS_CI_BLANK`; its
driver accepts no existing image or host device. Networking and shared folders
are absent. A root qualification fixture exists only in the CI live profile
and refuses any other target. It drives the same production CLI through a PTY,
first cancels and checks the disk, then types the exact reviewed confirmation.

The fixture seeds a zero-authority canonical memory record and verified backup
as the new user, confirms removal of live credentials/test fixtures/autologin,
and injects a serial console solely into the disposable installed test target.
The host then boots without the ISO, authenticates through normal password/PAM
login, types credentials at the real greetd greeter, observes the non-root
desktop/services, restores data into a fresh root, and checks an acknowledged
write again after an abrupt virtual restart. Serial-console injection is
recorded in the receipt; no installed automatic login is introduced. Exact
ISO/source hashes, serial logs, boot IDs and screenshots accompany success or
failure. A VM restart is not hardware power-loss qualification.

The qualified source is `0253b6e0fb27251fe2da37b6d8c1e31245a64290`; ISO SHA-256
is `8599bbc7ff2ed35432bae23692464d4d5afa9ffdfc787699a7be88f2cfc62f5c`.
The exact receipt and evidence identities are in
`docs/os/evidence/installation-0253b6e0.json`. CI credentials
are public test-only values; normal local profiles and production installs
contain neither the fixture nor those credentials.

References: [bootctl](https://man.archlinux.org/man/bootctl.1.en),
[lsblk](https://man.archlinux.org/man/lsblk.8.en),
[wipefs](https://man.archlinux.org/man/wipefs.8.en),
[Btrfs subvolumes](https://btrfs.readthedocs.io/en/latest/btrfs-subvolume.html).
8 changes: 5 additions & 3 deletions docs/os/RELEASE_CONTRACT.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ cannot mint operator approvals; see OPERATOR_AUTHORIZATION.md.

## Deliberately unqualified capabilities

This preview is a volatile live image. It has no qualified disk installer,
persistent installed-system recovery, whole-OS rollback, Secure Boot or BIOS
support. No hardware compatibility claim follows from a VM boot. Agent
This preview is a volatile live image. Its experimental blank-disk installer
passed the named disposable VM gate (see INSTALLATION.md); it has no supported
hardware installer, whole-OS rollback, Secure Boot or BIOS support. Installed
data backup/restoration and abrupt VM restart passed; physical power-loss and
whole-system update recovery remain separate gates. No hardware compatibility claim follows from a VM boot. Agent
isolation requires separate OS principals and a verified restricted broker;
an operator-owned shell or pseudo-TTY is not human authentication.

Expand Down
60 changes: 60 additions & 0 deletions docs/os/evidence/installation-0253b6e0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"abrupt_virtual_restart_passed": true,
"accelerator": "kvm",
"artifact_expiry": "2026-10-08",
"ci_serial_console_injected": true,
"cpus": 2,
"disk_bytes": 34359738368,
"disk_serial": "PHIOS_CI_BLANK",
"evidence_artifact_id": 11135321615,
"evidence_files": {
"boot-evidence.json": "9948a5f3823363d90d34aa84b05df6d54b64f8e9fcdac3e705583ce01e6b13ae",
"builder-image.json": "9526e9737def8b23a3d1297bf6c7a593b19ba1ec039ed5d3b9d10d57ed16df34",
"install-live-qemu.log": "33c482cb34b64de8cea0bd9b94549dcb837ea35745e324744900915ce1a24b8d",
"install-live-serial.log": "522b00042c3bc8ba0207e73c88d0ec37a210d325bdd4b039aba9286589b525aa",
"installed-1-qemu.log": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"installed-1-serial.log": "ae2a4903354f29b6618951c131ef72d54adc48dade1e7f5259da43e454a0b2fa",
"installed-2-qemu.log": "33c482cb34b64de8cea0bd9b94549dcb837ea35745e324744900915ce1a24b8d",
"installed-2-serial.log": "cd0438faa633b6c8199cdc01756bbf0bd1f09fe51e7a89b3ff46615be2b315e5",
"installed-evidence.json": "125aa97b8c4b7bbe96546ec98e5f580499fa3f68a093e584ea2831c4d4457f92",
"mkarchiso.log": "957c60b9135a6747d48e17a0aac118fa602b46124b1fbed4c842b44e0ca9d902",
"qemu.log": "8183afaf3dbaee427198c21759fdbcad0a6ce1a046e59b35ce77e616071ad0a2",
"release.json": "0d5499ce8f252637d7a1d6a8bdedeb8aef9829307893e348f3c1bf0795b91a75",
"screen-first.png": "b948c3898cde2934cec3760a9b8cc29f332defe1c6a23333458c3e214e56b610",
"screen-install-live.png": "e77f8927d18f259bbf3bd968fd15eb43007ee346ae2109c26aa1f60652aa4828",
"screen-installed-1-greeter.png": "f83a37571994ca7274939836bf77a47904c689fb6d38bb8587a11f2432aeba0e",
"screen-installed-1.png": "70606f87e262a8242763c47258fe828d750ea210a5781a973f36fe5a1f9716be",
"screen-installed-2-greeter.png": "f83a37571994ca7274939836bf77a47904c689fb6d38bb8587a11f2432aeba0e",
"screen-installed-2.png": "c4a706b924ef4a742e2b02ce7edac5d948210d489a299f0e41548970c6f7ee98",
"screen.png": "df5a5ac5fddf46461c0e9bd41ef1cdf615e8d4f08777e64d05bc015577a6f4b5",
"serial.log": "b3eaf114a12ca7061bc18e7f4e10590a74bc7cd5739cd788127b85ece305ae2f"
},
"hardware_qualified": false,
"host_disks_attached": false,
"image_artifact_id": 11134958214,
"installed": true,
"installed_boot_ids": [
"e5ba8528af464b8192312d9aab0db869",
"caa9695c41c64c3d898e12c1bd3234f5"
],
"installer_head": "f135a24d3d88173f611829317e4ad04ebc22eff3",
"iso_sha256": "8599bbc7ff2ed35432bae23692464d4d5afa9ffdfc787699a7be88f2cfc62f5c",
"job_id": 110167226382,
"live_boot_ids": [
"264482abc42a499f80a60606b388f914",
"a02abb74623343f2adfaa01a4f4651a8"
],
"live_boot_passed": true,
"live_reboot_passed": true,
"network": false,
"no_iso_boot_passed": true,
"public_disposable_credentials": true,
"ram_mib": 4096,
"record_sha256": "c481900567db858427663a26909e82a9d30fe2e083c929cb68683a9823e87bb4",
"release_ready": false,
"schema_version": "phios.os-qualification-summary.v1",
"screenshot_visually_reviewed": true,
"signed": false,
"source_commit": "0253b6e0fb27251fe2da37b6d8c1e31245a64290",
"workflow_run": 36798467774
}
2 changes: 2 additions & 0 deletions packaging/arch/phios/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ package() {
install -Dm644 LICENSE_HISTORY.md "$pkgdir/usr/share/doc/phios/LICENSE_HISTORY.md"
install -Dm644 packaging/linux/release.json "$pkgdir/usr/share/phios/linux-release.json"
install -Dm644 PHIOS_SOURCE_COMMIT "$pkgdir/usr/share/phios/source-commit"
install -Dm644 packaging/linux/installer/install.py "$pkgdir/usr/lib/phios-installer/install.py"
install -Dm755 packaging/linux/installer/phios-install "$pkgdir/usr/bin/phios-install"
}
Loading
Loading