docs: approve RFC v0 architectural baseline

Ratify RFC-0001 through RFC-0007 and record decisions through D-061. Define composition, lifecycle, support and release policies; add the approval audit, OSTree capability review and illustrative manifests. Preserve explicit implementation questions and unfrozen schemas.
This commit is contained in:
Pavel Isaev 2026-11-04 00:53:43 +03:00
parent e634698959
commit 0bdec1f6d3
16 changed files with 2006 additions and 65 deletions

View file

@ -1,11 +1,15 @@
# Archipelago — RFC v0
**Status:** Initial working baseline
**Status:** Accepted architectural baseline (D-061)\
**Version:** 0.0
**Date:** 2026-11-03
**Accepted:** 2026-11-04\
**Purpose:** Bootstrap the architecture discussion and implementation contract for the Archipelago project.
> This archive captures decisions and proposals made during the initial RFC Committee discussion. It is an engineering starting point, not a claim that every detail is fully specified or implemented.
> RFC-0001–0007 are accepted as the RFC v0 architectural contract under D-061,
> interpreted with subsequent decisions through D-060. Explicitly open implementation
> contracts and illustrative schemas/paths remain unfrozen. Acceptance does not
> certify implementation, runtime behavior or public-release readiness.
## Documents
@ -13,9 +17,15 @@
- [`rfc/RFC-0002-layers-and-overlays.md`](rfc/RFC-0002-layers-and-overlays.md) — OSTree-backed layers, purpose layers, managed overlays and host extensions.
- [`rfc/RFC-0003-build-and-composition.md`](rfc/RFC-0003-build-and-composition.md) — initial build/composition pipeline and filesystem contract.
- [`rfc/RFC-0004-host-extensions.md`](rfc/RFC-0004-host-extensions.md) — unsupported local package injection and update policy.
- [`rfc/RFC-0005-hooks-and-finalization.md`](rfc/RFC-0005-hooks-and-finalization.md) — package hook phases, baseline action matrix and composition finalization.
- [`rfc/RFC-0006-system-accounts.md`](rfc/RFC-0006-system-accounts.md) — standard system account provisioning, persistent identities and deletion policy.
- [`rfc/RFC-0007-ostree-platform-integration.md`](rfc/RFC-0007-ostree-platform-integration.md) — selected filesystem, pacman database, boot and activation baseline; remaining integration proposals.
- [`spec/decision-log.md`](spec/decision-log.md) — accepted decisions and current proposals.
- [`spec/open-questions.md`](spec/open-questions.md) — unresolved design questions.
- [`spec/rfc-v0-approval-review.md`](spec/rfc-v0-approval-review.md) — completed approval audit, recorded outcomes and remaining implementation gates.
- [`spec/ostree-capability-review.md`](spec/ostree-capability-review.md) — upstream documentation review and RFC integration gaps (2026-11-03); research, not accepted decisions.
- [`examples/desktop-composition.yaml`](examples/desktop-composition.yaml) — illustrative composition manifest.
- [`examples/core-composition.yaml`](examples/core-composition.yaml) — illustrative Archipelago Core composition without Purpose.
- [`examples/managed-overlay.yaml`](examples/managed-overlay.yaml) — illustrative managed overlay manifest.
- [`examples/host-extensions.yaml`](examples/host-extensions.yaml) — illustrative local host extension state.
@ -38,6 +48,12 @@
## Scope note
D-055 permits exactly one Core, zero or one Purpose and zero or more Managed
Overlays. The supported Archipelago Core variant ships without Purpose; users may
select one later or build custom overlay compositions. Custom sets do not
automatically receive official support. Core-only images remain distinct from
Core layer commits and pass the applicable public release gates.
Archipelago uses existing Linux mechanisms wherever practical. OSTree is the foundation for filesystem versioning, deployment, update and rollback. `systemd-nspawn`, pacman, makepkg, DKMS, mkinitcpio, depmod, systemd and established bootloader mechanisms are orchestrated rather than reimplemented.
The exact OSTree representation of a layer, package database strategy, boot integration and filesystem layout remain subject to the detailed contracts listed as open questions. In particular, OSTree does not provide a native semantic layer-merging engine; Archipelago must define and implement deterministic composition.

View file

@ -0,0 +1,24 @@
# Illustrative only. Schema and field names are not frozen.
# D-055: official Archipelago Core ships with zero Purpose layers.
schema: archipelago.composition/v1
metadata:
name: core-x86_64
version: 0.1.0
architecture: x86_64
channel: testing
core:
ref: layers/core/arch
commit: "<exact-ostree-commit-checksum>"
# Purpose is absent; users may select one later through system management.
overlays: []
build:
package_snapshot: "<content-derived-snapshot-id>"
builder: nspawn
reproducibility: full
output:
image_ref: images/core/x86_64/testing

View file

@ -1,11 +1,15 @@
# Illustrative only. Schema and field names are not frozen.
# D-042: this manifest expresses intent (with optional explicit commit pins).
# Resolve/update emits a separate lockfile; build/compose requires a matching lock.
schema: archipelago.composition/v1
metadata:
name: desktop-generic-x86_64
name: desktop-kde-x86_64
version: 0.1.0
architecture: x86_64
purpose: desktop
# D-045/D-050: testing/stable require reproducibility and passing validation;
# developer-only staging is experimental. Promotion retains image commit identity.
channel: testing
core:
@ -13,9 +17,15 @@ core:
commit: "<exact-ostree-commit-checksum>"
purpose:
ref: layers/purpose/desktop
# One concrete Purpose; role/variant semantics accepted in D-041.
# Field names and ref naming remain illustrative.
role: desktop
variant: kde
ref: layers/purpose/desktop/kde
commit: "<exact-ostree-commit-checksum>"
# Authoritative application order (D-039). Constraints validate this list;
# they do not silently reorder it or insert missing required overlays.
overlays:
- ref: layers/overlay/feature-bluetooth
commit: "<exact-ostree-commit-checksum>"
@ -23,9 +33,11 @@ overlays:
commit: "<exact-ostree-commit-checksum>"
build:
package_snapshot: "<pinned-repository-snapshot>"
# D-043: immutable ordered Arch + Archipelago repository set.
package_snapshot: "<content-derived-snapshot-id>"
builder: nspawn
reproducibility: pinned-inputs
# Illustrative policy value; pinned inputs alone do not satisfy D-050.
reproducibility: full
output:
image_ref: images/desktop/x86_64/testing
image_ref: images/desktop/kde/x86_64/testing

View file

@ -3,19 +3,35 @@ schema: archipelago.host-extensions/v1
metadata:
enabled: true
support_status: unsupported
# D-057: enabled/requested state alone does not determine deployment support.
# Report effective support status through archipelago status for the booted image.
packages:
# Explicit requests; transitive dependencies belong in a separate resolved lock.
- name: htop
source: base-snapshot
- path: ./packages/example-driver-0.1-1-x86_64.pkg.tar.zst
sha256: "<package-sha256>"
- path: ./packages/example-tool-2.0-1-any.pkg.tar.zst
sha256: "<package-sha256>"
# Explicit whole-package replacement, distinct from an ordinary addition (D-038).
# Illustrative field names; final request schema remains open.
replacements:
- target_package: mesa
replacement:
path: ./packages/mesa-<patched-version>-x86_64.pkg.tar.zst
sha256: "<replacement-package-sha256>"
update_policy:
strategy: best-effort
# D-056: atomic reapplication; fallback activation requires explicit selection.
reapply_as_atomic_set: true
on_failure:
preserve_previous_deployment: true
preserve_current_deployment: true
preserve_boot_selection: true
preserve_local_inputs: true
offer_supported_upstream_deployment: true
require_explicit_fallback_selection: true
silently_drop_packages: false

View file

@ -26,6 +26,8 @@ packages:
overlay:
permissions:
# Replacements do not implicitly authorize metadata changes, type changes,
# or deletions; those require distinct explicit permissions (D-040).
replace:
- path: /usr/lib/udev/rules.d/90-fingerprint.rules
owner_layer: "layers/purpose/desktop"

View file

@ -1,6 +1,7 @@
# RFC-0001: Archipelago System Architecture
- **Status:** Proposed
- **Status:** Accepted — architectural contract under D-061; explicit implementation questions remain open
- **Accepted:** 2026-11-04
- **Version:** 0.0
- **Date:** 2026-11-03
- **Scope:** Overall system architecture and component boundaries
@ -34,6 +35,23 @@ The project must support three execution contexts through one primary `archipela
## 3. Non-goals
### Initial delivery scope (D-053)
Implement one end-to-end profile first: x86_64 UEFI VM, one concrete Purpose,
local builder, online installation and CLI-driven operations. Select the concrete
Purpose and storage profile before implementing boot integration. The architecture
continues to cover all three Purposes and execution contexts; remote builders,
other Purposes, workload-manager integrations, offline media and advanced storage/
boot features follow in later milestones. D-050–D-052 public release gates apply
to any published testing/stable candidate regardless of delivery scope.
D-055 also defines the supported Archipelago Core variant, shipping with zero
Purpose layers. Users may select one Purpose later or build custom overlay sets;
custom sets do not automatically gain official support but may later be adopted
as an official Purpose. The initial delivery milestone does not restrict this model.
### Architectural non-goals
- Reimplementing OSTree, pacman, systemd, nspawn, DKMS, mkinitcpio, depmod, container runtimes or bootloaders.
- Introducing a Nix-style store-based filesystem or requiring applications to use non-standard binary/library paths.
- Requiring all software to be built from source.
@ -94,7 +112,11 @@ Initial filesystem intent:
| `/tmp` | Temporary writable state |
| `/boot` and ESP | Managed by the selected OSTree/bootloader integration |
Exact partitioning, symlink layout, `/opt` policy and boot integration are not yet frozen.
The initial persistence layout now follows Silverblue-style symlinks into `/var`,
including `/opt`, within one `archipelago` stateroot (D-030). Machine configuration
retains native OSTree `/etc` semantics. systemd-boot is the initial bootloader
(D-033). Exact partitions, `/opt` package adaptation and boot profile remain open;
see [RFC-0007](RFC-0007-ostree-platform-integration.md).
## 5. System components
@ -125,6 +147,13 @@ An OSTree repository/ref namespace containing complete distribution image commit
### 5.5 Release Registry
D-045/D-050 define public `testing` and `stable` image channels, both subject to
full reproducibility and required validation, plus developer-restricted experimental
`staging`. Local reproducible experiments use a local source manifest tree on
user-controlled infrastructure. Promote the exact validated commit without
rebuilding; updates select a coherent full composition.
See RFC-0003 §11.1 for publication and promotion requirements.
Stores distributable artifacts such as installer ISO, RAW and QCOW2 images, repository bundles, checksums, signatures, SBOM and release metadata.
### 5.6 Build Engine
@ -184,6 +213,9 @@ Must be able to:
1. A booted supported system is represented by one complete OSTree image deployment.
2. Layer commits are immutable inputs; composition creates a new complete image commit.
Layers are built independently, without mandatory exact-commit coupling to
lower layers. Core starts from Arch Linux `base` plus `linux` and provides the
foundation for all other layers; package and ABI compatibility still apply.
3. No direct pacman mutation of the live host `/usr`.
4. Build and package installation happen in isolated staging environments.
5. Composition is deterministic for fixed inputs and toolchain.

View file

@ -1,6 +1,7 @@
# RFC-0002: Layer, Purpose and Managed Overlay Model
- **Status:** Proposed
- **Status:** Accepted — architectural contract under D-061; explicit implementation questions remain open
- **Accepted:** 2026-11-04
- **Version:** 0.0
- **Date:** 2026-11-03
- **Scope:** Reusable OSTree layer commits and composition semantics
@ -9,6 +10,24 @@
Every managed layer is an independently versioned OSTree commit with a declared semantic position in the composition model.
Layers are built independently, without mandatory exact-commit coupling to lower
layers. Core does not depend on other layers and provides the foundation for all
others. Compatibility must respect Arch Linux package dependencies and applicable
ABI constraints. Independent builds do not imply compatibility between arbitrary
layer versions. A resolved composition still pins exact input layer commits.
All layers participating in a composition must use the same pinned package
repository snapshot (D-023). Mixing snapshots is forbidden, even if declared
package version dependencies appear satisfiable: ABI and whole-system consistency
must be preserved. Composition must reject snapshot mismatches before merging
payloads. Independent builds share this snapshot contract without requiring
exact-commit coupling between layers. Snapshot equality is necessary but does not
replace package ownership, dependency, conflict or kernel ABI validation.
D-043 defines this snapshot as an immutable ordered Arch plus Archipelago package
repository set with a content-derived `snapshot_id`, target architecture, repository
database checksums and available package identities. See RFC-0003 §4.
Initial layer categories:
- `core` — Archipelago's generic Arch Linux foundation.
@ -25,7 +44,40 @@ A versioned composition input stored as an OSTree commit. It has a manifest, met
### Layer commit
The immutable OSTree commit identified by its checksum. The commit contains the layer payload tree and associated commit metadata. The exact on-disk payload convention is an implementation detail to be frozen by the artifact format specification.
The immutable OSTree commit identified by its checksum. The commit contains the
layer payload tree, package payloads and a package ownership index (D-026), plus
associated commit metadata. D-044 separates a system payload namespace from
layer metadata. Exact namespace names and serialization remain to be frozen.
Illustrative layout:
```text
layer commit
├── payload/
│ └── usr/...
└── metadata/
├── manifest
├── packages
├── overrides
└── provenance
```
Layer commits are composition inputs, not bootable deployments. The payload holds
declared runtime packages and required dependencies, not incidental build tools or
temporary build state. A tool explicitly selected as part of the target system
is legitimate payload even if it is also used during builds.
The package index maps package identities (including version, architecture and
source package checksum) to files and metadata needed to construct a coherent
pacman database. Package content, layer-added configuration, explicit overrides and
generated results must be distinguishable by provenance.
Composition selects indexed content, includes shared packages once, applies
authorized overrides and produces a complete image tree with conventional runtime
paths. Layer metadata is not copied wholesale into that root; image provenance and
the installed-package database are assembled separately. OSTree continues to store
ordinary trees and deduplicate objects; namespaces do not introduce a new store or
non-standard runtime paths.
Important: an OSTree commit represents a tree. OSTree does not itself provide a native semantic layer merge operation. Archipelago defines how layer payload trees are interpreted and merged into a staging filesystem.
@ -39,6 +91,11 @@ A distribution role. Initial values:
Purpose is a first-class semantic category, not a separate operating-system implementation.
D-041 distinguishes the role (`desktop`, `server`, `iot`) from a concrete variant
such as `desktop/kde` or `desktop/gnome`. D-055 revises D-041's cardinality:
a composition selects zero or one concrete Purpose layer. Exact manifest field
names remain open.
### Managed Overlay
A managed, versioned layer with explicitly granted ability to replace files from lower composition positions. It is published to the Layer Registry and participates in normal compatibility validation and provenance.
@ -56,8 +113,21 @@ The deterministic application of the selected Core, Purpose and Managed Overlay
The initial logical order is:
1. Exactly one Arch Core.
2. Exactly one Purpose layer.
3. Zero or more Managed Overlays in a resolved deterministic order.
2. Zero or one Purpose layer (D-055).
3. Zero or more Managed Overlays in their explicit composition-manifest list order (D-039).
The manifest list is authoritative for Managed Overlay order. Each overlay may
declare required overlays, before/after constraints and incompatibilities. The
Composition Engine validates these constraints against the selected list rather
than silently reordering it or inserting missing required overlays. Missing required
overlays, violated ordering, cycles and incompatible selections fail resolution
with diagnostics identifying the offending overlays and constraints.
Later position does not grant replacement rights. Whole-package replacement still
requires explicit intent under D-038; file overrides require their declared path
permissions. Shared dependency ownership follows the explicit order under D-025.
Host Extensions are applied after the managed composition in the local workflow;
D-039 does not define their internal package transaction ordering or request schema.
Illustrative graph:
@ -73,10 +143,29 @@ Arch Core
A composition may select a different Purpose, but it must still resolve to one complete image commit.
D-055 defines the official supported Archipelago Core variant with zero Purpose
layers out of the box. Core-only is a complete composition model, not a bootable
layer commit or a test-only exception. Users may construct custom overlay systems
or select one Purpose later through system management. Adding Purpose creates a
new deployment, validates the complete selection and preserves persistent data.
Further customization uses Overlays or Host Extension packages, never a second
Purpose layer. User-authored overlay sets do not automatically receive official
support; they may later be reviewed and adopted as an official Purpose.
Host Extensions retain their separate unsupported policy.
Host Extensions are applied above the managed composition in a separate local
composition (RFC-0004). Managed Overlays and Host Extensions can change lower
payloads under their respective policies; their position does not grant implicit
unrestricted replacement permissions.
The ordering is logical and does not imply OSTree has native layer stacking. The Composition Engine performs the merge.
## 4. Arch Core responsibilities
Core is built from the Arch Linux `base` metapackage plus the `linux` kernel
package. This is the initial foundation, not an exhaustive package list:
additional firmware and boot/deployment integration inputs must be specified.
Arch Core provides the generic Linux foundation, including:
- Base userspace and package management foundations.
@ -92,6 +181,36 @@ Initial hardware support is bounded by the hardware support provided by Arch Cor
Purpose layers provide role-specific packages, configuration and services.
Desktop implementations include KDE Plasma, GNOME and XFCE. Purpose layers extend
Core but are built independently, without mandatory pinning to an exact Core
commit. Role and variant are distinct under D-041; their schema remains to be frozen.
A multi-desktop installation may use an explicitly designed Purpose variant or an
additional Managed Overlay, but must not select multiple Purpose layers. Display
manager selection, systemd display-manager switching, desktop service defaults
and related integration are responsibilities of the concrete Purpose's content
and lifecycle contract. The generic Composition Engine does not select or switch
desktop components through a separate desktop policy.
D-048 requires Purpose services, service-start scripts and layer runtime checks to
be declared in manifests and executed after deployment in the target lifecycle.
D-047 supplies the common boot-readiness framework without choosing desktop policy.
Under D-051, a Purpose's release validation must demonstrate that all its declared
target services are correctly activated and functional without errors in a clean
supported environment. The manifest defines those services and functional checks.
Under D-052, this is additional to all Core functional gates, which must also pass
on the complete Core + Purpose image; a separately validated Core is insufficient.
User-corrupted persistent/application data is outside that clean-environment
guarantee; correct distribution defaults and service activation remain required.
Changing Purpose produces a new complete deployment and revalidates selected
overlays against it. An incompatible overlay blocks the transition until the user
explicitly resolves the selection. Persistent data is preserved; desktop-specific
user settings are neither automatically converted nor deleted. Native OSTree `/etc`
handling still applies; Purpose integration must respect the shared hook/runtime
contracts and account for administrator configuration rather than bypassing them.
Examples:
- Desktop: desktop environment, display manager, audio stack, desktop services and related tooling.
@ -123,17 +242,54 @@ Replacing a file owned by a lower layer requires explicit permission in the over
The permission must identify:
- The target path or declared path set.
- The lower layer or owner being replaced, unless a narrowly scoped wildcard is explicitly approved.
- The expected lower layer or owner being replaced.
- The operation type.
- A reason or justification.
- Optional expected content hash/version to guard against stale overrides.
An unrestricted `replace_lower_layer_files: true` capability may be supported for explicitly trusted overlays, but it must be visible in metadata, review output and build logs. It must never be granted implicitly.
D-054 excludes unrestricted replacement capabilities, including
`replace_lower_layer_files: true`, from v0. Trusted overlays must also declare
scoped paths or path sets, expected owner, operation and reason.
Persistent machine state is not a normal overlay target. `/var`, `/home`, `/run`, `/tmp`, `/dev`, `/proc` and `/sys` are excluded from ordinary layer payload composition. `/etc` and `/boot` require dedicated integration rules and are not treated as ordinary unrestricted payload paths.
## 8. Conflict rules
The accepted path composition contract (D-040) is:
| Situation | Required behavior |
|---|---|
| Path absent below | Add the entry, subject to payload path policy |
| Shared directory with identical owner, group, mode and xattrs | Merge children |
| Shared directory metadata differs | Require an explicit metadata override |
| Same resolved shared package supplied by multiple layers | Include once under D-025 |
| Different packages claim a file, even with identical content | Fail unless replacement is explicitly authorized |
| File/directory/symlink type differs | Fail unless type change is explicitly authorized |
Explicit file deletion must identify the path, expected owner and reason. Record
it in the composition diff and provenance; a deleted package-owned file is an
explicit file override and must not silently falsify package database records.
Permission to remove a directory does not implicitly authorize recursive removal
of its contents: the operation must explicitly cover affected paths. Type changes
that remove a directory's contents are subject to the same rule.
These operations apply to image composition, not persistent `/var` or `/home`
data, and remain subject to the dedicated `/etc` and boot integration contracts.
Removing an entire package uses package semantics rather than disguising it as
a collection of file deletions. D-054 defers standalone removal of lower-layer
packages until a separate authorization and dependency contract is agreed.
Additions, explicit whole-package replacements and scoped file overrides remain
supported intents. Removing an overlay itself remains recomposition from the
remaining selection, including dependency retention and reassignment under D-025.
Treat symlinks as objects. Do not implicitly follow a symlink when applying an
override: modifying its target and replacing the link are distinct operations.
The implementation must define canonical path resolution for intentional Arch
usr-merge aliases without allowing overrides to escape their declared targets.
Use native OSTree tree operations after validating this policy; union order alone
does not authorize conflicting ownership, metadata changes, deletion or type changes.
Default rule: two layers may not silently claim or replace the same path.
The Composition Engine must:
@ -148,12 +304,81 @@ Two Managed Overlays that conflict must fail unless the later overlay explicitly
## 9. Package database consistency
Package installation and replacement must be performed in the isolated staging root using pacman-compatible mechanisms.
### Explicit package replacement (D-038)
Package addition and replacement of a lower-layer package are separate intents.
An ordinary addition must not silently replace a base package; report the required
replacement and require it to be explicitly declared before applying the transaction.
Record the target and replacement package in the Managed Overlay manifest or Host
Extension request state. Package-manager replacement metadata alone is not a
substitute for that declaration.
Replace whole packages using coherent package metadata and validate dependencies,
conflicts and file ownership across the complete result, plus kernel ABI constraints
where applicable. Do not implement replacement by blindly unpacking files over the
existing tree. Managed payloads still come from layer commits under D-026; this
policy does not require reinstalling them from the Package Registry.
Removing a replacement declaration creates a new composition using the package
from the selected lower/base composition. A base update revalidates every applicable
replacement; Host Extension failures follow D-017. Record the effective owner and
replacement chain without rewriting immutable input commits.
Explicit file overrides by Managed Overlays remain permitted under their path
permissions and provenance rules. A file override is not a whole-package replacement
and must not silently claim that pacman's package content is unmodified.
### Ownership and database assembly
The accepted package ownership model (D-024) is:
- Each package has one effective owning layer within a composition.
- An upper layer reuses a package supplied by a lower layer without duplicating it.
- Dependencies not supplied below belong to the extending layer.
- An overlay must explicitly declare a package replacement; ownership transitions
must be recorded rather than silently creating competing owners.
- A layer's package requirements are described separately from its own payload,
preserving independent builds without mandatory exact lower-layer commit coupling.
Shared dependency ownership is resolved per composition (D-025). If a dependency
is not already provided below, include it once and assign it to the first layer
requiring it in deterministic composition order. Later layers reuse that package.
When the owning layer is removed, a new composition retains the package if other
layers still require it and assigns ownership to the first remaining requiring
layer. Input layer commits remain unchanged; effective ownership is recorded in
the resolved composition metadata.
This rule applies to the same resolved package identity, not arbitrary packages
sharing a name. It does not authorize implicit replacements or bypass dependency,
snapshot, ABI or path conflict checks.
Layer commits carry package payloads and a package ownership index (D-026),
including dependency payloads needed for composition. Independently built commits
may carry the same dependency; the Composition Engine includes the resolved
package only once in the final tree and assigns its effective owner under D-025.
The artifact index describes package content; effective layer ownership is a
property of the resolved composition. Input commits are not rewritten.
Package payloads are materialized from layer OSTree commits rather than installed
from the Package Registry during composition. The Package Registry remains a build
input. OSTree provides storage and content deduplication; package-level selection,
ownership resolution and merge validation are Archipelago responsibilities.
The exact index schema, payload layout and construction of the final coherent
pacman database remain open.
Package transactions in layer builds and Host Extension workflows run in isolated
staging using pacman-compatible mechanisms. Managed composition instead selects
package payloads from layer commits under D-026, including declared replacements;
it assembles coherent database records without replaying package installation.
The final filesystem and package database must describe a coherent state. File-level replacement that bypasses package ownership must be recorded as an explicit unmanaged file override in provenance and must not silently falsify pacman ownership information.
The exact package database model across independently built layer commits is an open question. It must be resolved before production implementation of composition.
D-031 selects a non-default image-owned pacman database location and persistent
working/history copies for Host Extensions; ordinary live-host pacman mutation is
disabled. Exact paths and generation lifecycle are detailed proposals in RFC-0007.
## 10. DKMS and kernel compatibility
A Managed Overlay containing kernel modules must declare compatibility with the exact Core/kernel artifact or an equally strong kernel ABI identity.
@ -196,7 +421,11 @@ A layer can be reused by multiple compositions only when all declared compatibil
A layer version must never be silently retargeted to different content. A changed payload or manifest creates a new immutable commit and version identity.
Composition manifests must pin exact commit checksums for reproducible builds. Human-friendly refs/channels may be used for discovery and update selection, but a resolved build lock must record exact checksums.
D-042 separates manifest intent from a resolved build lock. Manifests may use
human-friendly refs/channels for discovery and update selection, or explicit commit
pins. The lock records exact commits and the common snapshot; composition consumes
those inputs without silently refreshing them. Manifest/lock mismatch requires
resolution again. See RFC-0003 §5 for the accepted lifecycle.
## 13. Acceptance criteria

View file

@ -1,6 +1,7 @@
# RFC-0003: Build Engine, Composition Engine and Linux Filesystem Contract
- **Status:** Proposed
- **Status:** Accepted — architectural contract under D-061; explicit implementation questions remain open
- **Accepted:** 2026-11-04
- **Version:** 0.0
- **Date:** 2026-11-03
- **Scope:** Build and composition pipeline, generic Linux compatibility
@ -25,6 +26,9 @@ The initial build environment is an Arch Linux root filesystem created and manag
Responsibilities:
- Pin the Arch Linux Archive snapshot or controlled package repository state.
- Use the common pinned package snapshot required by all layers of the target
composition (D-023). Reject layers from different snapshots during input
resolution; do not attempt to repair the mismatch through partial upgrades.
- Install build tools and package dependencies.
- Execute pacman and makepkg operations.
- Provide target architecture and kernel build context.
@ -35,6 +39,31 @@ Responsibilities:
## 4. Binary-first package policy
### Common package snapshot (D-043)
A snapshot is one immutable, ordered set of package repositories for a target
architecture. It combines pinned Arch repository content (for example an Arch
Linux Archive slice) with a specific Archipelago package repository revision.
Its description records repository order/priority, repository database checksums
and available package identities. Preserve standard pacman repository priority
semantics rather than inventing a separate package selection precedence.
Derive `snapshot_id` from the content of that description. All managed layers in
a composition declare the same ID, although each selects a different package set.
Publishing, adding or replacing package content requires a new snapshot; published
snapshots must not be mutated. Dates and repository URLs alone are not identity.
Delivery locations may change if retrieved databases/packages match their pinned
checksums. Exact descriptor schema, canonicalization and trust policy remain open.
A snapshot defines the available package universe; a D-042 lockfile records the
inputs actually selected from it. Local Host Extension package files are explicit
external inputs recorded separately, not additions to a published managed snapshot.
Their dependencies are resolved against the selected base and its snapshot under
D-037. Snapshot identity does not itself prove ABI compatibility or replace
signature, dependency and final-composition validation.
### Package selection
Default package flow:
1. Resolve a package from a pinned binary repository.
2. Verify package identity and integrity.
@ -52,6 +81,33 @@ AUR recipes and user-supplied build inputs are untrusted code and must execute o
## 5. Composition pipeline
### Manifest intent and resolved inputs (D-042)
The source manifest declares Core, an optional single concrete Purpose, the ordered Managed
Overlay list, compatibility constraints, composition configuration and explicit
overrides. Human-friendly refs/channels are allowed for discovery; explicit commit
pins are also allowed. A resolved lockfile is a separate record of exact inputs.
Resolve/update produces a new lockfile after compatibility validation. It records:
- Exact OSTree commit checksums for all selected layers and their order.
- The common pinned package snapshot identity and target architecture.
- Resolved package identities, versions and checksums.
- Schema versions and finalization inputs required for repeatable composition,
including declared configuration and relevant tool/environment identities.
Build/compose consumes the locked inputs. It must not resolve newer refs, refresh
package selections or substitute an unavailable artifact silently. Fetching the
exact locked object is allowed; inability to obtain it is an error. A manifest
change that invalidates the lock requires a new resolve before composition.
Record both manifest and lockfile identities in image provenance. The exact schema,
canonical identity representation and compatibility checks remain to be specified.
Pinned inputs provide repeatable resolution; they do not alone establish bit-for-bit
reproducibility of all generators or commits.
### Pipeline stages
Initial logical pipeline:
```text
@ -65,8 +121,14 @@ Resolve exact layer commits and dependencies
|
v
Resolve pinned package/build inputs
|
v
|
v
Validate/write resolved lockfile (resolve/update)
|
v
Build/compose from manifest and matching locked inputs
|
v
Create isolated Arch staging environment
|
v
@ -93,6 +155,49 @@ Build release artifacts when requested
This pipeline is a contract-level outline. Exact staging-root implementation and OSTree APIs are to be specified in implementation RFCs.
Layer builds are independent (D-020). Resolving exact layer commits here pins the
inputs of a particular composition, rather than imposing mandatory exact-commit
coupling between independently published layers. Build inputs must still be
recorded and Arch Linux package and ABI compatibility checked. Cross-layer package
dependency resolution and package database assembly remain open contracts.
D-039 makes the composition manifest's Managed Overlay list order authoritative.
Validate required overlays, before/after constraints and incompatibilities before
payload assembly; report missing dependencies, violated order or cycles without
silently reordering or augmenting the selected list.
D-040 defines the path conflict policy used before native OSTree union operations:
merge directories with matching metadata, reject unauthorized file ownership or
type conflicts, and require explicit metadata overrides and deletions. Symlinks
are objects, not implicit routes to override targets. See RFC-0002 §8.
Package resolution follows D-024: requirements are distinct from a layer's own
payload, each package has one effective owning layer, lower-layer packages are
reused without duplication, and missing dependencies belong to the extending
layer. Overlay package replacements must be explicit. Validate this ownership
model alongside the common snapshot requirement.
Resolve shared dependencies according to D-025: include each resolved package
once, reusing lower-layer providers or assigning it to the first requiring layer
in deterministic order. Record effective ownership in composition metadata.
Recomposition after owner removal retains dependencies still required by remaining
layers and reassigns ownership without modifying input layer commits.
Layer builds capture package payloads and a package ownership index in their
OSTree commits (D-026). Composition materializes selected packages from those
commits, including each resolved shared dependency once. It does not reconstruct
layer payloads by installing packages from the Package Registry. Package resolution
and installation from that registry remain part of layer builds. OSTree supplies
object storage and deduplication; Archipelago supplies package-aware selection
and deterministic merging. Final pacman database construction is still open.
D-044 separates the layer's system payload namespace from its manifest, package
index, override records and provenance. Select content using the index rather than
checking out an entire layer commit as a runtime root. Exclude incidental build
tools/state, preserve provenance of layer changes and generated outputs, and
assemble image metadata and the installed-package database separately. Namespace
names and serialization are not yet frozen.
## 6. OSTree responsibilities
OSTree is used for:
@ -139,10 +244,14 @@ Initial intent:
- `/run`: volatile runtime state.
- `/tmp`: temporary writable state.
- `/boot` and ESP: managed by the chosen boot integration.
- `/opt`: conventional location; ownership and update policy require a separate decision.
- `/opt`: symlink to `/var/opt` under D-030; package payload adaptation remains open.
Layer payloads must not directly inject persistent user data. The exact path allowlist/denylist and special handling of `/etc`, `/boot` and `/opt` are open questions.
RFC-0007 records the accepted Silverblue-style persistent-data symlinks, shared
stateroot, native `/usr/etc` defaults and per-deployment `/etc`, systemd-boot focus,
staged updates and the Arch-supplied OSTree version baseline (D-030–D-035).
## 9. Hooks and scripts
Hooks may be used for build-time configuration and validation. They must be:
@ -155,6 +264,17 @@ Hooks may be used for build-time configuration and validation. They must be:
Runtime first-boot actions are a separate mechanism and must not be confused with build-time hooks.
D-027 accepts phase separation: install packages and execute package scripts in
isolated layer builds; regenerate system-wide derived artifacts against the final
composition; required failures block publication. Deferred hooks must have explicit
replacements, and package scripts must not be blindly replayed during composition.
D-058 accepts complete action classification, explicit deferred-action mappings,
network-free finalization with locked inputs and explicit order, and required
failure capture even when pacman exits successfully. D-059 accepts selected action
placements; RFC v0 approval under D-061 accepts the architectural baseline while
leaving exact adapters and schemas open. The action matrix and execution contracts are specified in
[RFC-0005](RFC-0005-hooks-and-finalization.md).
## 10. Caching
The build system should cache:
@ -181,10 +301,122 @@ For each layer and image, record:
- Output OSTree commit checksum.
- Signature and signing identity.
Bit-for-bit reproducibility is a target, but the project must distinguish it from traceability and repeatable dependency resolution. Any nondeterministic inputs must be identified.
D-050 requires full reproducibility for publication to both `testing` and `stable`,
not merely traceability or repeatable dependency resolution. Fixed source manifests,
locks and declared build inputs must reproduce the image content and canonical
commit identity. Nondeterministic inputs must be eliminated or explicitly normalized
in the release build contract. Exact comparison scope for additional release
artifacts and signatures, canonical metadata rules and the required independent
rebuild evidence remain to be specified before this gate can be implemented.
Operational logs, wall-clock execution times and individual builder attestations
must not introduce uncontrolled variation into the canonical image identity; their
storage and binding to the result need a defined provenance contract.
### 11.1 Release channels and promotion (D-045)
The public image update channels are `testing` and `stable`, supplemented by an
access-restricted experimental `staging` channel (D-050). A channel is a
mutable reference to an immutable complete image commit; deployments always use
an exact commit. Use native OSTree refs, signature mechanisms and summary files,
supplemented by Archipelago release metadata.
Build and validate the candidate before publication. Make its objects and required
metadata available before publishing the new channel target. A failed build or
required validation must leave the previous channel target unchanged and available.
The exact publication transaction across refs, signatures, summary and any external
release metadata remains to be specified; native OSTree alone is not a guarantee
of multi-registry atomic publication.
Promote a tested image from `testing` to `stable` by referencing the same commit,
not by rebuilding or creating a new commit with different metadata. Channel-specific
promotion records must not change that image identity. Exact channel ref naming,
required validation matrix, reproducibility evidence and retention periods remain open.
Both public channels must satisfy full reproducibility and all required build,
composition, script and runtime validation gates. Known failures must not be waived
merely because the destination is `testing`. Runtime scripts/checks are exercised
after deployment in the declared supported validation environments before publishing
the candidate to a public channel; this does not move runtime actions into layer
builds or remove their manifest-driven lifecycle.
`testing` is where new software and RFC-driven behavior are validated and observed
before promotion to `stable`; it is not the destination for known broken builds.
Detailed promotion criteria and the hardware/VM/Purpose validation matrix remain
open. This release requirement does not imply that every possible machine condition
can be proven failure-free, and does not remove D-047/D-049 runtime diagnostics,
retention or explicit user-controlled rollback.
Experiments belong in two contexts:
- `staging`, restricted to selected Archipelago developers. Access must be enforced
by registry/source infrastructure as applicable, not merely hidden ref names.
- Reproducible local environments on user-controlled infrastructure, built from a
local source manifest tree. Users may modify and break these environments; source
changes and resolved inputs must be captured so the experiment can be repeated.
Experimental outputs do not become public `testing`/`stable` releases until they
pass the public release gates. They must not accidentally advance public refs.
Update selection operates on a coherent complete composition. Do not independently
update Core while retaining Purpose or overlays from another package snapshot.
Custom compositions resolve and validate a complete new lockfile before preparing
a deployment. Host Extensions are then reapplied to that selected result under
D-017/D-037, rather than being silently included in a supported published image.
## 12. Acceptance criteria
### 12.1 Public-channel functional gates (D-051)
Both `testing` and `stable` candidates must pass the following integration checks
in controlled validation environments, in addition to the existing build checks.
**Arch Core:**
D-055 defines the official Archipelago Core variant with zero Purpose layers.
Run these gates on its complete Core-only image and on every Core + Purpose
candidate under D-052. Core layer commits remain composition inputs; Core-only
images still undergo composition, finalization and deployment validation.
- Boot the candidate through the selected boot integration.
- Authenticate successfully through local login using a provisioned test user.
- Install a representative package through Host Extensions, finalize and activate
the resulting deployment, and verify the package is usable without required
check or script errors.
- Apply a representative Managed Overlay, finalize and activate the resulting
deployment, and verify its declared effect without required check or script errors.
Exercise the supported lifecycle, not merely a successful CLI return or an
unactivated staging tree. The Host Extension result remains a local unsupported
composition; testing that mechanism does not promote it into the published image.
Fixtures must obey the selected snapshot and replacement policies. Exact fixture
packages/overlays and test harness remain to be specified.
**Purpose:**
- Inherit every Arch Core gate above (D-052): boot, local login, Host Extension
installation/activation and Managed Overlay application/activation must pass on
the complete Core + Purpose candidate. A Purpose deployment necessarily includes
Core; results from an isolated Core test do not replace full-composition tests.
- In a clean, supported environment, all declared target services have their
required defaults, enablement/activation and dependencies in place.
- The services start and satisfy their declared functional readiness checks without
errors. A unit state alone is not proof of functional behavior; handle oneshot,
socket-activated and other service types according to their intended lifecycle.
- Purpose manifests define the target services, activation behavior and checks;
the generic release system does not invent desktop-specific policy.
The clean-environment guarantee excludes failures attributable to user-corrupted
persistent or application data. It still requires distribution-controlled settings
and activation to work. This boundary does not excuse defects in our own scripts,
defaults or supported transition logic, and does not authorize deletion of user data
to make a check pass. Runtime diagnostics and explicit rollback remain available.
These are functional release gates, not a proof of bit-for-bit reproducibility.
D-050's independent reproducibility evidence remains a separate open contract.
### 12.2 Build and composition checks
- Build runs on a supported non-Arch Linux host.
- Build isolation prevents host package/filesystem mutation.
- Binary packages are used by default.

View file

@ -1,13 +1,17 @@
# RFC-0004: Host Extensions and Unsupported Local Modifications
- **Status:** Proposed; update policy B accepted in discussion
- **Status:** Accepted — architectural contract under D-061; explicit implementation questions remain open
- **Accepted:** 2026-11-04
- **Version:** 0.0
- **Date:** 2026-11-03
- **Scope:** Local package injection outside the supported managed composition
## 1. Summary
Host Extensions provide an explicitly unsupported mechanism for installing local `.pkg.tar.zst` packages into a host-specific composition.
Host Extensions provide an explicitly unsupported mechanism for installing
packages into a host-specific composition. D-037 extends the initial local
`.pkg.tar.zst` interface to package selection by name from the base image's pinned
repository snapshot, while retaining local package file inputs.
The feature exists for experimentation, unusual hardware, one-off utilities, patched packages and other modifications that should not become part of the supported Archipelago distribution contract.
@ -17,7 +21,10 @@ Host Extensions are separate from Managed Overlays:
## 2. User intent and support boundary
Enabling or installing the first Host Extension marks the resulting host composition as `unsupported`.
Under D-057, support status describes the current booted deployment. Applying Host
Extensions makes the resulting composition `unsupported`; merely enabling the
feature, requesting packages or preparing a pending deployment does not change
the booted deployment's status. Requested and pending state is shown separately.
This status means:
- Archipelago does not guarantee compatibility of the modified composition.
@ -34,6 +41,8 @@ Host Extensions must not run pacman against the live immutable host `/usr`.
Instead:
1. User explicitly enables Host Extensions and acknowledges the unsupported status.
2. Archipelago imports or references local `.pkg.tar.zst` packages.
Alternatively, resolve explicitly requested package names from the selected
base's pinned repository snapshot (D-037).
3. Packages are verified and recorded.
4. A staging root is created from the selected base image.
5. pacman installs the local packages into the staging root with a coherent package database.
@ -46,6 +55,52 @@ The exact implementation may use a local pacman repository or a controlled packa
## 4. Local state and history
### 4.1 Accepted intent and generation model (D-037)
Persist the user's explicitly requested extension set separately from automatically
resolved dependencies. Each local generation records its base image commit,
package snapshot, resolved package versions/checksums, result commit, matching
base-plus-extensions package database, and validation results.
Support two input kinds:
- Package names resolved from the pinned repository snapshot of the selected base.
- Local `.pkg.tar.zst` files retained with checksums; their compatibility must be
validated rather than inferred from their availability or filename.
Resolve dependencies against the selected base and its pinned repository snapshot,
including explicitly supplied local packages as transaction inputs. Do not consult
an unrelated live/latest Arch repository for missing dependencies. Managed layers
still obey D-023; accepting local package inputs does not classify them as managed
snapshot-compatible layers or remove the unsupported status.
Compose from the selected base and full requested extension set. The working
database starts as a copy of that base's database and, after successful installation,
describes the full local composition. Retain its persistent generation copy and
the corresponding database in the resulting image. A writable workspace does not
replace the authoritative database of an already committed deployment.
On base change, resolve named requests against the new base snapshot and reapply
the declared set using the new base's database. Retained local files remain exact
inputs until explicitly changed; incompatible files invoke D-017 failure handling.
Never carry an old mutated database forward as though it described a new base.
Removing an extension changes explicit intent and recomposes from the base plus
the remaining set. Dependencies required by neither the base nor remaining
extensions are omitted. Persistent application/user data and prior generation
history are not implicitly removed. Package replacements follow D-038 below;
detailed schema and dependency policy beyond this baseline remain to be specified.
Package addition and base-package replacement are distinct requests (D-038).
An addition requiring replacement must report that requirement instead of silently
changing the base package. Explicit replacement requests identify the target and
replacement and operate on whole packages through the staging transaction.
Validate the full resulting dependency set, conflicts, file ownership and applicable
kernel ABI. Removing an override recomposes from the selected base and remaining
requests. Revalidate replacements on base updates; D-017 applies on failure.
### 4.2 Persistent storage
Host Extension inputs and state must persist independently of the currently booted deployment.
Illustrative layout:
@ -66,8 +121,19 @@ The final path is not frozen. The required properties are:
- No package is silently discarded during update.
- Cleanup requires explicit user action.
D-046's automatic deployment/cache cleanup does not authorize deletion of these
local package inputs or generation history. Preserve the OSTree roots needed for
protected local recovery state; removing an unpinned deployment must not silently
invalidate history that remains promised as recoverable. See RFC-0007 §6.1.
## 5. Update policy: best-effort reapplication (Option B)
D-031 selects persistent package database working/history copies; D-037 accepts
the generation lifecycle and repository-backed selection described above and in
RFC-0007 §4. Each copy is associated with its base image; periodic maintenance alone
must not allow a stale database to describe another base's payload. Exact storage
schema and safe cache reuse mechanics remain open.
**Decision: Option B is selected.**
When a supported upstream image is updated:
@ -76,10 +142,14 @@ When a supported upstream image is updated:
3. If all packages install and validation passes, Archipelago creates a new unsupported host-specific image commit containing the updated base plus Host Extensions.
4. If reapplication fails, Archipelago must not silently force incompatible packages into the new image.
5. The supported upstream image remains installable and bootable without Host Extensions.
6. The user is informed that the new deployment excludes some or all Host Extensions and is given a clear diff and recovery choice.
6. On failure, preserve the current deployment and boot selection. Offer the new
supported image without the entire extension set, with a clear diff; activate
that fallback only on explicit user selection (D-056).
7. The previous deployment and local package inputs remain available for rollback or manual repair.
The exact activation UX must be designed so the user does not accidentally lose access to their previous working deployment.
D-056 prohibits automatic fallback activation and silently dropping individual
packages. Exact CLI presentation remains open; the previous working deployment
and local inputs must remain available.
### 5.1 Failure handling
@ -98,17 +168,37 @@ Archipelago may offer:
### 5.2 Partial reapplication
The default should be atomic as a set: either the declared Host Extension set is reapplied and validated as a whole, or the resulting deployment is created without that set. Partial application must require an explicit future policy and user-visible declaration.
D-056 requires atomic reapplication of the declared set: all packages install and
the complete result passes validation, or reapplication fails. A failed attempt
must not publish a partially applied local image or change boot selection.
The unmodified upstream image remains an explicit fallback choice. Users may change
the requested set and retry; this is a new explicit request, not automatic partial
reapplication.
## 6. Status model
Initial statuses:
D-057 defines support status for the current booted deployment:
- `supported` — no Host Extensions are present in the effective host composition.
- `unsupported` — one or more Host Extensions are applied.
- `recovery` — the user is selecting or restoring a known deployment after a failed transition.
- `supported` — an officially supported composition without effective local
modifications outside its support contract, including the official Core-only image.
- `unsupported` — a composition with applied Host Extensions or user-authored
modifications/custom overlays outside the official support contract.
Status must be queryable through `archipelago status` and visible before update/apply operations.
There is no `recovery` status or separate recovery state in this model. Selecting
or booting an older deployment does not itself change its support classification;
the effective composition determines that classification. Absence of Host Extensions
alone is insufficient to classify an arbitrary custom overlay set as supported.
Status is primarily diagnostic evidence for issue reports. Expose the current
deployment and base identities, effective overlays and local package/file changes
with their provenance where available. Requested extension state and pending
deployments must be clearly distinguished from the booted result. Enabling the
feature without applying changes does not make an official image unsupported.
Exact reporting format and detection of out-of-band modifications remain open;
an empty extension request list is not proof of an unmodified tree.
Status must be queryable through `archipelago status` and visible before update/apply
operations, identifying which deployment each reported classification describes.
## 7. Rollback and removal

View file

@ -0,0 +1,216 @@
# RFC-0005: Package Hooks and Composition Finalization
- **Status:** Accepted — architectural contract under D-061; explicit implementation questions remain open
- **Accepted:** 2026-11-04
- **Version:** 0.0
- **Date:** 2026-11-03
- **Scope:** Baseline hook classification, generated artifacts and execution lifecycle
## 1. Contract and decision boundary
D-027 accepts the principle: package installation and package scripts execute in
isolated layer builds; system-wide generated artifacts are regenerated against the
complete composition; required failures prevent publication. Runtime initialization
is a separate lifecycle. D-058 additionally accepts classification of every package
hook/scriptlet action, blocking publication on unknown actions, explicit replacements
or lifecycle mappings for deferred actions, final-composition aggregate generation,
network-free finalization with locked inputs and explicit ordering, and publication
failure on any required action failure even when pacman succeeds.
D-059 accepts final-composition generation of aggregate schema, MIME, icon and
library caches, vendor hwdb, selected distribution locales and distribution trust
outputs. Mutable font caches, machine account/directory provisioning, machine-id
and SSH host keys belong to the installed target lifecycle. Services start in the
target deployment; initial defaults are declared and administrator enablement choices
are preserved across updates. Machine-local trust, hwdb and linker configuration
changes require corresponding cache regeneration integration.
D-061 accepts this architectural baseline as part of RFC v0. Exact finalizer schemas,
adapter contracts and explicitly open integration choices remain unfrozen.
Snapshot-specific adapters, command lines and paths must be specified and verified
before implementing the selected features; package approval is not runtime evidence.
This contract orchestrates existing Arch tools. OSTree stores the resulting trees
and manages deployments; it does not execute or resolve package hooks. No claim of
identical behavior to Fedora's implementation is required by this contract.
## 2. Execution phases
| Phase | Input and responsibility | Permitted result |
|---|---|---|
| Layer build | Pinned packages, build dependencies and classified package scripts/hooks in an isolated Arch environment | Package payloads, package index, declared layer-owned changes and generator inputs |
| Composition finalization | Complete selected package payloads, overrides, coherent package metadata and target profile | Composition-owned caches, indexes, module metadata and initramfs |
| Deployment preparation | Validated image and explicit target installation context | OSTree configuration integration and boot artifacts installed through the selected boot backend |
| Runtime initialization | Booted deployment and persistent machine state | System accounts, mutable directories, runtime caches and normal service lifecycle |
Composition finalization also applies to local Host Extension compositions. Local
package installation remains an isolated transaction under RFC-0004; an upstream
image's derived artifacts must be regenerated when affected by those packages.
## 3. Package scripts versus ALPM hooks
Package `.INSTALL` scriptlets and ALPM `.hook` files are distinct mechanisms.
Disabling an ALPM hook does not disable an equivalent action embedded in a scriptlet.
Before a managed layer is published, inventory scripts and hooks from its pinned
packages. Classify every executable action as build-local, replaced by a finalizer,
deferred to deployment/runtime, or explicitly inapplicable with a recorded reason.
An unclassified executable hook/script blocks publication until its effects are
understood. This is a compatibility requirement, not a new package manager.
During actual package transactions retain libalpm trigger semantics, including
PreTransaction/PostTransaction, Depends, NeedsTargets and filename ordering.
Use documented hook overrides to suppress actions moved out of layer build;
record the original hook identity/checksum and its replacement. Do not silently
disable all hooks or treat a successful pacman exit as proof that every hook passed.
ALPM AbortOnFail applies only to PreTransaction hooks; Archipelago must also capture
required PostTransaction failures and reject the build.
Scriptlets execute only in isolated staging. If a scriptlet embeds a deferred or
forbidden action, use a reviewed package adaptation or execution adapter with
explicitly defined semantics. Do not assume a generic no-op wrapper is sufficient.
Do not replay all install/upgrade scriptlets over an assembled composition: it is
not a pacman transaction, and scripts may have non-idempotent side effects.
## 4. Baseline action matrix
Commands below identify tools, not frozen command lines or hook filenames. Exact
adapters and their source hook mappings must be checked against the pinned snapshot.
An action is required whenever its declared inputs/feature are selected; absence
of the feature is a recorded not-applicable result, not an ignored failure.
| Action family | Layer build | Final composition / later phase | Output and validation |
|---|---|---|---|
| DKMS | Build modules against the declared target kernel ABI; capture module payload | Validate all selected modules against each target kernel; do not implicitly rebuild managed modules | Module files and ABI/provenance checks; required build/signing failures block publication |
| `depmod` | May run for isolated module validation; intermediate indexes are not final payload | Run after final module selection and any required module signing, for every target kernel release | Regenerate module dependency/alias indexes; validate required module dependency resolution |
| `ldconfig` | May run when build tools need an operational staging linker cache | Run against final target libraries and linker configuration before consumers such as initramfs generation | Validate library links and cache; `/etc/ld.so.cache` integration requires the filesystem contract |
| `mkinitcpio` | Defer image generation from package hooks | Run after final modules, firmware, config and `depmod`; explicitly select target kernel and output | Inspect initramfs contents and required boot modules; boot contract determines artifact placement |
| GLib schemas (`glib-compile-schemas`) | Preserve schema sources; defer authoritative aggregate cache | Compile all final schemas | `gschemas.compiled` in the selected schema directory; compiler failure is fatal |
| GIO modules (`gio-querymodules`) | Preserve module payloads | Generate module cache for each selected ABI/directory | `giomodule.cache`; require target-compatible execution |
| GdkPixbuf loaders (`gdk-pixbuf-query-loaders`) | Preserve loader payloads | Generate loader cache for each selected ABI/directory | Loader paths must refer to the deployed filesystem, never the temporary staging path |
| Desktop entries (`update-desktop-database`) | Preserve `.desktop` sources | Regenerate the aggregate application MIME cache | `mimeinfo.cache` from final desktop entries |
| MIME database (`update-mime-database`) | Preserve MIME source definitions | Regenerate database from the complete source set | Generated shared MIME database under the target data directory |
| Icon themes (`gtk-update-icon-cache`) | Preserve theme files | Regenerate caches for applicable themes | Theme caches must reflect final icon contents, including removals |
| Fonts (`fc-cache`) | Preserve fonts and configuration | Runtime-populated mutable cache by default; use an isolated temporary cache if build tools require one | No layer-owned `/var/cache/fontconfig`; offline precomputation needs an explicit cache lifecycle contract |
| CA trust (`update-ca-trust` / selected Arch trust tooling) | Preserve trust sources | Regenerate distribution trust outputs; machine-local anchors require separate runtime integration | Verify generated bundles and links; never import build-host trust configuration |
| Hardware database (`systemd-hwdb update`) | Preserve hwdb source files | Compile the distribution database into the vendor `/usr` location using the snapshot-supported adapter | Vendor `hwdb.bin`; administrator overrides need a machine-local regeneration policy |
| `locale-gen` | Preserve locale sources and declared distribution locale selection | Generate only explicitly selected distribution locales | Locale archive/data; never inherit the build host's locale selection |
| `systemd-sysusers` | Temporary account creation is allowed if needed for packaging; not authoritative host account state | Validate merged declarations; create missing machine accounts through the target lifecycle before dependent services/tmpfiles | Preserve existing accounts; stable UID/GID and immutable file ownership policy must be resolved |
| `systemd-tmpfiles` | Only explicitly scoped temporary build setup | Validate definitions; apply mutable/runtime directory setup through normal target lifecycle | Do not bake persistent `/var` contents into layers or run blanket cleanup on host data |
| Service presets and enablement | Package service start/restart is suppressed; retain units and presets | Apply declared initial defaults through deployment/first-boot policy | Do not reset administrator enablement choices on every update; preset application details remain open |
| `daemon-reload`, udev reload/trigger, sysctl, binfmt | No effects on the build host; retain declarative configuration | Normal service/boot lifecycle on the target | No live host service restart, device trigger or kernel configuration mutation during build |
| `kernel-install`, `bootctl`, GRUB configuration, ESP writes | Defer live boot installation side effects | Only selected deployment/installer backend with explicit target | Never access the builder's ESP, NVRAM or live boot entries |
| Machine identity, SSH host keys, random seed | Must not generate distributable host-specific state | Initialize per installation through target lifecycle | No shared machine-id, host private keys or random seed in published images |
| `mandb`, info indexes and other documentation caches | Classify according to selected packages | Immutable aggregate indexes are finalized; mutable caches use runtime lifecycle | Exact tool/output adapters are required when these features are selected |
Build-only utilities and their dependencies must not accidentally enter the final
image. All adapters run with tools compatible with the pinned target snapshot and
architecture; cross-architecture execution support is a separate builder capability.
## 5. Generated output and ordering contract
1. Resolve the common snapshot, exact layer commits, package ownership and explicit
replacements; validate package dependencies and filesystem conflicts.
2. Assemble final payloads. Classify and exclude intermediate aggregate outputs
from layer builds by explicit generator output declarations, not broad deletion.
3. Establish coherent package metadata and validate account/file ownership inputs.
4. Run selected finalizers in a deterministic dependency graph. Library setup must
precede consumers; final signed module payloads precede `depmod`; `depmod`, final
firmware and initramfs configuration precede `mkinitcpio`.
5. Validate generated outputs and filesystem policy, then create/sign/publish the
image. No finalizer mutates an input commit or an already published image.
Finalizers declare stable IDs, tool identity, input selectors, output paths,
prerequisite IDs, execution phase, required condition, timeout and network policy.
Cycles, undeclared overlapping outputs and missing required tools are errors.
Baseline finalization uses no network; all required inputs are resolved beforehand.
Within otherwise unordered actions use stable action-ID ordering. ALPM filename
ordering applies to real ALPM transactions, not to this separate finalization graph.
Baseline correctness regenerates every applicable aggregate from the complete
composition, including removals, rather than pretending a layer merge is a pacman
upgrade transaction. Incremental skipping is a future optimization requiring
complete input fingerprints and equivalent output validation.
Generated outputs have composition-generator provenance, distinct from effective
package ownership. If an output replaces a package-provided cache, declare that
relationship and preserve truthful package database records. The exact database
representation is part of the still-open package metadata contract.
The output contract must describe `/etc` and `/var` caches explicitly; generating
a file in staging alone does not establish correct OSTree configuration merging or
runtime cache invalidation. Features with unresolved required output placement
cannot claim implementation readiness.
## 6. Isolation, failure and boot boundaries
Execute against a disposable writable staging root, without writable hardlink
aliasing to shared OSTree objects. A root-directory option or chroot alone is not
the isolation boundary. Do not expose the host service manager, live ESP or writable
host state. Finalizers may write only their declared outputs and temporary workspace.
Record action inputs, tool versions, commands, exit status, logs and output hashes.
Required failure, timeout, missing output or failed validation prevents publication
and activation. Preserve the previous deployment. In the Host Extension workflow,
apply the RFC-0004 fallback policy instead of publishing a broken local image.
Use an explicit target kernel, never `uname -r`. Generic release initramfs must not
depend on the builder's devices, `/proc/cmdline`, credentials or disk identifiers.
Hardware autodetection requires a separate explicitly host-specific deployment
profile. Distinguish ALPM hooks, mkinitcpio build hooks, initramfs runtime hooks and
mkinitcpio post hooks. Post hooks must also be classified: implicit signing or ESP
installation is not allowed outside the selected artifact/deployment policy.
Runtime initialization must be retryable and preserve existing machine state.
Under D-048, Purpose services, service-start scripts and layer runtime checks are
manifest-declared and run after deployment in the appropriate target lifecycle.
Booted-target service activation is distinct from offline deployment preparation.
Build checks/finalizers still execute before publication under D-027. D-047 defines
required boot checks and prohibits automatic reboot; see RFC-0007 §6.2.
Dropping a layer does not authorize deleting its users or persistent application
data. Persistent-state migrations require their own forward/rollback contract.
## 7. Acceptance criteria
- Two independently built layers contributing schemas, desktop entries or modules
produce aggregate outputs covering both after composition.
- Removing a contributor removes stale entries from regenerated image-owned caches.
- Package hooks cannot start host services or modify host `/boot`, ESP or `/var`.
- A required PostTransaction hook failure blocks layer publication even if pacman
otherwise completes; a finalizer failure blocks image publication.
- Kernel artifacts use the selected image kernel rather than the build-host kernel.
- Unknown executable hooks require classification; all deferred hooks have an
explicit replacement or lifecycle mapping.
- Generated ownership and package metadata remain coherent after an overlay override.
- Input commits and repository objects remain unchanged by finalizer writes.
- Repeated finalization has equivalent semantic output; nondeterminism is reported.
- Boot tests verify runtime account/directory setup and preservation of machine
configuration and data across update and rollback.
## 8. Remaining implementation contracts
D-028 and D-029 now define the accepted account lifecycle and deletion policy in
[RFC-0006](RFC-0006-system-accounts.md). Use standard Arch/systemd provisioning,
preserve existing IDs and reconcile on every boot; system/service account deletion
is prohibited in Archipelago workflows. A custom global UID/GID registry is not
selected. D-032/D-036 select native deployment-local account state and the
single-user MVP scope; universal account synchronization is not required.
Initial provisioning, non-root payload ownership and recovery details remain open.
- Snapshot-specific hook inventory, scriptlet adaptations and adapter command lines.
- Package index and coherent pacman database assembly before finalization.
- OSTree `/etc` defaults, linker/trust caches and local override reconciliation.
- Stable UID/GID assignment across independent builds and persistent host accounts.
- Boot artifact layout, initramfs hook set, signing and installer integration.
- Manifest schema for generators, generated file ownership and runtime initialization.
See also [open questions](../spec/open-questions.md).
## 9. References
These describe tool behavior, not a pinned Archipelago package snapshot:
- [ALPM hooks](https://man.archlinux.org/man/alpm-hooks.5.en)
- [mkinitcpio](https://man.archlinux.org/man/mkinitcpio.8.en)
- [systemd-sysusers](https://man.archlinux.org/man/systemd-sysusers.8.en)
- [systemd-tmpfiles](https://man.archlinux.org/man/systemd-tmpfiles.8.en)

View file

@ -0,0 +1,170 @@
# RFC-0006: System Account Provisioning and Reconciliation
- **Status:** Accepted — architectural contract under D-061; explicit implementation questions remain open
- **Accepted:** 2026-11-04
- **Version:** 0.0
- **Date:** 2026-11-03
- **Scope:** Layer account declarations, machine identity persistence and account lifecycle
## 1. Accepted baseline
Use Arch Linux package declarations and standard systemd mechanisms for system
account provisioning. Do not introduce an alternative user database, relocate the
standard account files or impose a global Archipelago UID/GID allocation scheme.
Preserve explicit upstream assignments and dynamic allocation semantics.
Layers supply declarations, while the installed machine owns account state:
- `/usr/lib/sysusers.d/*.conf`: system users, groups and membership declarations.
- `/usr/lib/tmpfiles.d/*.conf`: directory creation, permissions and ownership.
- Service units: `User=`, `Group=`, `StateDirectory=` and related standard settings.
- `/etc/passwd`, `/etc/group`, `/etc/shadow`, `/etc/gshadow`: machine account state.
Account databases generated in independent layer build environments must not be
merged into the machine account database. Temporary build accounts are not an
authoritative source of installed-host identity.
Immutable payload ownership must be validated. Root ownership is an expected
common case, not an assertion that every upstream package contains only root-owned
files. Non-root ownership requires a resolvable target identity; dynamically
allocated staging IDs must not silently become unrelated host identities.
## 2. Boot and update lifecycle
Reconcile on the first boot and on each subsequent boot, including booting an
updated or rolled-back deployment:
1. Make the target deployment's effective configuration and preserved account
state available.
2. Run standard `systemd-sysusers` provisioning for missing system accounts and
groups, preserving existing identity and UID/GID assignments.
3. Prepare mutable directories through the appropriate tmpfiles/service lifecycle.
4. Start dependent services after their required provisioning succeeds.
Use standard systemd ordering and dependency mechanisms. Do not create a second
implementation of sysusers or duplicate `StateDirectory=` handling with generated
tmpfiles rules when the unit already manages the directory.
Reconciliation is additive, not an exact-state deletion loop:
| Change | Required behavior |
|---|---|
| New account/group declaration | Provision if absent using standard sysusers semantics |
| Existing system identity | Preserve its UID/GID and existing machine state |
| Group membership declaration | Apply standard sysusers semantics; do not invent wholesale membership replacement |
| Layer or declaration removed | Retain the account/group and persistent data |
| Conflicting requested identity or UID/GID | Diagnose; do not silently renumber an existing account |
| Ownership migration required | Use an explicit migration contract, not implicit recursive chown |
Respect standard configuration precedence, including administrator overrides.
Validate the effective declarations, not a concatenation of every configuration
file. Composition validation must identify conflicting account declarations and
explicit UID/GID allocations. Runtime validation additionally considers existing
machine accounts that were unavailable to the image builder.
Provisioning must be retryable. Failures must be visible and must prevent dependent
services from running with an unresolved or incorrect identity. They must not
trigger account deletion or overwrite unrelated account state.
## 3. Account deletion policy
Archipelago-managed account deletion is permitted only for human/user accounts,
on explicit user request. Service and system accounts must not be deleted through
Archipelago account-management, update, rollback, rebase, purpose-switch or cleanup
workflows. This includes accounts whose originating layer has been removed.
Do not provide a force-delete exception for system/service accounts. Retain their
identity assignments and system groups; neither a missing declaration nor an
apparently unused account authorizes deletion or identity recycling.
D-060 clarifies that this prohibition concerns persistent system/service account
records. Standard systemd `DynamicUser=` allocation and release are normal service
lifecycle, not Archipelago deletion of persistent accounts. Preserve that upstream
behavior without implementing a custom transient-identity lifecycle. This does not
authorize deletion of persistent account records or application data. Ambiguous
human-versus-system identities remain ineligible for Archipelago account deletion.
Deleting a human account does not implicitly authorize deletion of its home,
other persistent data or shared groups. Data cleanup requires separate explicit
intent and must not affect system/service identities.
The distinction between human and service/system accounts needs a precise
classification contract. A UID threshold alone is insufficient: upstream or
administrator-created service accounts may not fit a single numeric range.
Ambiguous identities must not be treated as eligible for deletion. The concrete
classification and provenance format remain open.
This policy defines supported Archipelago operations. It does not claim that a
privileged administrator is technically unable to modify Linux account files
directly; enforcing such a restriction through a replacement account subsystem
is not part of this contract.
## 4. Deployment transitions and persistent identity
The initial proposal required all system identities to survive every deployment
transition. D-032 refines that requirement: adopt native OSTree per-deployment
configuration semantics without assuming a global identity synchronization layer.
Account provisioning preserves identities present in the effective configuration;
it cannot recover records absent from an older deployment's `/etc`.
The initial UX targets a generic single-user PC (D-036). Provision the primary
human user in the initial deployment as part of installation/onboarding, before
creating subsequent normal rollback targets. Normal forward configuration
inheritance preserves that account. This is a provisioning and workflow contract,
not a guarantee that arbitrary historical deployments contain every current user.
An additional user created after an older deployment was prepared may be absent
when that deployment is booted. This is an accepted MVP edge case, not a requirement
for global account synchronization. Shared `/var/home` retains the user's data.
Manual recovery recreates the account with its original UID/GID and existing home;
it must not replace the home or reassign it to a different identity. Credentials
and supplementary group membership may also need to be restored or reset. Check
for conflicting UID/GID assignments before recreating an account.
Changed credentials and explicit human-account deletions likewise do not
automatically propagate to older deployments under native OSTree semantics.
The implementation must explicitly document account behavior when preparing or
selecting deployments. Distinguish a new deployment of an older commit with current
configuration from directly booting a previously prepared deployment. Validate
primary-user continuity and document the accepted later-account recovery scenario;
do not promise stronger guarantees than the default merge provides. See RFC-0007 §5.
Standard account paths remain in `/etc`. No choice of additional identity ledger,
storage relocation or reconciliation implementation is made here. Any required
Archipelago metadata must be minimal and justified by deployment continuity or
classification requirements, rather than replacing upstream account management.
D-036 removes universal latest-account/credential continuity as an MVP blocker.
Exact initial provisioning, recovery instructions and interrupted-transition tests
remain to be specified within the native OSTree model.
## 5. Acceptance criteria
- First boot creates declared service identities before dependent services start.
- Repeated boots preserve assigned IDs and existing persistent data ownership.
- An update adding a service account provisions it without renumbering existing accounts.
- Removing a layer or reverting Purpose retains its system accounts and groups.
- Archipelago rejects deletion of service/system accounts, including orphaned ones.
- Standard `DynamicUser=` services allocate and release transient identities through
systemd without Archipelago deleting persistent system-account records (D-060).
- Explicit deletion of a human account does not implicitly delete its data.
- Conflicting declarations/assignments are diagnosed without silent renumbering.
- Independent build account databases do not become merged host account state.
- Update and both rollback paths are tested for account visibility, human login,
credentials and shared-data ownership against the explicitly chosen transition
policy; unconditional identity continuity is not assumed after D-032.
- Interrupted provisioning can be retried without duplicate identities or data loss.
## 6. Open implementation questions
- Classification and provenance of human versus persistent service/system accounts,
including pre-existing and administrator-created accounts; D-060 preserves the
standard lifecycle of transient `DynamicUser=` identities.
- Preservation of account state and credentials across OSTree deployment transitions.
- Validation and reporting of conflicts between image declarations and local state.
- Explicit migration procedures when upstream changes account names or fixed IDs.
- Exact systemd dependency integration and recovery diagnostics.
See [open questions](../spec/open-questions.md) and
[RFC-0005](RFC-0005-hooks-and-finalization.md).

View file

@ -0,0 +1,275 @@
# RFC-0007: OSTree Platform and Arch Package Integration
- **Status:** Accepted — architectural contract under D-061; explicit implementation questions remain open
- **Accepted:** 2026-11-04
- **Version:** 0.0
- **Date:** 2026-11-03
- **Scope:** Filesystem layout, package database lifecycle, boot and deployment baseline
## 1. Standard platform baseline
Use the OSTree package supplied by Arch Linux, pinned as part of the common package
snapshot (D-023), rather than independently tracking an upstream development build.
At review time, Arch Extra x86_64 supplies `ostree 2026.6-1`. This observation is not
a permanent version freeze: subsequent snapshot updates select their Arch version.
Record package version/checksum and validate required build features.
Use native OSTree objects, tree union primitives, transport, deployments and
configuration handling. Archipelago adds package semantics and lifecycle policy.
Accepting upstream mechanisms does not mean enabling every optional feature.
composefs, runtime integrity modes and signing policy still require explicit choices.
## 2. Filesystem layout
Adopt the Silverblue-style persistent-data layout with one `archipelago` stateroot
across Purpose changes and normal rebases:
| Runtime path | Persistent backing |
|---|---|
| `/home` | `/var/home` |
| `/root` | `/var/roothome` |
| `/srv` | `/var/srv` |
| `/opt` | `/var/opt` |
| `/usr/local` | `/var/usrlocal` |
| `/mnt` | `/var/mnt` |
Expose these paths via symlinks. A separate home filesystem is mounted at
`/var/home`. Provision required target directories through standard systemd
mechanisms. `/usr` remains image-owned; `/var` is shared within the stateroot.
“Persistent data in `/var`” does not relocate machine configuration: `/etc` remains
the standard per-deployment writable configuration, with image defaults in
`/usr/etc` and native OSTree merge behavior. `/run` and `/tmp` remain temporary;
the exact `/tmp` backing/mount profile is not frozen by this decision. `/boot`, ESP,
physical `/sysroot` and repository storage retain their OSTree-specific roles.
Selecting `/opt -> /var/opt` does not make package payloads there image-updatable.
Packages that install binaries under `/opt` need an explicit adaptation policy;
copying them to persistent storage once cannot meet managed update/rollback
semantics. The symlink decision is accepted; such package handling is still open.
## 3. Installed package database and host-facing pacman
Keep the authoritative installed-package database in each image at a non-default
location, preserving the pacman/libalpm database format. Ordinary live-host pacman
mutation is disabled; supported host package operations go through Archipelago.
Standard pacman remains available in controlled build/staging environments.
The exact disabling mechanism is open: moving the database alone is not a way to
disable pacman. Do not falsify package ownership or silently remove a package-owned
binary. Decide explicit packaging/entrypoint behavior and read-only inspection UX.
Proposed paths, not frozen interfaces:
```text
/usr/lib/archipelago/package-db/ # immutable image database
/var/lib/archipelago/host-extensions/generations/<id>/ # persistent local history
package-db/ # base + extension result
inputs/ # lock and package references
result/ # base/result commit identities
```
Separate authoritative installed-package state from repository sync metadata,
download caches and logs. Every resulting local image must retain database state
matching its own payload, regardless of later changes to the persistent workspace.
### 3.1 Documented pacman controls
Use explicit configuration and command-line arguments:
- `--dbpath` / `-b`, or `DBPath` in pacman.conf: database location.
- `--config`: explicit configuration file.
- `--root` / `RootDir`: installation root; explicitly supplied database/cache/log
paths are not automatically prefixed by this root.
- `--sysroot`: mounted guest root semantics, including prefixing configuration
directories. This differs from `--root` and must be tested in the chosen adapter.
- `--cachedir`, `--hookdir`, `--gpgdir`, `--logfile`: explicit auxiliary paths.
The reviewed pacman manuals do not document a generic database-location environment
variable. Do not invent or rely on `PACMAN_DBPATH` or similar variables. Root/path
selection is not a sandbox: transactions still execute inside an isolated environment.
## 4. Persistent Host Extension database
The accepted intent is to retain a writable copy of the base package database in
persistent storage, record changes from host-scope package installation there, and
retain it as input/history for local composition. The resulting database describes
the full base plus extensions, not only the locally added packages.
The following generation lifecycle is accepted by D-037:
1. Identify the exact base image commit, database identity and package snapshot.
2. Create an isolated staging root and a working database copy corresponding to it.
3. Apply the declared Host Extension package set through pacman/libalpm; capture
dependency resolution, package inputs and modified database.
4. Finalize/validate the tree and commit its matching installed-package database.
5. Retain the local generation in `/var` with its base/result identities and inputs.
6. On a different base, start from that new base's database and reapply the declared
extension set. Do not patch an unrelated old installed-package database in place.
Periodic maintenance, especially during major updates, can refresh caches or prune
explicitly eligible history. It cannot be the only correctness trigger: every base
transition must verify database/payload identity before reusing a working copy.
Reuse is possible when compatibility and equivalence are established; a stale copy
must never silently describe a newer filesystem. This reconciles the proposed local
database lifecycle with RFC-0004's already accepted best-effort update policy.
Previous generation records remain available on failure and rollback. The current
booted image, pending image and writable workspace are distinct states, not one
global mutable database.
D-037 extends the initial local-file interface: users may request package names
from the base's pinned repositories or supply local package files retained by
checksum. Keep explicit requests separate from resolved dependencies. On base
updates, named requests resolve against the new snapshot and local file inputs are
revalidated. Resolve dependencies from the base snapshot, not live/latest Arch.
Removing an extension recomposes from the base and remaining intent while preserving
persistent data. D-038 accepts explicit whole-package replacement intent, separate
from additions; detailed request schema remains open. See RFC-0004 §4.
## 5. Account behavior and rollback
Accept native OSTree per-deployment `/etc` semantics. This refines D-028: no custom
global account synchronization is assumed merely to preserve every service identity
in every historical deployment. The prohibition on Archipelago deleting service
accounts remains an account-management policy (D-029).
D-036 scopes the initial UX to a generic single-user PC. The primary user is
provisioned in the initial deployment and inherited through normal forward
configuration handling. Rolling back to a deployment predating an additional user
may omit that account; this is an accepted edge case with manual recovery using
the original UID/GID and retained home. Shared `/var/home` preserves data, not
necessarily current credentials or supplementary group membership.
Universal synchronization of current accounts into all old deployments is not an
MVP requirement. Distinguish creating a new deployment from an older commit with
current configuration from booting an existing old deployment. Test initial-user
continuity and document later-user recovery under these native semantics.
## 6. Boot and activation
The initial bootloader is systemd-boot (UEFI). GRUB 2 is not a required initial
backend. Native OSTree deployment and BLS mechanisms should be reused, with actual
systemd-boot boot-entry discovery/selection tested rather than assumed.
Arch's current OSTree package already supplies:
- `/usr/lib/initcpio/install/ostree`
- `/etc/ostree-mkinitcpio.conf`
- `ostree-prepare-root` and its systemd unit
Start by reviewing and testing this packaged integration. Do not write a duplicate
mkinitcpio hook based solely on upstream documentation emphasizing dracut.
Proposed image artifact locations follow OSTree recommendations:
`/usr/lib/modules/<kver>/vmlinuz` and
`/usr/lib/modules/<kver>/initramfs.img`. Exact initramfs configuration, ESP/XBOOTLDR
layout, systemd-boot installation/update and Secure Boot remain open.
Use staged deployments as the normal update path with explicit retention policy.
D-046 defines the retention baseline below. Pin/unpin UX and shutdown-finalization
failure reporting remain to be specified. D-049 excludes health-check-triggered
automatic rollback: provide diagnostics and an explicit user command instead.
Persistent-data schema migrations remain separate from OS rollback.
### 6.1 Deployment retention and cleanup (D-046)
Preserve at least:
- The currently booted deployment.
- The previous deployment selected for rollback, when one exists.
- A prepared pending deployment, when one exists.
- Every explicitly pinned deployment, using native OSTree pinning.
These are protected roles, not a requirement to manufacture historical deployments
on a fresh installation. Preparing an update must preserve the booted deployment
and the existing rollback option. Older unpinned deployments become eligible for
automatic cleanup only after a successful transition, preserving the required set.
A successful transition requires system readiness and completion of required
Archipelago checks. Selecting a boot entry, reaching early boot or merely scheduling
an update is not sufficient. D-047/D-048 define the lifecycle below; the exact
manifest schema and success-record persistence remain open.
Until success is established, do not retire the protected recovery deployment.
This cleanup gate does not itself select an automatic rollback mechanism.
On insufficient disk space, first reclaim eligible caches and old unpinned
deployments without violating these retention rules. If insufficient space remains,
stop preparation with actionable diagnostics rather than deleting protected state
or forcing activation. Cache eligibility must exclude retained Host Extension inputs.
User data, local Host Extension package files and their history are outside automatic
deployment cleanup and require a separate explicit cleanup request. Use native
OSTree object collection after computing retained deployments and refs; keep roots
needed to preserve protected local generations and their recoverable image/database
state. Do not delete repository objects through an independent filesystem sweep.
### 6.2 Manifest-driven runtime readiness (D-047/D-048)
Core declares minimum required checks: the expected deployment is booted, required
filesystems are available and base initialization has completed. The concrete
Purpose declares its additional service/readiness requirements. Do not infer global
failure from any optional service failure or an undeclared desktop assumption.
D-051 defines the public-release integration suite in RFC-0003 §12.1: Core boot,
local login, Host Extension installation and Managed Overlay application, plus
Purpose service functionality in a clean environment. These release tests do not
replace inherited coverage: D-052 requires all Core gates to pass on the complete
Core + Purpose candidate as well as the Purpose-specific service checks. They do not
install test packages or apply fixture overlays on every end-user boot. Runtime
readiness checks observe the real target deployment's declared requirements.
Purpose activation follows standard unit semantics; not every working service is
necessarily a continuously running process. User-corrupted data is outside the
clean-environment guarantee without exempting distribution defects or authorizing
automatic data reset.
Purpose services, scripts that start services and layer runtime checks must be
described in manifests. Execute them after deployment in the target lifecycle,
using systemd units with explicit ordering, bounded execution time and diagnostics.
Service activation and boot readiness checks belong to the target booted deployment;
preparing a new deployment must not start its services on the old running system.
Offline deployment preparation may install declared configuration but must not be
confused with runtime activation.
Record success against the specific deployment and current boot only after its
required checks pass. An older success record must not substitute for checking a
new transition. Required failure preserves recovery state, exposes diagnostics and
blocks cleanup that depends on successful activation.
There is no automatic reboot in MVP. Selecting the rollback deployment as the
default for the next boot is separate from rebooting or changing the running root.
D-049 requires an explicit user rollback command. Failed required checks must not
change the default boot entry, switch the running deployment or reboot. Report
actionable diagnostics and recommend rollback with a command identifying the
available recovery target. The user makes the final decision. An explicit rollback
selects the recovery deployment for the next boot through native OSTree mechanisms;
it does not implicitly reboot. Exact CLI syntax remains to be specified.
Build validation and global artifact generation remain pre-publication operations
under D-027. The post-deployment rule applies to runtime activation and checks,
not to dependency/ABI/conflict validation or finalization needed to create a valid
image. Manifest declarations must distinguish these phases.
## 7. What can be reused from Fedora Atomic
Reuse the architectural principles: isolated offline composition, a complete
deployable image, base plus explicit local changes, regenerated aggregates,
immutable per-image package metadata and standard mutable-state separation.
Do not claim an identical implementation. rpm-ostree imports individual RPMs as
OSTree commits and documents running post/posttrans scripts during composition.
Our D-027 currently places package scripts in layer builds and uses explicit finalizers.
Copying RPM script execution semantics verbatim would require reconsidering that
decision and adapting it to ALPM; it is not an automatic consequence of reusing
Fedora's principles. Core/Purpose/Managed Overlay categories remain Archipelago's model.
## 8. Sources
- [Fedora Silverblue technical information, documentation source](https://raw.githubusercontent.com/fedora-silverblue/silverblue-docs/master/modules/ROOT/pages/technical-information.adoc)
- [Arch OSTree package](https://archlinux.org/packages/extra/x86_64/ostree/)
- [Arch OSTree file list](https://archlinux.org/packages/extra/x86_64/ostree/files/)
- [pacman manual](https://man.archlinux.org/man/pacman.8.en)
- [pacman.conf manual](https://man.archlinux.org/man/pacman.conf.5.en)
- [rpm-ostree architecture](https://coreos.github.io/rpm-ostree/architecture-core/)
- [OSTree deployments](https://ostreedev.github.io/ostree/deployment/)
- [OSTree `/var` handling](https://ostreedev.github.io/ostree/var/)

View file

@ -4,26 +4,81 @@ This file is the compact record of architectural decisions discussed by the RFC
| ID | Decision | Status |
|---|---|---|
| D-001 | OSTree is the foundation for immutable filesystem storage, commits, refs, deployments, updates and rollback. | Proposed |
| D-002 | Archipelago uses existing Linux mechanisms (nspawn, pacman, DKMS, mkinitcpio, depmod, systemd) rather than reimplementing them. | Proposed |
| D-003 | A managed Layer is an independently versioned OSTree commit. | Proposed |
| D-004 | A composition resolves layer commits and produces one complete image OSTree commit. | Proposed |
| D-005 | Source manifests, RFCs, composition definitions and build recipes are stored in Git. | Proposed |
| D-006 | Registry infrastructure is part of the initial architecture, not a later optional feature. | Proposed |
| D-007 | Initial purpose categories are Desktop, Server and IoT. | Proposed |
| D-008 | A dedicated Hardware Layer category is excluded from the initial scope; generic support comes from Arch Core and its kernel capabilities. | Proposed |
| D-009 | Hardware-specific adaptations can be expressed through Managed Overlays and hardware profile manifests. | Proposed |
| D-010 | Managed Overlays are versioned OSTree commits and may replace lower-layer files only with explicit permissions. | Proposed |
| D-011 | DKMS modules are built against a specific kernel ABI and required build/validation failures block publication. | Proposed |
| D-012 | Binary packages are preferred; source builds are exceptions for adaptation, unavailable packages, project-owned software and DKMS. | Proposed |
| D-013 | The resulting OS preserves conventional Linux filesystem and ELF execution contracts; no Nix-style store model is introduced. | Proposed |
| D-014 | Host Extensions allow explicit local `.pkg.tar.zst` injection outside the supported managed composition. | Proposed |
| D-015 | Applying Host Extensions changes host support status to `unsupported`. | Proposed |
| D-016 | Host Extension failures do not obligate changes to Arch Core, Archipelago source code or RFCs. | Proposed |
| D-001 | OSTree is the foundation for immutable filesystem storage, commits, refs, deployments, updates and rollback. | Accepted |
| D-002 | Archipelago uses existing Linux mechanisms (nspawn, pacman, DKMS, mkinitcpio, depmod, systemd) rather than reimplementing them. | Accepted |
| D-003 | A managed Layer is an independently versioned OSTree commit. | Accepted |
| D-004 | A composition resolves layer commits and produces one complete image OSTree commit. | Accepted |
| D-005 | Source manifests, RFCs, composition definitions and build recipes are stored in Git. | Accepted |
| D-006 | Registry infrastructure is part of the initial architecture, not a later optional feature. | Accepted |
| D-007 | Initial purpose categories are Desktop, Server and IoT. | Accepted |
| D-008 | A dedicated Hardware Layer category is excluded from the initial scope; generic support comes from Arch Core and its kernel capabilities. | Accepted |
| D-009 | Hardware-specific adaptations can be expressed through Managed Overlays and hardware profile manifests. | Accepted |
| D-010 | Managed Overlays are versioned OSTree commits and may replace lower-layer files only with explicit permissions. | Accepted |
| D-011 | DKMS modules are built against a specific kernel ABI and required build/validation failures block publication. | Accepted |
| D-012 | Binary packages are preferred; source builds are exceptions for adaptation, unavailable packages, project-owned software and DKMS. | Accepted |
| D-013 | The resulting OS preserves conventional Linux filesystem and ELF execution contracts; no Nix-style store model is introduced. | Accepted |
| D-014 | Host Extensions allow explicit local `.pkg.tar.zst` injection outside the supported managed composition. | Accepted |
| D-015 | Applying Host Extensions changes host support status to `unsupported`. | Accepted |
| D-016 | Host Extension failures do not obligate changes to Arch Core, Archipelago source code or RFCs. | Accepted |
| D-017 | Host Extension update behavior uses best-effort reapplication (Option B); on failure, deploy the supported upstream image without extensions as an available choice and preserve the prior deployment and local inputs. | Accepted |
| D-018 | Host Extensions must not directly mutate the live immutable `/usr`; they are applied in staging and materialized as a local OSTree deployment. | Proposed |
| D-019 | Persistent user and runtime state must not be implicitly deleted by update, rollback, rebase or purpose changes. | Proposed |
| D-018 | Host Extensions must not directly mutate the live immutable `/usr`; they are applied in staging and materialized as a local OSTree deployment. | Accepted |
| D-019 | Persistent user and runtime state must not be implicitly deleted by update, rollback, rebase or purpose changes. | Accepted |
| D-020 | Layers are built independently, without mandatory exact-commit coupling to lower layers. Core is independent of other layers and provides the foundation for all others. Compatibility respects Arch Linux package contracts and applicable ABI constraints; resolved compositions still pin exact input commits. | Accepted |
| D-021 | Arch Core starts from the Arch Linux `base` metapackage plus the `linux` kernel package. Additional firmware and boot/deployment integration inputs remain to be specified. | Accepted |
| D-022 | Purpose layers extend Core, with desktop implementations such as KDE Plasma, GNOME and XFCE. Managed Overlays and local Host Extensions occupy upper composition positions and can change lower payloads under their respective policies. | Accepted |
| D-023 | All layers in a composition must use one common pinned package repository snapshot. Mixing snapshots is forbidden because it risks ABI and system breakage. Independent layer builds must conform to this shared snapshot contract. | Accepted |
| D-024 | Each package has one effective owning layer in a composition. Upper layers reuse packages provided below without duplication; dependencies absent below belong to the extending layer. Overlay package replacement must be explicit. Layer package requirements are described separately from the layer's own payload, preserving independent builds. | Accepted |
| D-025 | A shared package dependency absent from lower layers is included once and owned by the first requiring layer in deterministic composition order. Other layers reuse it. Recomposition after removal of its owner retains the package if still required and assigns a new owner. Effective ownership belongs to the resolved composition and does not mutate input layer commits. | Accepted |
| D-026 | Layer OSTree commits contain package payloads and a package ownership index, including dependency payloads needed for composition. The Composition Engine includes each resolved package once from these commits and records its effective owner. Package Registry installation is not the mechanism for materializing layer package payloads during composition. Exact index format and final pacman database construction remain open. | Accepted |
| D-027 | Package installation and package scripts execute in isolated layer builds; system-wide generated artifacts are regenerated against the final composition in explicitly declared steps (including depmod before mkinitcpio). Required failures block publication. Runtime initialization is a separate lifecycle. Detailed hook classification is proposed in RFC-0005. | Accepted |
| D-028 | Layers supply standard Arch/systemd sysusers, tmpfiles and service declarations. Reconcile system accounts at every boot using standard mechanisms, preserve existing UID/GID assignments, and retain accounts/groups when declarations disappear. Do not merge build account databases or impose a global custom UID/GID registry. Identity continuity across OSTree update/rollback requires an explicit implementation contract. | Accepted |
| D-029 | Archipelago permits explicit deletion only of human/user accounts, not service/system accounts, including those no longer referenced by a layer. Preserve system identities/groups; account deletion does not implicitly authorize persistent-data deletion. Reliable account classification remains to be specified. | Accepted |
| D-030 | Use one `archipelago` stateroot and Silverblue-style persistent-data symlinks into `/var`, including `/opt -> /var/opt`. Keep standard OSTree per-deployment `/etc` and `/usr/etc` defaults. Packaged `/opt` content still needs an adaptation contract. | Accepted |
| D-031 | Store the image's pacman-format installed-package database outside pacman's default location; disable ordinary live-host pacman mutation. Retain persistent working/history database copies for Host Extension composition. Exact paths, disabling mechanism and safe refresh/generation lifecycle remain to be specified in RFC-0007. | Accepted |
| D-032 | Adopt native OSTree per-deployment configuration and rollback semantics, refining D-028's cross-deployment continuity requirement. Human-user access preservation remains a priority and an unresolved contract because native rollback does not guarantee latest account/credential state. D-029 remains the account-deletion policy. | Accepted |
| D-033 | Focus the initial boot integration exclusively on systemd-boot; reuse OSTree and the Arch-packaged mkinitcpio integration where suitable. Other bootloaders may be considered later. | Accepted |
| D-034 | Use staged deployments for normal updates and an explicit retention policy. Retention counts, finalization failure UX and health-based automatic recovery remain open. | Accepted |
| D-035 | Use the OSTree version supplied by Arch Linux, pinned with the common package snapshot and recorded package identity. Optional deployment features remain explicit choices. | Accepted |
| D-036 | Initial account UX targets a generic single-user PC: provision the primary user in the initial deployment and preserve it through normal forward configuration inheritance. Native rollback to a deployment predating an additional user may omit that account; this is an accepted edge case with manual recovery using the same UID/GID and retained home data. Universal latest-account/credential synchronization is not required for MVP. Refines D-032. | Accepted |
| D-037 | Host Extensions preserve explicit user package intent and generation history. Build each local image from its selected base and matching package database; on base changes reapply the declared set to the new base rather than carrying an old mutated database forward. Removing an extension recomposes from the base and remaining intent, preserving persistent data. Inputs may be packages selected by name from the base's pinned repository snapshot or local package files retained by checksum; resolve dependencies from that snapshot and validate local package compatibility. D-017 governs reapplication failure. | Accepted |
| D-038 | Package addition and lower-layer package replacement are distinct explicit intents. Additions must not silently replace base packages. Replacements operate on whole packages with final-composition dependency, conflict, ownership and applicable kernel ABI validation, and are recorded in managed manifests or local requests. Removing an override recomposes with the selected base package; base updates revalidate overrides, with D-017 handling Host Extension failures. Explicit Managed Overlay file overrides remain a separate provenance-tracked mechanism. | Accepted |
| D-039 | Composition order is Core, Purpose, Managed Overlays in the explicit composition-manifest list order, then local Host Extensions. Overlays may declare required overlays, before/after constraints and incompatibilities. Validate rather than silently reorder the list; missing required overlays, violated ordering, cycles and incompatibilities fail with diagnostics. Later position grants no implicit replacement permission. | Accepted |
| D-040 | Add absent paths; merge common directories only with matching ownership, modes and xattrs unless metadata override is explicit. Deduplicate shared packages under D-025; different packages claiming a file conflict even with identical bytes unless replacement is authorized. Type changes require explicit permission. File deletions declare path, expected owner and reason, are recorded in diff/provenance, and do not implicitly authorize recursive directory deletion or persistent-data mutation. Treat symlinks as objects without implicitly following them for overrides. Whole-package removal uses package semantics. | Accepted |
| D-041 | A composition selects exactly one Purpose, distinguished by role (Desktop/Server/IoT) and concrete variant (e.g. desktop/kde or desktop/gnome). Multiple desktop environments require an explicitly designed Purpose variant or additional Managed Overlay, not multiple Purpose layers. Purpose changes create a new deployment, preserve persistent data and do not automatically migrate/delete desktop user settings. Revalidate overlay compatibility; incompatible overlays block the transition until explicitly resolved. Display-manager selection, systemd switching and other desktop integration belong to the concrete Purpose's content and lifecycle contract, not a generic compositor desktop policy. | Accepted |
| D-042 | Separate declarative manifest intent from a resolved lockfile. Resolve/update records exact layer commits, common package snapshot, architecture, resolved package versions/checksums, schema versions and finalization inputs. Build/compose consumes locked inputs without silently refreshing or substituting artifacts. Missing artifacts fail; manifest/lock mismatch requires a new resolve. Images record manifest and lock identities in provenance. | Accepted |
| D-043 | A package snapshot is an immutable, ordered repository set combining pinned Arch repositories and an Archipelago repository revision for a target architecture, with repository database checksums and available package identities. Its content-derived snapshot_id is shared by all managed layers; package changes create a new snapshot. Dates/URLs alone are not identity; transport locations may change if locked content matches. A snapshot defines available packages, while a lock records selected inputs. Local Host Extension files are explicit external inputs with dependencies resolved from the base snapshot. | Accepted |
| D-044 | Layer commits separate a system payload namespace from layer metadata (manifest, package index, overrides and provenance). They are composition inputs, not bootable deployments. Payload includes declared runtime packages/dependencies, excluding incidental build tools/state. The package index maps package identity/checksum to files and metadata needed for a coherent pacman database; layer changes and generated outputs have distinct provenance. Composition selects indexed content, deduplicates shared packages and applies authorized overrides; layer metadata is not copied wholesale into the OS root. Exact namespace names and serialization remain illustrative. | Accepted |
| D-045 | Initial image update channels are testing and stable, implemented with native OSTree refs/signatures/summary plus release metadata. Publish validated immutable image commits; promote testing to stable by pointing to the same commit without rebuilding. Make objects and required metadata available before channel publication; failed required checks leave the previous channel target unchanged. Updates select a coherent full composition, never mixed-snapshot layer updates. Custom compositions resolve/validate a complete new lock before deployment; Host Extensions are reapplied afterward. Exact release gates and retention remain open. | Accepted |
| D-046 | Retain the booted deployment, a previous rollback deployment, a pending deployment when present, and all explicitly pinned deployments. Preparation preserves current/rollback recovery. Older unpinned deployments may be cleaned after a successful transition, defined by system readiness and required Archipelago checks, with optional Purpose-specific checks. On low space, clean eligible caches/old unpinned deployments while preserving the minimum; otherwise stop the update. User data and Host Extension package inputs/history require separate explicit cleanup. Use native OSTree pinning and garbage collection with retained deployment/ref roots. | Accepted |
| D-047 | Core defines required boot readiness checks; Purpose may add explicitly declared checks, executed through systemd with bounded time and diagnostics. Record success for the specific deployment after checks on the current boot; optional service failures do not implicitly fail the transition. Required failure preserves recovery state and blocks success-gated cleanup. No automatic reboot in MVP. Rollback boot selection and reboot are separate actions; automatic versus explicit selection of the previous default entry on check failure remains to be clarified. | Accepted |
| D-048 | Purpose services, service-start scripts and layer runtime checks must be declared in manifests and execute after image deployment in the appropriate target lifecycle. Start services and run boot checks only in the target booted deployment, not against the currently running host while preparing a replacement. Build-time validation and artifact finalization remain before publication under D-027. | Accepted |
| D-049 | Rollback requires an explicit user command. Failed required boot checks do not automatically change the default boot entry, switch the running deployment or reboot. Report the failure and recommend rollback with an actionable command; the user makes the final decision. An explicit rollback selects the recovery deployment for the next boot without implicitly rebooting. Resolves D-047's boot-selection question. | Accepted |
| D-050 | Public testing and stable both require full reproducibility and successful required validation, including applicable scripts and runtime checks in the supported validation matrix; known failing checks/scripts block publication. Testing validates new software and RFC-driven changes before stable, not broken builds. Experiments belong in access-restricted staging for selected Archipelago developers or reproducible local environments on user-controlled infrastructure using a local source manifest tree. Extends D-045's channel model and strengthens the reproducibility baseline; exact reproducibility evidence and validation matrix remain to be specified. | Accepted |
| D-051 | Public-release functional validation covers Core boot, local login, successful Host Extension package installation/activation and Managed Overlay application/activation. Validate the resulting system, not just command success. Purpose validation in a clean environment requires declared target services to be enabled/activated as intended and operational without errors. User-corrupted persistent/application data is outside this clean-environment guarantee; distribution-controlled defaults and activation must work. These functional gates apply to testing and stable and do not replace separate reproducibility evidence. | Accepted |
| D-052 | Purpose release validation inherits every Core functional gate from D-051, since a Purpose deployment includes Core. Run boot, local login, Host Extension installation/activation and Managed Overlay application/activation against the complete Core + Purpose candidate, then validate Purpose-specific services. Passing Core separately does not waive those checks for the composed Purpose image. | Accepted |
| D-053 | Retain the full architecture while implementing one end-to-end profile first: x86_64 UEFI VM, one concrete Purpose, local builder, online installation and CLI-driven operations. Select the concrete Purpose and storage profile before boot integration. Other Purposes, remote builders, workload-manager integrations, offline media and advanced storage/boot features follow in later milestones. Public release gates remain unchanged. | Accepted |
| D-054 | RFC v0 excludes unrestricted Managed Overlay replacement capabilities, including replace_lower_layer_files: true. Replacements require scoped paths/path sets, expected owner, operation and reason, including for trusted overlays. Support additions, explicit whole-package replacements and scoped file overrides. Standalone removal of lower-layer packages is deferred pending a separate authorization/dependency contract; mass file deletion must not simulate it. Removing an overlay remains recomposition from the remaining selection under D-025. | Accepted |
| D-055 | A composition contains exactly one Core, zero or one Purpose, and zero or more Managed Overlays. The official supported Archipelago Core variant ships with zero Purpose layers. Users may construct custom overlay systems or select one Purpose later through system management, creating a validated new deployment while preserving data. Further customization uses Overlays or Host Extension packages, not additional Purpose layers. Custom overlay sets do not automatically gain official support but may later be adopted as an official Purpose. Core functional gates apply to Core-only images and every Core + Purpose candidate; Purpose service gates apply when selected. Supersedes only D-041's mandatory Purpose cardinality, preserving its other policies and D-052. | Accepted |
| D-056 | Reapply the complete Host Extension set atomically on base update. If installation or validation fails, preserve the current deployment, boot selection, prior recovery deployment and local inputs. Offer the new unmodified supported upstream image, but activate it only on explicit user selection. Do not automatically drop individual packages or activate fallback. Users may explicitly change the requested set and retry. Refines D-017's failure policy. | Accepted |
| D-057 | Support status describes the current booted deployment and its effective local modifications, primarily for issue diagnostics. Merely enabling Host Extensions or requesting/preparing changes does not alter that deployment's status; show requested and pending state separately. Applied Host Extensions make the deployment unsupported. Absence of Host Extensions alone does not establish official support for a custom overlay composition. Remove recovery from the status model rather than adding a separate recovery state. Report deployment/base identities and effective local modifications so issue reports distinguish official images from user-modified compositions. | Accepted |
| D-058 | Classify every package hook/scriptlet action into layer build, composition finalization, deployment preparation or runtime, with explicitly justified inapplicable actions. Unknown actions block publication until reviewed. Deferred actions require explicit replacements/lifecycle mappings; do not silently disable hooks. Generate system-wide indexes and initramfs against the final composition. Finalization uses predetermined locked inputs, no network and explicit action ordering. Required action failures block publication even when pacman itself exits successfully. Extends D-027; snapshot-specific adapters and individual action-matrix policies remain separate implementation/approval work. | Accepted |
| D-059 | Finalize aggregate schema, MIME, icon and library caches, vendor hwdb, selected distribution locales and distribution trust outputs against the composed image. Populate mutable font caches, system accounts/directories, machine-id and SSH host keys through the installed target lifecycle. Start services in the target deployment; declare initial defaults and preserve administrator enablement choices across updates. Machine-local trust, hwdb and linker configuration changes require corresponding cache regeneration integration. Reuse Arch/systemd tools; verify exact commands and paths against the pinned snapshot. Accepts these RFC-0005 action-family placements without freezing adapter/schema details. | Accepted |
| D-060 | D-029's deletion prohibition applies to persistent system/service account records. Standard systemd DynamicUser= allocation and release remain normal service lifecycle, not Archipelago deletion of a persistent account. Do not introduce a custom identity lifecycle for these transient users. Accounts whose human-versus-system classification is ambiguous remain ineligible for deletion through Archipelago. | Accepted |
| D-061 | RFC Committee approves RFC v0 (RFC-0001–0007) as an architectural contract on 2026-11-04, interpreted with D-020–D-060. Ratifies D-001–D-016 and D-018–D-019 with subsequent refinements. Explicitly open implementation contracts, formats, adapters, package database assembly, boot profile and reproducibility evidence remain to be agreed; illustrative examples are not stable APIs. Acceptance does not claim implementation or waive testing/stable release gates. Proceed sequentially through implementation contracts and code. | Accepted |
## Status guidance
Only mark a decision `Accepted` after explicit approval in RFC Committee discussion. The initial archive deliberately leaves most decisions as `Proposed` because the broader contracts remain incomplete.
D-055 revises D-041's exactly-one Purpose requirement to zero-or-one. D-053's first
implementation profile is a delivery milestone, not a composition restriction.
Later decisions refine earlier entries without erasing their discussion history:
D-032's open account-continuity scope is resolved by D-036; D-034's retention and
automatic-recovery questions are resolved by D-046–D-049; D-047's boot-selection
question is resolved by D-049. D-050–D-052 extend D-045's channels and release gates;
their implementation evidence and publication contracts remain open.
Only mark a decision `Accepted` after explicit approval in RFC Committee discussion.
D-061 ratifies the initial Proposed decision rows; historical wording is interpreted
through later refinements. D-058/D-059 and RFC v0 approval supersede D-027's original
proposal-only description of the hook baseline. Explicit implementation questions
remain open despite architectural acceptance.

View file

@ -2,17 +2,31 @@
This list tracks decisions that must be resolved before the corresponding implementation becomes stable.
The [OSTree capability review](ostree-capability-review.md) maps upstream primitives
and limitations to these contracts; its recommendations are not accepted decisions.
RFC v0 is accepted as an architectural contract under D-061. The
[approval review](rfc-v0-approval-review.md) records policy outcomes and remaining
implementation gates. Explicitly open choices still require agreement before the
corresponding implementation becomes stable; numbered questions retain their IDs.
## Layer and composition model
1. What exact filesystem representation does a Layer OSTree commit use: a root-relative payload tree, a defined namespace inside the commit, or another explicit format?
2. How are Core and Purpose cardinality and compatibility expressed?
1. D-044 selects separate payload and metadata namespaces inside a layer commit. What exact namespace names, schema and serialization define the stable artifact format? `payload/` and `metadata/` are illustrative names.
2. D-055 requires exactly one Core and zero or one Purpose; Archipelago Core ships with zero Purpose layers. How are optional Purpose selection and compatibility expressed in the schema and management interface?
3. What dependency solver semantics are required: version ranges, feature constraints, architecture constraints and conflict declarations?
4. How are overlay ordering constraints expressed and made deterministic?
5. What is the exact syntax and authorization model for file replacement?
6. How are directory merges, symlinks, file modes, xattrs, capabilities, hardlinks and ownership represented?
4. D-039 selects explicit composition-manifest list order, validated against overlay requirements, before/after constraints and incompatibilities, without silent reordering or insertion. What exact schema identifies overlay dependencies and ordering targets, including constraints referring to unselected optional overlays?
5. D-038/D-040 define explicit package replacements and file/metadata/type overrides, including deletion with expected owner and reason. What exact schema represents permissions, path sets and deletion coverage?
D-054 excludes unrestricted replacement permissions in v0 and defers standalone
lower-package removal to a separate authorization/dependency contract. Overlay
removal remains normal recomposition; mass file deletion cannot bypass this boundary.
6. D-040 permits merging directories with matching owner/mode/xattrs, requires explicit metadata/type changes and treats symlinks as objects. What artifact schema and validation preserve this contract, including capabilities, hardlink behavior and canonical Arch usr-merge paths?
7. How is package database coherence maintained across separately built layer commits?
8. How are `/etc`, `/boot`, `/opt` and generated files handled?
9. Is an overlay allowed to replace package-owned files only through package replacement, or may it use explicit file-level overrides?
Resolved by D-038/D-040: explicit file overrides are allowed and recorded
separately from whole-package operations; truthful database representation
remains part of the package metadata contract.
## Kernel and DKMS
@ -28,14 +42,14 @@ This list tracks decisions that must be resolved before the corresponding implem
16. Which OSTree transport and registry server implementation is selected?
17. How are registry authentication, signing keys, trust roots and key rotation managed?
18. Which package repositories and Arch Linux Archive snapshots are supported?
19. What is the exact package lockfile format?
19. D-042 separates manifest intent from resolved locked inputs, with explicit resolve/update and no silent substitution during build/compose. What exact lockfile schema records layers, snapshot, package identities, architecture and finalization inputs, and how are manifest/lock identities and compatibility validated?
20. What build cache key and invalidation contract is required?
21. How are OCI build environments represented, if adopted?
22. What is the release artifact storage implementation?
## System and installer
23. Which OSTree boot integration is selected initially?
23. D-033 selects systemd-boot initially. What exact UEFI/BLS, ESP/XBOOTLDR and packaged mkinitcpio integration profile is required?
24. Which filesystem and partition layout is the MVP default: ext4 or Btrfs, single root or separate state partitions?
25. How are OSTree `/etc` three-way merges and configuration conflicts surfaced?
26. How are offline installation bundles structured?
@ -44,14 +58,14 @@ This list tracks decisions that must be resolved before the corresponding implem
## Host Extensions
29. Does Host Extension state represent exact package files, a local pacman repository, a package lock, or a combination?
29. D-037 selects explicit user requests, resolved package identities, retained local files and per-generation base/result/database history. What exact manifest/lock and storage schema represents these, and is a local pacman repository used internally?
30. Are package signatures mandatory, and what is the policy for unsigned local packages?
31. How is a failed best-effort reapplication presented in CLI and boot UX?
32. Is fallback to the upstream supported image automatic, or must the user explicitly select it?
33. How are package removals and dependency cleanup handled?
34. Can users opt into reapplying only selected Host Extensions, or is the set atomic in MVP?
32. Resolved by D-056: fallback to the upstream supported image requires explicit user selection; a failed reapplication preserves current deployment and boot selection. Exact CLI presentation remains open.
33. D-037 selects recomposition from the base and remaining explicit requests on removal, omitting dependencies no longer required and preserving persistent data. What detailed optional-dependency, replacement and history cleanup rules apply?
34. Resolved by D-056: reapplication is atomic for the full requested set. Users may explicitly change the set and retry; automatic subset selection is prohibited.
35. How are local DKMS packages rebuilt after a kernel update?
36. What exact wording and behavior defines the `unsupported` status?
36. D-057 makes support status describe the current booted deployment and effective local modifications, primarily for issue reports. Enabling Host Extensions alone does not change it; requested/pending state is separate. Custom overlays do not automatically gain support, and recovery is removed from the status model. What exact diagnostic format, provenance reporting and detection of out-of-band modifications implement this contract?
## Runtime workloads
@ -67,3 +81,70 @@ This list tracks decisions that must be resolved before the corresponding implem
43. Is a background daemon needed, or is a CLI-driven transactional model sufficient initially?
44. How are remote builder selection and job execution represented?
45. What API contract is required for future GUI integration?
## Independent layer builds and Arch package compatibility
46. How are cross-layer package dependencies and package database records composed for independently built layers without mandatory exact lower-layer commit coupling (D-020)?
D-024 resolves the ownership principle: one effective owner per package,
reuse from lower layers, missing dependencies owned by the extending layer,
explicit overlay replacements, and requirements separate from payload.
D-025 resolves shared dependency assignment: the first requiring layer in
deterministic order owns a dependency absent below; other layers reuse it.
Removing that owner triggers reassignment in the new composition if the
package is still needed. Input commits remain unchanged. Artifact-level
package inclusion and final pacman database construction remain open.
47. D-023 requires one common snapshot; D-043 defines an immutable ordered Arch plus Archipelago repository set, target architecture, database checksums and package identities, identified by a content-derived snapshot_id. Exact descriptor schema, canonicalization, verification and trust metadata remain open.
48. Which packages supplement `base` plus `linux` in Core to provide firmware, initramfs and OSTree boot/deployment integration (D-021)?
49. D-041 distinguishes role and concrete variant; D-055 revises cardinality to zero or one Purpose, including later selection from Archipelago Core. Multiple desktops may be expressed through a designed variant or Managed Overlay. DM selection, systemd switching and other desktop integration belong to the concrete Purpose contract. What exact schema expresses role, variant and overlay compatibility? Concrete Purpose contents/lifecycle policies and review of custom sets for official adoption remain separate design tasks.
50. When upper layers replace packages or shared libraries, how are dependencies of the complete resulting composition revalidated and incompatible replacements rejected?
D-038 requires explicit whole-package replacement intent and validation of
dependencies, conflicts, ownership and applicable kernel ABI across the final
composition. Exact schema and validation implementation remain open; file-level
Managed Overlay overrides remain a separate provenance-tracked operation.
51. D-026 selects package payloads and a package ownership index inside layer OSTree commits, including dependency payloads. Composition takes package content from these commits and includes each resolved package once. What exact payload layout and index schema map package identities to files and metadata, distinguish package-owned content from explicit layer overrides, and support constructing a coherent final pacman database?
D-044 now selects separated payload/metadata namespaces and distinct provenance
for package files, layer changes and generated results. Exact encoding, paths
and pacman database reconstruction still need implementation-level contracts.
## Hooks and composition finalization
Phase separation is accepted in D-027; D-058 accepts action classification,
explicit deferred-action mappings, final-composition generation, network-free
finalization with locked inputs and ordering, and required-action failure handling.
D-059 accepts placement of aggregate caches, vendor hwdb, distribution locales/trust,
runtime font caches and machine identity/provisioning, plus target service activation
and preservation of administrator enablement choices. Local configuration-dependent
cache regeneration and exact adapters still require implementation contracts in
[RFC-0005](../rfc/RFC-0005-hooks-and-finalization.md).
52. Which exact ALPM hooks and package scriptlets occur in the chosen snapshot, and which adapters or package adaptations implement the RFC-0005 phase classification?
53. D-028 selects standard Arch/systemd declarations and per-machine provisioning, preserving explicit upstream IDs and existing host assignments without a custom global UID/GID registry. How are non-root immutable file owners validated and declaration conflicts with existing machine identities reported?
54. How are generated linker and trust caches integrated with OSTree `/etc` handling, administrator overrides and update/rollback? How are mutable font and hardware caches invalidated?
55. What schema records finalizer inputs, outputs, dependencies, required conditions and generated ownership? How are package-owned generated files represented truthfully in the final pacman database?
56. How are initial service presets applied without resetting administrator choices on updates, and how are runtime initialization failures surfaced and retried?
## System account lifecycle
The baseline and deletion policy are accepted as D-028/D-029; see
[RFC-0006](../rfc/RFC-0006-system-accounts.md).
57. Resolved in scope by D-036: MVP targets a generic single-user PC with the primary user provisioned in the initial deployment. Native rollback omitting later-created users is accepted, with manual recovery using original UID/GID and retained home data. Remaining implementation details: initial-user provisioning before rollback targets are created, recovery instructions and continuity tests; universal synchronization is not required.
58. How are human accounts distinguished reliably from persistent service/system accounts for deletion eligibility, including pre-existing and administrator-created accounts? UID ranges alone are insufficient; ambiguous accounts remain ineligible. D-060 separately preserves standard transient DynamicUser= lifecycle.
59. What explicit migration contract handles upstream account renames or fixed UID/GID changes while preserving persistent data ownership and rollback behavior?
## OSTree integration follow-up
60. D-035 selects Arch's OSTree package pinned with the common snapshot (currently Extra x86_64 2026.6-1). Which build features and repository/checkout modes are required? Is composefs selected or excluded for the initial profile?
61. D-031 selects a non-default image-owned pacman database and persistent Host Extension working/history copies, with ordinary live-host pacman mutation disabled. What exact paths, disabling mechanism, query UX and generation/reuse rules implement this? A workspace database must match its selected base, not merely be periodically refreshed.
62. How are Arch staging `/etc` defaults converted to image `/usr/etc` while preserving package accounting and correct handling of generated caches and administrator overrides?
63. How is Arch's existing OSTree mkinitcpio install hook configured and tested with systemd-boot, and which kernel/initramfs paths define the initial boot contract?
64. D-030 selects one `archipelago` stateroot and Silverblue-style symlinks for `/home`, `/root`, `/srv`, `/opt`, `/usr/local` and `/mnt` into `/var`. How are packages with `/opt` payload adapted so managed updates work? What exact temporary-directory and partition profile is selected?
65. D-034 selects staged updates; D-046 defines protected deployments and cleanup. D-047/D-048 require manifest-driven Core/Purpose boot checks through systemd, bounded execution, current-boot/deployment success records, recovery retention on failure and no automatic reboot. What exact schema, success-record format, pin/unpin UX, GC roots and shutdown-finalization diagnostics implement this policy?
66. D-045/D-050 select public testing/stable with full reproducibility and successful required checks, developer-restricted experimental staging and reproducible local experiments. Same-commit promotion and publication of objects/metadata precede channel updates. What exact publication protocol, common public validation matrix, promotion criteria, staging access control, offline bundle format and retention roots implement these guarantees?
67. Resolved by D-060: D-029 prohibits deletion of persistent system/service account records through Archipelago. Standard systemd `DynamicUser=` allocation/release remains normal service lifecycle without a custom Archipelago mechanism.
68. D-037 accepts package-by-name selection from the base snapshot plus exact local package files, with dependencies resolved against that snapshot and compatibility validation. D-038 requires separate explicit whole-package replacement requests; request/generation schema details remain open (question 29).
69. Resolved by D-049: rollback and changing the next-boot default require an explicit user command. On failure, provide diagnostics, advice and an actionable rollback command, without changing boot selection or rebooting automatically. Exact CLI syntax and recovery-target presentation remain open.
70. How is D-050 full reproducibility demonstrated for testing/stable: canonical commit metadata, deterministic generators/toolchain inputs, image and release-artifact comparison, signature/attestation handling and independent rebuild evidence? How are local source-tree changes captured so experimental builds are reproducible?
71. D-051 defines minimum public-channel functional gates: Core boot/local login, Host Extension package installation and Managed Overlay application, and declared Purpose service functionality in a clean environment. Which package/overlay fixtures, supported VM/hardware profiles, service-specific probes and automated harness implement these gates? Functional tests do not replace question 70's reproducibility evidence.
D-052 requires every Core gate to run against each complete Core + Purpose
release candidate, in addition to its Purpose-specific service checks.

View file

@ -0,0 +1,305 @@
# OSTree Capability and Archipelago Contract Review
- **Date:** 2026-11-03
- **Status:** Research findings and recommendations; not an accepted architecture decision
- **Coverage:** RFC-0001–0006, D-017 and D-020–D-029, illustrative manifests
- **Upstream reference:** latest release reported by upstream GitHub at review time:
[v2026.6](https://github.com/ostreedev/ostree/releases/tag/v2026.6), published 2026-10-30
## 1. Executive assessment
**Follow-up:** RFC-0007 and D-030–D-035 record subsequent selections. The Arch package
file list was subsequently checked and includes `/usr/lib/initcpio/install/ostree`
and `/etc/ostree-mkinitcpio.conf`. F-09's original assumption that a new adapter
would be needed was premature: review and test the packaged integration first.
See [Arch file list](https://archlinux.org/packages/extra/x86_64/ostree/files/).
The architecture is broadly aligned with libostree. In particular, independently
stored component trees, union assembly, global post-processing and a complete
deployable image are an upstream-documented build pattern [S2]. D-026 and D-027
therefore reuse OSTree as intended.
The main implementation blockers are package database integration, the final
filesystem layout, mkinitcpio boot integration and account continuity across
deployments. These are distribution integration contracts, not missing object-store
features that require replacing OSTree.
The wording “no semantic layer merge engine” is correct only when referring to
Archipelago's package/category/dependency/authorization semantics. OSTree already
has tree overlay/union operations. Avoid interpreting our RFCs as requiring a new
low-level filesystem composition implementation.
This is a documentation review, not validation of an installed Arch OSTree package,
a chosen package snapshot, a bootable prototype or runtime behavior. Published
documentation can mix historical and current descriptions. Version-sensitive
prepare-root and account guidance was also checked in the v2026.6 source [S15].
## 2. Capability map
| Area | Native OSTree capability | Archipelago responsibility |
|---|---|---|
| Storage | Content-addressed objects, commits, refs, deduplication, metadata | Layer schema, package index, source/build provenance |
| Assembly | Overlay trees in `commit`; union/subpath/filtering checkout primitives | Dependency solving, common snapshot, package ownership, authorized overrides, deterministic policy |
| Distribution | Incremental object pulls, archive HTTP repositories, static deltas, signature mechanisms | Release/channel policy, trust roots, publication workflow and retention |
| Deployment | Multiple complete deployments, boot selection, staged deployment, deployment pinning | Desired-state management, update policy, recovery UX and health checks |
| Configuration | `/usr/etc` defaults and per-deployment writable `/etc`, three-way configuration handling | Arch staging conversion, diagnostics, application-specific migrations |
| Persistent state | Shared `/var` within a stateroot | State schema migrations, user data policy and explicit layout for other writable paths |
| Boot | Kernel/initramfs deployment, BLS-oriented boot configuration, prepare-root | mkinitcpio integration, installation profile, bootloader binaries, Secure Boot policy |
| Accounts | No package account provisioning; numeric file owners are stored | Standard sysusers/systemd integration, conflict checks and cross-deployment identity continuity |
| Runtime integrity | Optional composefs/fs-verity/signature integration | Explicit feature/version profile and validation of the full boot trust chain |
## 3. Detailed findings
### F-01 — Reuse native union operations; retain our policy engine
**Applies to:** RFC-0001 §4.2; RFC-0002 §§2–3, 8–9; RFC-0003 §6.
`ostree commit --tree=ref=... --tree=dir=...` overlays existing trees without
requiring all existing content to be rehashed. Checkout supports `--union`,
`--union-add`, `--union-identical`, subpaths and skip lists [S2, S3].
These are building blocks, not a package solver: ordinary union may silently
replace files, and `--union-identical` does not implement owner permissions,
directory metadata reconciliation or package replacement policy. Validate our
resolved merge plan before using these operations. Native whiteout support also
does not decide whether Archipelago authorizes a deletion.
**Recommendation:** explicitly describe Composition Engine as policy and orchestration
over libostree primitives. Preserve D-024–D-026 without implementing a second store.
### F-02 — Finalization must not mutate shared repository objects
**Applies to:** RFC-0003 pipeline; RFC-0005 §§5–6.
Checkout can hardlink content into the repository. In-place writes, ownership or
xattr changes can then affect shared objects. Upstream's component-union example
uses `rofiles-fuse`; checkout also offers `--force-copy` (which may reflink), and
libostree exposes hardlink-breaking support [S2, S3, S14].
**Recommendation:** initially use a writable staging strategy that guarantees
no repository aliasing, then optimize under tests. This supports, rather than
changes, RFC-0005. Image finalization here is distinct from OSTree's staged-deployment
finalization at shutdown.
### F-03 — Metadata preservation and reproducibility need an explicit profile
**Applies to:** RFC-0002 metadata/conflicts; RFC-0003 reproducibility.
OSTree records numeric UID/GID, modes, symlinks and xattrs, but not ordinary file
timestamps. A commit separately records a timestamp, parent and metadata, so equal
trees do not necessarily have equal commit checksums [S1, S3, S14].
`bare-user` preserves ownership/xattrs as encoded metadata without applying them;
`bare-user-only` does not preserve the same metadata. User-mode checkout omits
ownership/xattr application. Copying a convenient unprivileged checkout into a
fresh commit can therefore lose metadata unless the pipeline preserves it explicitly.
**Recommendation:** select repository and checkout modes per build/registry/host
role; test capabilities and non-root ownership. Specify whether reproducibility
means identical tree content or identical commit, and normalize commit metadata
when the latter is required. Do not assume deduplication preserves source hardlink
topology as a separately declared property.
### F-04 — `/etc` merge is per-deployment configuration handling, not a text merge
**Applies to:** RFC-0001 filesystem table; RFC-0003 §8; RFC-0005 caches; RFC-0006.
The final OS tree supplies defaults under `/usr/etc`; the deployed system has a
writable `/etc`. The documented merge compares old defaults, the source deployment's
configuration and new defaults: locally modified files are retained, while
unmodified files receive new defaults [S4, S5]. This is not a general line-level
merge of passwd entries, INI sections or package `.pacnew` files.
**Recommendation:** define the Arch staging `/etc` → image `/usr/etc` conversion,
package-file accounting for that conversion, and runtime override handling.
Generate caches after the effective inputs are known; do not assume an image cache
always matches locally overridden configuration.
### F-05 — Staged deployments address a real configuration race
**Applies to:** System Manager, update lifecycle, RFC-0006.
An immediately prepared deployment merges `/etc` when prepared; later changes to
the booted `/etc` are not automatically merged again at reboot. Staged deployments
delay the merge and bootloader update until shutdown via
`ostree-finalize-staged.service` [S4].
**Recommendation:** evaluate staged deployments as the normal update path and
define failure reporting, activation locking and recovery. Staging helps forward
updates but does not synchronize the account databases of old rollback deployments.
### F-06 — `/var` persistence is scoped to a stateroot
**Applies to:** RFC-0001, RFC-0003, RFC-0004 state guarantees.
Deployments in one stateroot share `/var`; a different stateroot has a different
state directory [S4]. Since 2024.3, OSTree can initialize an empty stateroot `/var`
from commit contents. That is initialization, not ongoing package-managed updates:
existing state is not replaced or removed by later image versions [S6].
The older “OSTree never touches `/var`” explanation in the general deployment page
must be read with this newer dedicated `/var` documentation. Archipelago's stricter
policy of provisioning state through tmpfiles/units remains valid.
**Recommendation:** specify stateroot identity across Purpose switches and rebases;
do not change it accidentally. Preserve data while separately defining migration
compatibility: rollback of OS files is not rollback of a database schema in `/var`.
### F-07 — Account policy is supported, but rollback continuity is extra work
**Applies to:** RFC-0006, D-028/D-029.
Upstream explicitly recommends sysusers for per-machine accounts without owned
image content, DynamicUser where appropriate, and discusses nss-altfiles or
`/usr/lib/userdb` for static image identities [S7]. This supports our preference
for existing mechanisms and does not require adopting a custom global UID registry.
However, each deployment has its own `/etc`. Booting an old deployment selects its
configuration, not a globally current passwd/shadow database [S4, S8]. Running
sysusers on that old image cannot recreate accounts whose declarations existed
only in the newer image, nor recover changed passwords or explicit human-account
deletions. Thus D-028/D-029's continuity requirements exceed the native default.
**Recommendation:** keep this as an implementation blocker. Distinguish “deploy an
older commit while merging current configuration” from “boot a previously prepared
deployment”. Do not select shared account files, a ledger or a custom NSS backend
without a separate design. Define the scope of the system-account deletion ban
for ephemeral `DynamicUser=` identities without breaking standard systemd behavior.
### F-08 — The pacman installed-package database must follow the deployment
**Applies to:** RFC-0002 §9; RFC-0003; Host Extension staging.
Upstream explicitly explains why an installed-package database cannot simply live
in shared `/var`: different deployments contain different packages [S7]. Pacman's
default DBPath is `/var/lib/pacman`, and its documented configuration permits
overriding that path [S16].
**Recommendation:** design a per-image/deployment installed-package database and
separate writable staging copy, using standard pacman/libalpm facilities. Select
the exact path and read-only query behavior separately; caches, logs and repository
sync databases have different lifecycles. Preserve upstream database semantics
rather than creating an incompatible replacement database.
There is also wording tension inside RFC-0002: D-026 materializes managed payloads
from commits, while §9 broadly requires package installation/replacement through
pacman-compatible staging. Clarify layer-build transactions, composition database
assembly and local Host Extension transactions as distinct operations. OSTree does
not resolve this package bookkeeping problem.
### F-09 — mkinitcpio needs OSTree integration, not just initramfs generation
**Applies to:** RFC-0001 acceptance criteria; RFC-0003; RFC-0005 matrix.
The documented upstream integration is dracut/systemd. `ostree-prepare-root` remaps
the physical root to the selected deployment before switch-root. With systemd it
is ordered after `sysroot.mount` and before `initrd-root-fs.target` [S7, S10].
**Recommendation:** keep the chosen Arch tool, mkinitcpio, but specify its integration
hook/module contract: required binaries/libraries/config, units, `ostree=` handling, mount
ordering and failure behavior. Reuse prepare-root instead of reimplementing its
mount algorithm. Arch already packages an integration hook; a new implementation
is not presumed necessary. A successful ordinary `mkinitcpio` run alone does not establish
that the initramfs can boot an OSTree deployment.
The recommended image kernel paths are `/usr/lib/modules/$kver/vmlinuz` and
`/usr/lib/modules/$kver/initramfs.img` [S4]. They are a concrete candidate, not an
accepted Archipelago layout. Bootloader integration must be tested with Arch's
actual packages; Fedora GRUB capabilities must not be assumed for Arch GRUB.
### F-10 — “Conventional Linux paths” still require an explicit persistence layout
**Applies to:** RFC-0001 §4.3–4.4; RFC-0003 §§7–8.
Usr-merge fits OSTree, but `/home`, `/root`, `/srv`, `/usr/local` and `/opt` do not
gain persistence merely by keeping their conventional names. Upstream describes
symlink/mount layouts, `/sysroot` and `/ostree` integration [S7]. `/opt` particularly
needs care: redirecting packaged application binaries to `/var/opt` can prevent
later image updates from updating them [S6].
**Recommendation:** keep conventional runtime paths and ELF compatibility while
documenting necessary OSTree backing layout. Distinguish application payload from
mutable application data. Do not interpret “follow Arch layout” as byte-for-byte
retention of all Arch rootfs placement choices.
### F-11 — Rollback availability needs retention; automatic recovery is separate
**Applies to:** RFC-0001 invariants; RFC-0004 D-017.
OSTree supports multiple deployments, explicit pinning and retain options [S11].
Atomic deployment transitions do not imply health checks or an automatic fallback
when a kernel or workload fails; upstream points to additional integration such
as greenboot [S8].
**Recommendation:** define retention/pinning for the prior working deployment and
Host Extension inputs. Account for storage exhaustion and unpin/cleanup policy.
Keep boot health evaluation and persistent-data compatibility as separate contracts.
### F-12 — Registry and offline transport can be mostly upstream mechanisms
**Applies to:** RFC-0001 registries; RFC-0003 publication; installer open questions.
An archive repository can be served by a static HTTP server. Pulls transfer missing
objects; static deltas optimize transfers and can be self-contained for offline
use. Applying an offline delta imports content but does not itself deploy it [S2,
S12, S13]. The summary must be updated when refs/deltas change.
**Recommendation:** avoid inventing a new layer/image transfer protocol. Define
Archipelago's namespace, trust, release metadata and coordinated publication on
top. Separate object availability, ref promotion and signed summary visibility;
an atomic local commit is not automatically atomic multi-registry release publication.
Checksums embedded in a manifest provide identity, not indefinite availability.
Define retention roots for released layers/images and source/package snapshots;
provenance mentioning a layer checksum must not be assumed to pin it against GC.
### F-13 — composefs is an optional deployment backend, not our package compositor
**Applies to:** filesystem, security and platform baseline open questions.
OSTree documents composefs and `yes`, `signed`, `verity` modes; these offer different
runtime integrity properties from plain hardlink deployments. The checked v2026.6
documentation still labels the integration experimental. Its prepare-root manual
states that `root.transient` requires composefs [S10, S15].
**Recommendation:** select a supported libostree version/build-feature baseline
before choosing these modes. Do not conflate downloading a signed commit with
verified boot/runtime integrity, or composefs with package-aware layer merging.
No composefs adoption decision is made by this review.
## 4. Recommended order of follow-up contracts
1. Supported libostree version/features and final filesystem layout: `/usr/etc`,
stateroot, `/var`, persistent paths, installed-package database.
2. Package index/database assembly and metadata-safe OSTree composition primitives.
3. mkinitcpio/prepare-root/bootloader integration and a minimal VM boot test.
4. Account/credential continuity for forward updates and both rollback paths.
5. Staged activation, retention, failure recovery and persistent-state migrations.
6. Registry promotion, signing, offline bundles and garbage-collection roots.
These are recommendations, not newly accepted decisions. Existing acceptance
criteria require implementation tests before these contracts can be called proven.
## 5. Sources
- **S1:** [Repository anatomy](https://ostreedev.github.io/ostree/repo/).
- **S2:** [Build systems and unions](https://ostreedev.github.io/ostree/buildsystem-and-repos/).
- **S3:** [checkout](https://ostreedev.github.io/ostree/man/ostree-checkout.html),
[commit](https://ostreedev.github.io/ostree/man/ostree-commit.html).
- **S4:** [Deployments and staged deployments](https://ostreedev.github.io/ostree/deployment/).
- **S5:** [Atomic upgrades and configuration handling](https://ostreedev.github.io/ostree/atomic-upgrades/).
- **S6:** [Current `/var` handling](https://ostreedev.github.io/ostree/var/).
- **S7:** [Adapting distributions: layout, accounts, package database](https://ostreedev.github.io/ostree/adapting-existing/).
- **S8:** [Atomic rollbacks](https://ostreedev.github.io/ostree/atomic-rollbacks/).
- **S9:** [Bootloaders](https://ostreedev.github.io/ostree/bootloaders/).
- **S10:** [prepare-root manual](https://ostreedev.github.io/ostree/man/ostree-prepare-root.html).
- **S11:** [Deployment pinning](https://ostreedev.github.io/ostree/man/ostree-admin-pin.html),
[deployment options](https://ostreedev.github.io/ostree/man/ostree-admin-deploy.html).
- **S12:** [Offline deltas](https://ostreedev.github.io/ostree/copying-deltas/),
[data formats](https://ostreedev.github.io/ostree/formats/).
- **S13:** [Repository management](https://ostreedev.github.io/ostree/repository-management/).
- **S14:** [Core API: metadata, hardlink breaking and content checksum](https://ostreedev.github.io/ostree/reference/ostree-Core-repository-independent-functions.html).
- **S15:** Version-pinned [prepare-root manual](https://github.com/ostreedev/ostree/blob/v2026.6/man/ostree-prepare-root.xml),
[account/layout guidance](https://github.com/ostreedev/ostree/blob/v2026.6/docs/adapting-existing.md),
[composefs documentation](https://github.com/ostreedev/ostree/blob/v2026.6/docs/composefs.md).
- **S16:** [Arch pacman.conf: DBPath and staging path semantics](https://man.archlinux.org/man/pacman.conf.5.en).

View file

@ -0,0 +1,186 @@
# RFC v0 Approval Review
- **Status:** Accepted — approval record under D-061; original recommendations retained with recorded outcomes
- **Date:** 2026-11-04
- **Coverage:** RFC-0001–0007, D-001–D-061, open questions, illustrative examples and the upstream capability review
## 1. Accepted approval boundary
RFC Committee approved v0 as an architectural contract on 2026-11-04 (D-061).
Acceptance does not certify an implementation or freeze illustrative schemas,
paths, command lines or all optional features. Implementation contracts must be
agreed before the corresponding component becomes stable. Public testing/stable
publication still requires D-050–D-052 evidence; architectural approval cannot waive it.
All seven RFCs are Accepted within that boundary. D-061 explicitly ratifies
D-001–D-016 and D-018–D-019, interpreted through D-020–D-060. Findings and original
recommendations below describe the review starting point; recorded outcomes take
precedence, including rejection of the original A3 recommendation and A4 recovery state.
## 2. Document-by-document findings
| Document | Established baseline | Approval work / implementation boundary |
|---|---|---|
| RFC-0001 | OSTree, three execution contexts, registries, standard Linux paths | Ratify legacy decisions; distinguish architecture-wide Desktop/Server/IoT and workload goals from the first delivered profile (A1). Trust implementation remains a release prerequisite. |
| RFC-0002 | Independent layers, one snapshot, ownership, explicit order and conflicts | Decide unrestricted override capability and package removal (A2); clarify Core test composition (A3). Package index/DB remains the principal implementation gate. |
| RFC-0003 | Locked inputs, same-commit promotion, public release gates | Define scope of reproducibility evidence before publication; clarify candidate validation precedes public ref publication. Schemas and canonical metadata remain implementation contracts. |
| RFC-0004 | Best-effort reapplication, retained inputs, new-base DB, explicit replacements | Resolve atomic-set and fallback policy, enabled versus applied support status, and recovery as a separate state (A4). |
| RFC-0005 | Phase separation accepted as D-027 | Detailed classification, action matrix, default cache policy and finalizer graph still need approval (A5); snapshot-specific adapters require verification. |
| RFC-0006 | Standard accounts, no system-account deletion, deployment-local state | Clarify DynamicUser lifecycle (A6). Non-root immutable ownership and human-account classification need concrete contracts. |
| RFC-0007 | Persistence, systemd-boot, staged deployment, retention, manual rollback | Select concrete initial boot/storage profile during implementation (A1); `/opt`, package DB and `/etc` cache integration remain hard gates. |
## 3. Policy choices for Committee discussion
### A1 — Architecture scope versus first delivery
**Outcome: Accepted as D-053.** The first-profile scope below is approved;
the concrete Purpose and storage profile remain to be selected.
RFC-0001 includes three Purposes, remote builders, offline installation and runtime
workload reconciliation; D-036 narrows initial account UX to a single-user PC.
These are compatible only with an explicit delivery scope.
**Recommendation:** retain the full architecture but implement one end-to-end
profile first: x86_64 UEFI VM, one concrete Purpose, local builder, online install,
CLI-driven operations. Select its Purpose and storage profile before coding boot
integration. Remote builders, other Purposes, workload-manager integrations,
offline media and advanced storage/boot features get later delivery milestones.
Alternative: require the complete architectural feature set for the first release,
with substantially larger acceptance and integration work.
### A2 — Overlay authority and package removal
**Outcome: Accepted as D-054.** Scoped permissions are required, unrestricted
replacement is excluded, and standalone lower-package removal is deferred.
RFC-0002 now reflects this outcome; the finding below records the reviewed text.
RFC-0002 §7 permits `replace_lower_layer_files: true`, while D-040 requires explicit
path/owner/operation permissions. Broad authorization makes future changes to lower
layers automatically overridable. Whole-package removal is separately unspecified.
**Recommendation:** omit the unrestricted capability from v0; require scoped
permissions even for trusted overlays. Initially support additions, explicit whole-
package replacements and scoped file overrides; defer standalone lower-package
removal until its authorization and dependency rules are agreed. Do not simulate
package removal through mass file deletion. Alternative: retain broad capability
with a separately defined trust and review contract.
### A3 — Testing Core without introducing another deployment model
**Outcome: original recommendation rejected; Core-only accepted as D-055.**
The official supported Archipelago Core variant ships with zero Purpose layers.
Compositions contain exactly one Core and at most one Purpose. Users may select
a Purpose later or build custom overlay sets, without automatic official support
for those sets. A custom set may later be adopted as an official Purpose. Core gates
run on Core-only images and every Core + Purpose candidate. The recommendation
below is retained only as discussion history.
D-041 requires exactly one Purpose; D-051 describes Core boot/login/extension tests.
**Recommendation:** execute Core integration tests using a minimal concrete Purpose
fixture within an existing role, then repeat all Core gates on every shipped
Core + Purpose image under D-052. Do not treat a layer commit as bootable. Alternative:
explicitly authorize Core-only test images as an exception to composition cardinality.
### A4 — Host Extensions failure and status semantics
**Outcome: D-056 accepts atomic reapplication and explicit fallback selection;
D-057 accepts deployment-based support status and removes recovery from the model.**
Failed reapplication preserves current deployment and boot selection; individual
packages are not automatically dropped. Status describes effective modifications
of the booted deployment for issue diagnostics, with requested/pending state shown
separately. The recommendation below to retain a separate recovery state was rejected.
RFC-0004 §5 says “some or all” may be excluded, §5.2 proposes an atomic set, and
the example already shows atomic reapplication. D-017 alone does not decide partial
application or automatic fallback activation. D-049 concerns rollback, so must not
silently be treated as approval of this separate update policy.
**Recommendation:** reapply the entire explicit set atomically. On failure retain
current/default boot selection and offer the new supported image as an explicit
user choice; never silently drop a subset or activate fallback. Changing the set
and retrying is a new explicit request. Derive supported/unsupported from the
effective deployment, not merely enabling the feature; expose requested/pending
state separately. Recovery is an operation state that can accompany either support
classification. The Host Extension mechanism itself remains subject to D-051 tests.
Alternative: automatic supported-image fallback or user-selected partial application
requires its own declared policy and acceptance cases.
### A5 — Detailed hook/finalization policy
**Partial outcome: D-058 accepts action classification, explicit replacements for
deferred actions, final-composition aggregate generation, network-free finalization
with locked inputs and explicit ordering, and required-action failure handling
independent of pacman's exit status. D-059 accepts the discussed cache, hwdb,
locale/trust, machine-identity and service-default placements.** Exact finalizer
interfaces and snapshot-specific adapters remain open. D-061 subsequently accepts
the RFC-0005 architectural baseline without freezing those implementation details.
At the start of this review only the phase principle was accepted. RFC-0005 proposes mandatory
inventory/classification of executable hooks and scriptlets, reviewed adaptations
for embedded deferred actions, failure capture beyond pacman's exit code, explicit
generator dependencies/outputs, no network during finalization, and regeneration
of every applicable aggregate. Its matrix places fonts in runtime caches, vendor
hwdb and distribution locales/trust in finalization, and host identity at runtime.
**Recommendation:** approve this detailed baseline, with snapshot-specific adapters
specified before each selected feature is implemented. Unknown actions block
publication until classified. This adds package-maintenance work but avoids silent
omission of installation effects. Keep administrator service choices across updates;
define presets and configuration-dependent caches before implementing them.
Alternative: broader unclassified script execution would require revisiting D-027
and proving correct final-composition effects, not simply replaying all scriptlets.
RFC-0005 §7's “equivalent semantic output” is only a local finalizer criterion;
D-050 additionally requires fully reproducible public images. It cannot weaken the
public release gate.
### A6 — Account deletion versus DynamicUser
**Outcome: Accepted as D-060.** Persistent system/service accounts remain protected;
standard systemd transient-identity allocation/release is preserved. Ambiguous
accounts remain ineligible for deletion through Archipelago.
**Recommendation:** D-029 prohibits Archipelago deleting persistent system-account
records. Standard systemd `DynamicUser=` allocation/release remains normal service
lifecycle, not an Archipelago account-deletion operation. Ambiguous persistent
accounts remain ineligible for deletion. Alternative: banning DynamicUser changes
upstream service compatibility and requires explicit justification.
Native rollback may omit newer system identities as well as newer human accounts;
the deletion prohibition must not be read as a global synchronization guarantee.
Validate persistent-data ownership on supported transitions before claiming support.
## 4. Implementation gates, not silently selected defaults
| Gate | Required contract / proof | Open-question references |
|---|---|---|
| Artifact and package model | Versioned manifests/locks/snapshots/index; standard dependency semantics; coherent pacman DB, transformed paths and override accounting | 1–8, 19, 41, 46–51, 55, 61–62 |
| Build and finalization | Snapshot hook inventory, script adapters, isolated writes, generated-cache lifecycle, immutable non-root ownership | 20, 52–56, 58–59 |
| Bootable profile | Core packages, exact kernel identity, Arch OSTree hook, systemd-boot, partition layout, provisioning, `/opt` package handling | 10–14, 23–28, 48, 57, 60, 63–64, 67 |
| Host lifecycle | Transaction locking/recovery, extension generations/DKMS, deployment retention/GC, readiness records and explicit rollback UX | 29–36, 42–43, 65, 68–69 |
| Public publication | Trust/signing, artifact availability, coordinated refs, independent rebuild evidence, functional fixtures and supported matrix | 15–18, 22, 30, 66, 70–71 |
| Later delivery scope | OCI builders, workload managers/state migrations, remote execution and GUI API | 21, 37–40, 44–45 |
In particular, reproducibility evidence must define canonical tree and commit
metadata (including parent/timestamp), deterministic generators, treatment of
signatures/attestations and comparison scope for installer/release artifacts.
The binary-first policy does not itself promise reproducible rebuilding of all
upstream packages from source; any such requirement needs an explicit scope decision.
## 5. Editorial corrections and approval completion
This audit corrects RFC-0002's blanket package-installation wording using D-026,
RFC-0005's stale universal-account-continuity question using D-032/D-036, and
RFC-0007's stale automatic-rollback question using D-049. The decision log links
historical open wording to its later resolutions rather than rewriting history.
The capability review is dated research, not current policy: its account-continuity
blocker was narrowed by D-036. Its technical concerns about numeric ownership remain.
Examples are illustrative; atomic reapplication is now accepted under D-056,
while concrete schema fields remain unfrozen.
D-061 completes approval: A1–A6 outcomes are recorded, RFC text and examples are
reconciled, legacy decisions are ratified, and RFC/README statuses are updated.
Implementation gates remain open. Proceed in gate order to the first end-to-end
prototype. No implementation or runtime validation is claimed by this audit.