infrastructure/portal/docs/data.json

1813 lines
352 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"version": 1,
"source_repository": "https://git.fasoley.net/Archipelago/rfc",
"source_revision": "37bd61619b932cf08c346cf62fe137c550f54625",
"source_committed_at": "2026-11-07T15:31:16+03:00",
"generated_at": "2026-11-07T12:52:27.329100+00:00",
"decisions": [
{
"id": "D-093",
"title": "archipelagod, PackageKit Host Extensions and D-Bus host management",
"status": "Accepted",
"date": "2026-11-07",
"date_source": "Decision heading",
"markdown": "The user explicitly requests contract-level adoption and immediate Git publication\nof Host Extension package installation through PackageKit backed by D-Bus, Managed\nOverlays over D-Bus and CLI-wide installed-host management through `archipelagod`.\nAccept [RFC-0013](../rfc/RFC-0013-host-management-and-packagekit.md), extending D-092.\nThe canonical daemon/unit are `archipelagod`/`archipelagod.service`, retaining the\nexisting bus name, transaction API and shared Rust engine; `archipelago` remains\nthe unified CLI. This refines single-executable packaging without creating a second\npackage/composition engine. All installed-host management uses typed daemon APIs;\nbuild/live/offline contexts retain direct execution and common locking guarantees.\n\nPackageKit's Archipelago backend is a D-Bus client, not the live ALPM backend or an\nOS updater. It operates on base-snapshot-bound Host Extension intent; local packages\nuse protected FD import, exact-byte checksums and retained provenance. Original\ncaller authorization survives privileged PackageKit mediation. Separate admin\nactions cover enable/change/local/override/restore/overlay mutations; D-092's\npasswordless current-track update permission does not grant these actions.\nManaged Overlays use explicit ordered, exact-commit desired sets and preserve\nsnapshot/dependency/conflict/replacement contracts. All changes use shared checked\nplans, atomic composition, staged deployments and explicit reboot. Native OS,\nPackageKit package, Flatpak and fwupd frontends coexist with explicit ownership.\n\nArchitecture and contract are accepted for implementation. PackageKit ABI/glue,\ngeneral overlay implementation, future host method schemas and verification remain\nwork, not implied capabilities or release evidence. D-091's active SDDM pipeline\nis independent and must still be completed.",
"path": "spec/decision-log.md",
"line": 3,
"references": [
"D-091",
"D-092"
],
"later_references": []
},
{
"id": "D-092",
"title": "Installed-system D-Bus service and user-controlled transactions",
"status": "Accepted",
"date": "2026-11-07",
"date_source": "Decision heading",
"markdown": "The user explicitly accepts the proposed rpm-ostree-inspired service architecture\nand requests a detailed contract, immediate Git publication, then a durable root\nimplementation plan. Accept [RFC-0012](../rfc/RFC-0012-system-service-and-dbus.md):\none system-bus service activated by systemd, implemented by the unified Rust binary,\nshared update engine, asynchronous durable transactions, Polkit per operation,\nreconnection/cancellation/progress, and matching native GNOME/KDE/CLI clients.\nNormal GUI and installed-system CLI operations do not spawn sudo/pkexec.\nPublic status and active-local-session refresh/download do not prompt; current\ntrusted-track updates are passwordless for active local administrators. Other\nmutations require distinct authorization. No implicit reboot, rollback, extension\nfallback, trust change or downgrade. Fast signed availability is separate from\noptional package diff. Identical refreshes coalesce; conflicting mutations do not.\n\nThis refines D-067/RFC-0009's no-daemon-first assumption for installed systems only;\nbuild-host and installer/offline contexts retain direct execution with common\nengine/locking invariants. The detailed v1 boundary and acceptance criteria are\nnormative in RFC-0012. Library selection, on-disk migration and worker adapters\nremain implementation work. Approval is not implementation or release evidence;\nthe running D-091 SDDM update pipeline continues independently.",
"path": "spec/decision-log.md",
"line": 31,
"references": [
"D-067",
"D-091"
],
"later_references": [
"D-093"
]
},
{
"id": "D-091",
"title": "KDE Desktop publication and SDDM follow-up",
"status": "Accepted",
"date": "2026-11-07",
"date_source": "Decision heading",
"markdown": "The user confirms Archipelago KDE Desktop readiness after hardware testing and\nexplicitly authorizes immediate publication of the checked ISO and OSTree image\nand layers, with the installed profile's `stable/kde` update track. Publish the\nexisting `20261107T055158Z` candidate first, then deliver the Plasma SDDM theme\ndefault through a checked pipeline rebuild and update. The user will validate\nthe update through Discover. Extend recurring publication to KDE alongside\nCore/GNOME under D-090 cadence; record exact release identities and outstanding\nevidence in each release exception. This authorization does not claim independent\nreproducibility, autonomous replay of the calibrated VM onboarding, or completed\nDiscover update acceptance. See [KDE Desktop](kde-desktop.md).",
"path": "spec/decision-log.md",
"line": 53,
"references": [
"D-090"
],
"later_references": [
"D-092",
"D-093"
]
},
{
"id": "D-090",
"title": "Snapshot-based scheduled rebuilds and terra storage migration",
"status": "Accepted",
"date": "2026-11-06",
"date_source": "Decision heading",
"markdown": "Explicit user approval: promptly release Archipelago/layer/content fixes; run\nregular snapshot capture and full rebuilds at 00:00 UTC on the 15th and 30th of\neach month; urgent CVE runs require explicit user instruction. Disable daily\nscheduling immediately. Move terra's Archipelago infrastructure and working mirror\nonto `tank`, mirror contents in a separate ZFS dataset. Publish immutable native\nZFS snapshot views under `/archipelago/arch-repo-snapshot/<UTC-date-time>/`, retaining\nat most three. Update the entire isolated bootstrap from the selected snapshot,\nthen build Core and Purpose, check ISOs and publish to the portal/OSTree. Host\nExtensions use their base's snapshot, with the URL/identity advanced in new images.\nExecute migration/new scheduling after the current GUI/CLI/image task. Details and\nsupersession: [release snapshots](release-snapshots.md). This is approval, not\nimplementation or new release-admission evidence.",
"path": "spec/decision-log.md",
"line": 66,
"references": [],
"later_references": [
"D-091"
]
},
{
"id": "D-089",
"title": "KDE composition and Plasma Setup",
"status": "Accepted",
"date": "2026-11-06",
"date_source": "Decision heading",
"markdown": "The user accepts the proposed KDE native/Flatpak split and upstream Plasma Setup\nas provisioner, and requests YAML registries and infrastructure scaffolding.\nNative desktop/integration: Plasma/KWin, System Settings, Discover, Dolphin,\nKonsole, Spectacle and Ark, with portals/KIO/Polkit/KWallet, networking/audio/power,\nPlymouth and D-076 Toolbx/Podman. Independent Flatpaks: Okular, Gwenview, Kate,\nElisa, KCalc and KClock. Keep a separate KDE application policy/cache/export and\nreuse the cycle's Core. See [KDE Desktop](kde-desktop.md). Exact input resolution,\ndisplay-manager handoff, Discover backend and acceptance remain implementation\nwork. This approves preparation, not automatic KDE publication or release admission.",
"path": "spec/decision-log.md",
"line": 81,
"references": [
"D-076"
],
"later_references": []
},
{
"id": "D-088",
"title": "repository Host Extensions retain support",
"status": "Accepted",
"date": "2026-11-06",
"date_source": "Decision heading",
"markdown": "Explicit user instruction refines D-037/D-057: repository-name additions retain\n`supported` on a supported base, with a separate `customed` annotation. Local\npackage files remain `unsupported` even if names match repository packages.\nCustom bases/overlays and lower-package overrides do not gain support. Preserve\neach request's source through update reapply and removal; never infer missing\nlegacy provenance from a name. Removal rebuilds from the base and remaining set,\npreserving inputs/history and user data. Classify booted; show pending separately.\n\nWorking presentation: sorted effective added package names, including dependencies,\nup to ten names followed by `… +N packages` for the remaining count. `customed`\nis an annotation, not a third support class. Unverified bases are not supported.\nGeneral out-of-band mutation detection and local-file/override adapters remain open.\n\nThe accompanying explicit GNOME request hides both stoken Software Token launchers\nusing distribution-owned XDG `NoDisplay=true` overrides, retaining the package/VPN\nlibrary. Deliver via the new image without changing the user's running host.",
"path": "spec/decision-log.md",
"line": 93,
"references": [
"D-037",
"D-057"
],
"later_references": []
},
{
"id": "D-087",
"title": "daily stable publication",
"status": "Accepted",
"date": "2026-11-06",
"date_source": "Decision heading",
"markdown": "Explicit user direction: publish the daily Core/GNOME pipeline to `stable/core`\nand `stable/gnome`, matching already installed ISO update profiles and the user's\nchosen Arch Linux package release cycle. This supersedes the pipeline's\nhardware-test destination and authorizes recurring stable publication with its\ncurrent checks. Each publication records exact candidate identities and outstanding\nadmission limitations. It does not assert completion of reproducibility, general\nManaged Overlay or GUI update acceptance, and does not reuse one-build D-079.\n\nThis file is the compact record of architectural decisions discussed by the RFC Committee.\n\nFor the current consolidated contract scope, see the [contract registry](contract-registry.md).\n\n| ID | Decision | Status |\n|---|---|---|\n| D-001 | OSTree is the foundation for immutable filesystem storage, commits, refs, deployments, updates and rollback. | Accepted |\n| D-002 | Archipelago uses existing Linux mechanisms (nspawn, pacman, DKMS, mkinitcpio, depmod, systemd) rather than reimplementing them. | Accepted |\n| D-003 | A managed Layer is an independently versioned OSTree commit. | Accepted |\n| D-004 | A composition resolves layer commits and produces one complete image OSTree commit. | Accepted |\n| D-005 | Source manifests, RFCs, composition definitions and build recipes are stored in Git. | Accepted |\n| D-006 | Registry infrastructure is part of the initial architecture, not a later optional feature. | Accepted |\n| D-007 | Initial purpose categories are Desktop, Server and IoT. | Accepted |\n| D-008 | A dedicated Hardware Layer category is excluded from the initial scope; generic support comes from Arch Core and its kernel capabilities. | Accepted |\n| D-009 | Hardware-specific adaptations can be expressed through Managed Overlays and hardware profile manifests. | Accepted |\n| D-010 | Managed Overlays are versioned OSTree commits and may replace lower-layer files only with explicit permissions. | Accepted |\n| D-011 | DKMS modules are built against a specific kernel ABI and required build/validation failures block publication. | Accepted |\n| D-012 | Binary packages are preferred; source builds are exceptions for adaptation, unavailable packages, project-owned software and DKMS. | Accepted |\n| D-013 | The resulting OS preserves conventional Linux filesystem and ELF execution contracts; no Nix-style store model is introduced. | Accepted |\n| D-014 | Host Extensions allow explicit local `.pkg.tar.zst` injection outside the supported managed composition. | Accepted |\n| D-015 | Applying Host Extensions changes host support status to `unsupported`. | Accepted |\n| D-016 | Host Extension failures do not obligate changes to Arch Core, Archipelago source code or RFCs. | Accepted |\n| 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 |\n| 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 |\n| D-019 | Persistent user and runtime state must not be implicitly deleted by update, rollback, rebase or purpose changes. | Accepted |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| D-062 | Implement the primary archipelago binary and functional modules in Rust. Laboratory tooling may use other languages; this does not freeze artifact schemas or FFI/adapter interfaces. | Accepted |\n| D-063 | Plan monthly package repository snapshots, eventually created through ZFS on the mirror host. Defer that infrastructure until a bootable, working experimental archipelago-core-latest.iso exists. Snapshot identity and public testing/stable reproducibility requirements remain governed by D-043/D-050; a monthly label or latest filename does not replace immutable input identity. | Accepted |\n| D-064 | Include installation and first-run control in the live/installed archipelago workflow: prepare target storage, install the system, and support deferred provisioning with primary-user creation on the first installed boot. Prefer native GNOME/KDE initial-setup tools where feasible; provide terminal CLI onboarding for Archipelago Core. Preserve D-036: create the primary user in the initial deployment before subsequent normal rollback targets. Exact disk profile, frontend adapters, completion/retry state and privilege/API contracts remain open. | Accepted |\n| D-065 | Select the first experimental Core ISO profile: x86_64 UEFI VM, GPT with FAT32 ESP and ext4 root, systemd-boot, without encryption or Secure Boot. A separate /boot may be introduced if boot integration requires it. Acceptance exercises host-binary/nspawn ISO construction, live disk partitioning and installation of a viable OSTree deployment/bootloader, boot from the installed disk, first-run user provisioning and base services, then activation of a test Managed Overlay and a package Host Extension. Artifact schemas and package database adapters are experimental; public release gates remain unchanged. | Accepted |",
"path": "spec/decision-log.md",
"line": 112,
"references": [
"D-001",
"D-002",
"D-003",
"D-004",
"D-005",
"D-006",
"D-007",
"D-008",
"D-009",
"D-010",
"D-011",
"D-012",
"D-013",
"D-014",
"D-015",
"D-016",
"D-017",
"D-018",
"D-019",
"D-020",
"D-021",
"D-022",
"D-023",
"D-024",
"D-025",
"D-026",
"D-027",
"D-028",
"D-029",
"D-030",
"D-031",
"D-032",
"D-033",
"D-034",
"D-035",
"D-036",
"D-037",
"D-038",
"D-039",
"D-040",
"D-041",
"D-042",
"D-043",
"D-044",
"D-045",
"D-046",
"D-047",
"D-048",
"D-049",
"D-050",
"D-051",
"D-052",
"D-053",
"D-054",
"D-055",
"D-056",
"D-057",
"D-058",
"D-059",
"D-060",
"D-061",
"D-062",
"D-063",
"D-064",
"D-065",
"D-079"
],
"later_references": []
},
{
"id": "D-086",
"title": "Return all builds and VM acceptance, including Flatpak application preparation/downloads, to yabloko.",
"status": "Accepted",
"date": "2026-11-06",
"date_source": "Date recorded in entry",
"markdown": "Return all builds and VM acceptance, including Flatpak application preparation/downloads, to yabloko. Retain a persistent Flatpak repository cache and attempt updates each build. Simplify the pipeline and make its stages, logs and operation understandable to a human. The final instruction cancels the proposed tall-bridge download relay and supersedes D-084's worker placement; terra retains artifact storage, signing and publication. Explicit user direction, 2026-11-06. Existing release gates remain unchanged.",
"path": "spec/decision-log.md",
"line": 265,
"references": [
"D-084"
],
"later_references": []
},
{
"id": "D-085",
"title": "Complete the operational cycle through publication of assembled OSTree layers and new ISOs on terra, and enable…",
"status": "Accepted",
"date": "2026-11-06",
"date_source": "Date recorded in entry",
"markdown": "Complete the operational cycle through publication of assembled OSTree layers and new ISOs on terra, and enable daily execution at the previously agreed 00:00 UTC / 03:00 MSK. The pipeline must own progression, durable status and failure reporting without requiring repeated operator/LLM prompts. Explicit execution request, 2026-11-06. This does not extend D-079 to new identities or certify outstanding stable/testing admission gates; experimental hardware-test publication must retain its actual scope.",
"path": "spec/decision-log.md",
"line": 264,
"references": [
"D-079"
],
"later_references": []
},
{
"id": "D-084",
"title": "Stop the yabloko candidate pipeline and move building to root@tall-bridge; installing necessary tools there is…",
"status": "Accepted",
"date": "2026-11-06",
"date_source": "Date recorded in entry",
"markdown": "Stop the yabloko candidate pipeline and move building to root@tall-bridge; installing necessary tools there is authorized. Transfer artifacts directly to terra for storage, signing and publication. Rename the signing profile to archipelago-stable while retaining the existing fingerprint and installed-client trust. Explicit user direction, 2026-11-06.",
"path": "spec/decision-log.md",
"line": 263,
"references": [],
"later_references": [
"D-086"
]
},
{
"id": "D-083",
"title": "Deliver independent GNOME applications as preinstalled Flatpaks with their runtimes on installation media,…",
"status": "Accepted",
"date": "2026-11-06",
"date_source": "Date recorded in entry",
"markdown": "Deliver independent GNOME applications as preinstalled Flatpaks with their runtimes on installation media, preserving user removal and independent updates. Keep Shell/GDM/Settings/Software/Files/terminal and system integration native; apply the same split to future KDE. Supersedes the interim native-default-app direction; delivery acceptance checks installed app/runtime presence on a deployed VM. Explicit user approval, 2026-11-06.",
"path": "spec/decision-log.md",
"line": 262,
"references": [],
"later_references": []
},
{
"id": "D-082",
"title": "Include Plymouth in every Desktop Purpose, initially GNOME, with initramfs/boot/display-manager integration and…",
"status": "Accepted",
"date": "2026-11-05",
"date_source": "Date recorded in entry",
"markdown": "Include Plymouth in every Desktop Purpose, initially GNOME, with initramfs/boot/display-manager integration and accessible text diagnostics. Core-only remains console-oriented. Package presence alone is not integration acceptance. Explicit user direction, 2026-11-05.",
"path": "spec/decision-log.md",
"line": 270,
"references": [],
"later_references": []
},
{
"id": "D-081",
"title": "Before publishing the next newly built stable ISO, organize the production CLI, remove laboratory commands from…",
"status": "Accepted",
"date": "2026-11-05",
"date_source": "Date recorded in entry",
"markdown": "Before publishing the next newly built stable ISO, organize the production CLI, remove laboratory commands from its public interface, provide Russian localization, and implement GNOME Software OS updates through Archipelago transactions with old/new package-version details. Study rpm-ostree/Fedora Atomic principles as needed. GUI discover/plan/stage/reboot and failure paths require actual validation; D-079 does not waive these new-image requirements. Explicit user direction, 2026-11-05.",
"path": "spec/decision-log.md",
"line": 269,
"references": [
"D-079"
],
"later_references": []
},
{
"id": "D-080",
"title": "Generate all glibc-supported locales in Core, inherited by Desktop Purposes, and include GNOME…",
"status": "Accepted",
"date": "2026-11-05",
"date_source": "Date recorded in entry",
"markdown": "Generate all glibc-supported locales in Core, inherited by Desktop Purposes, and include GNOME artwork/backgrounds in the GNOME image. This extends the locale selection under D-059 and GNOME contents under D-075; application lifecycle remains unchanged. Explicit user request, 2026-11-05.",
"path": "spec/decision-log.md",
"line": 256,
"references": [
"D-059",
"D-075"
],
"later_references": []
},
{
"id": "D-079",
"title": "Adopt stable/core and stable/gnome as target image/layer refs.",
"status": "Accepted",
"date": "2026-11-05",
"date_source": "Date recorded in entry",
"markdown": "Adopt stable/core and stable/gnome as target image/layer refs. After reporting successful target-hardware use, the user explicitly authorized a release-gate exception for the current cycle (20261105T164634Z), despite incomplete D-050–D-052 evidence. Promote the same signed commits/ISO bytes with the existing D-078 key and record limitations publicly; retain hardware-test aliases for existing clients. The exception binds exact artifact identities, does not assert missing checks passed, and does not waive gates for subsequent identities. Explicit approval, 2026-11-05.",
"path": "spec/decision-log.md",
"line": 255,
"references": [
"D-050",
"D-052",
"D-078"
],
"later_references": [
"D-081",
"D-085",
"D-087"
]
},
{
"id": "D-078",
"title": "Use a separate OpenPGP signing key on terra for the temporary hardware-test OSTree repositories.",
"status": "Accepted",
"date": "2026-11-05",
"date_source": "Date recorded in entry",
"markdown": "Use a separate OpenPGP signing key on terra for the temporary hardware-test OSTree repositories. Sign commits and summary; update clients must verify both. Embed the public key in new installer images; never send the private key to the build host. Existing images without the updater/key require an explicit bootstrap or a new ISO. This selects an experimental trust binding, not the testing/stable release format, key-rotation policy or full update acceptance. Explicit user approval, 2026-11-05.",
"path": "spec/decision-log.md",
"line": 249,
"references": [],
"later_references": [
"D-079"
]
},
{
"id": "D-077",
"title": "Every successful operation creating a new target-system OSTree deployment automatically selects it as the…",
"status": "Accepted",
"date": "2026-11-05",
"date_source": "Date recorded in entry",
"markdown": "Every successful operation creating a new target-system OSTree deployment automatically selects it as the default for the next boot: installation, update/rebase, Purpose changes, Managed Overlays and Host Extensions. No separate activation/boot-selection command is required. Staged deployments materialize the boot entry through native successful finalization; preparation alone does not reboot or switch the running root. Failed operations preserve the existing boot selection. Explicit rollback selects its requested previous deployment; failed boot checks still do not trigger automatic rollback under D-049. Building a layer/image commit alone is not deployment creation. Explicit user direction, 2026-11-05.",
"path": "spec/decision-log.md",
"line": 243,
"references": [
"D-049"
],
"later_references": []
},
{
"id": "D-076",
"title": "Every Desktop Purpose must support upstream Toolbx with rootless Podman and an explicitly selected Arch Linux…",
"status": "Accepted",
"date": "2026-11-05",
"date_source": "Date recorded in entry",
"markdown": "Every Desktop Purpose must support upstream Toolbx with rootless Podman and an explicitly selected Arch Linux execution environment, analogous to Silverblue's mutable development environment. Reuse a reviewed upstream Arch Toolbx image where suitable; record OCI identity, validate subordinate IDs/storage/network/session/home integration and persistence across OS updates. Container package management is separate from Host Extensions and cannot mutate host /usr. Do not recreate/delete user containers on OS update. Exact image binding and adapters require evidence. Explicitly requested 2026-11-05.",
"path": "spec/decision-log.md",
"line": 237,
"references": [],
"later_references": [
"D-089"
]
},
{
"id": "D-075",
"title": "Implement GNOME as the first Desktop Purpose with full GNOME integration, Flatpak out of the box, GNOME…",
"status": "Accepted",
"date": "2026-11-05",
"date_source": "Date recorded in entry",
"markdown": "Implement GNOME as the first Desktop Purpose with full GNOME integration, Flatpak out of the box, GNOME Software/PackageKit integration with Archipelago whole-image updates and GNOME Initial Setup for first-user/timezone/settings onboarding. Approved native applications: Shell/GDM/Settings/Software, Nautilus, Console, Disks, System Monitor. Approved stable Flathub apps: Web, Calculator, Calendar, Contacts, Text Editor, Loupe, Papers, Clocks, Weather; GNOME Nightly is opt-in. Flatpak owns application lifecycle independently of OS deployments. Build/test Core+GNOME and publish eligible artifacts to portal/repository; inherited Core, GNOME and public gates remain. See spec/gnome-desktop.md. Explicitly approved 2026-11-05.",
"path": "spec/decision-log.md",
"line": 236,
"references": [],
"later_references": [
"D-080"
]
},
{
"id": "D-074",
"title": "Build experimental Core daily from current source commits and the current Arch mirror to exercise the…",
"status": "Accepted",
"date": "2026-11-05",
"date_source": "Date recorded in entry",
"markdown": "Build experimental Core daily from current source commits and the current Arch mirror to exercise the infrastructure and commit-based OS updates end to end. A newly built image commit is an update candidate; unchanged commits are not new payload. Include linux-firmware explicitly in Core and the live installer, using its normal dependency closure rather than relying on linux to pull it. This does not claim every device is supported or all firmware has source available. D-073 snapshot deferral and D-050 public release gates remain. Explicit user direction, 2026-11-05.",
"path": "spec/decision-log.md",
"line": 223,
"references": [
"D-050",
"D-073"
],
"later_references": []
},
{
"id": "D-073",
"title": "Defer snapshot creation and bulk mirror copying while the project matures.",
"status": "Accepted",
"date": "2026-11-05",
"date_source": "Date recorded in entry",
"markdown": "Defer snapshot creation and bulk mirror copying while the project matures. Use the live mirror for experimental image construction, prioritize reproducibility work and RFC conformance, and move to frozen snapshots for release construction later. Retain exact per-run input identities/checksums, reject changed or unavailable inputs rather than silently substituting them, and do not treat a mutable mirror or a successful experiment as a sealed Snapshot/public release. D-050 and public release gates remain. User explicitly directed this sequencing on 2026-11-05.",
"path": "spec/decision-log.md",
"line": 230,
"references": [
"D-050"
],
"later_references": [
"D-074"
]
},
{
"id": "D-072",
"title": "Use a separate tank/archipelago ZFS dataset for future mirror captures, leaving the live mirror at…",
"status": "Accepted",
"date": "2026-11-05",
"date_source": "Date recorded in entry",
"markdown": "Use a separate tank/archipelago ZFS dataset for future mirror captures, leaving the live mirror at /opt/mirror/data. Retain at most three monthly snapshots. This refines D-063/D-068 retention: referenced release/lock inputs cannot be silently destroyed to satisfy the cap; if no snapshot can be safely retired, capture must stop. User explicitly approved separate storage and the three-monthly-snapshot cap on 2026-11-05. Capture activation is subsequently deferred by D-073.",
"path": "spec/decision-log.md",
"line": 229,
"references": [
"D-063",
"D-068",
"D-073"
],
"later_references": []
},
{
"id": "D-071",
"title": "Host Core/Purpose YAML source registries and infrastructure code at git.fasoley.net under Archipelago alongside…",
"status": "Accepted",
"date": "2026-11-04",
"date_source": "Date recorded in entry",
"markdown": "Host Core/Purpose YAML source registries and infrastructure code at git.fasoley.net under Archipelago alongside rfc. Deploy registry, ISO/home portal and CLI-based layer/image/ISO builders on terra beside /opt/mirror, replacing superserv1 for new infrastructure work; retain standalone deployment files. Base URL is https://mirror.nw-sys.ru/archipelago/, with ISO and OSTree below it. Build from exact YAML revisions and pinned mirror inputs, publish layers, compose from the artifact repository, then build/publish ISO. Use Material You-inspired presentation and clear independent Arch Linux attribution. Implement registry-backed CLI updates, then plan PackageKit/GNOME Software/KDE Discover integration through the same staged transaction contract. D-068 release/trust gates remain; see spec/terra-infrastructure.md. Explicitly approved 2026-11-04.",
"path": "spec/decision-log.md",
"line": 217,
"references": [
"D-068"
],
"later_references": []
},
{
"id": "D-070",
"title": "Freeze Layer YAML/JSON v1 after explicit block-by-block approval on 2026-11-04: envelope/packages,…",
"status": "Accepted",
"date": "2026-11-04",
"date_source": "Date recorded in entry",
"markdown": "Freeze Layer YAML/JSON v1 after explicit block-by-block approval on 2026-11-04: envelope/packages, runtime/provisioner inheritance and check lifecycles, actions, files, bounded overrides, compatibility/replacements, exact kernel/ABI references and strict validation. Normative structural schema: schemas/layer-v1.schema.json; semantics: spec/layer-yaml-freeze.md and RFC-0008. Changes require separate approval and schema versioning. Complete desktop package sets, ABI algorithm, adapters, Composition/lock schemas and implementation evidence remain separate work.",
"path": "spec/decision-log.md",
"line": 211,
"references": [],
"later_references": []
},
{
"id": "D-069",
"title": "Accept mandatory action coverage for base/linux, Core integration packages and complete KDE/GNOME runtime…",
"status": "Accepted",
"date": "2026-11-04",
"date_source": "Date recorded in entry",
"markdown": "Accept mandatory action coverage for base/linux, Core integration packages and complete KDE/GNOME runtime closures, plus build dependencies in their build contexts; inventory scriptlets/hooks/helpers and no-action packages, shared versioned policy/adapters/result ledger and hooks CLI. Required failures block candidates even with pacman exit zero; readiness requires zero unresolved mandatory actions and functional evidence including desktop onboarding/session/services and inherited Core checks. Approve the phased implementation plan from inventory through publication gates. Exact desktop manifests and supported snapshot transitions require separate agreement; see RFC-0011 and spec/package-actions-plan.md. Approved 2026-11-04.",
"path": "spec/decision-log.md",
"line": 205,
"references": [],
"later_references": []
},
{
"id": "D-068",
"title": "Accept Docker Compose with host cron and separate builder/KVM validator/publisher roles, monthly immutable Arch…",
"status": "Accepted",
"date": "2026-11-04",
"date_source": "Date recorded in entry",
"markdown": "Accept Docker Compose with host cron and separate builder/KVM validator/publisher roles, monthly immutable Arch + Archipelago snapshots and daily pinned candidate builds, HTTP/native OSTree distribution, complete verified artifacts before atomic signed channel updates, shared update/net-install/portal release identities, purpose-separated OpenPGP keys and same-image promotion. Core x86_64 is first after release gates; KDE/GNOME require independent acceptance. Deployment bindings, keys, exact schedules/limits and worker isolation validation remain pending; see RFC-0010. Approved 2026-11-04.",
"path": "spec/decision-log.md",
"line": 204,
"references": [],
"later_references": [
"D-071",
"D-072"
]
},
{
"id": "D-067",
"title": "Accept the unified CLI for build host, installed system and installer/live: complete command coverage, checked…",
"status": "Accepted",
"date": "2026-11-04",
"date_source": "Date recorded in entry",
"markdown": "Accept the unified CLI for build host, installed system and installer/live: complete command coverage, checked plan/apply under mutation locks, shared JSON/errors and durable operation records, phase-aware cancellation/resume, separate desired/pending/booted state, explicit reboot/rollback/fallback, capability reporting and initial operation without a mandatory daemon; see RFC-0009. Approved 2026-11-04; implementation is incremental.",
"path": "spec/decision-log.md",
"line": 203,
"references": [],
"later_references": [
"D-092"
]
},
{
"id": "D-066",
"title": "Accept strict YAML/JSON intent manifests, SHA-256 canonical JSON identities independent of transport, separate…",
"status": "Accepted",
"date": "2026-11-04",
"date_source": "Date recorded in entry",
"markdown": "Accept strict YAML/JSON intent manifests, SHA-256 canonical JSON identities independent of transport, separate LayerLock/CompositionLock and indexed per-package OSTree payload with effective ALPM records, retained originals and explicit transformation provenance; see RFC-0008. Approved 2026-11-04; concrete schemas/adapters and implementation evidence remain pending.",
"path": "spec/decision-log.md",
"line": 202,
"references": [],
"later_references": []
},
{
"id": "D-065",
"title": "Select the first experimental Core ISO profile: x86_64 UEFI VM, GPT with FAT32 ESP and ext4 root, systemd-boot,…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Select the first experimental Core ISO profile: x86_64 UEFI VM, GPT with FAT32 ESP and ext4 root, systemd-boot, without encryption or Secure Boot. A separate /boot may be introduced if boot integration requires it. Acceptance exercises host-binary/nspawn ISO construction, live disk partitioning and installation of a viable OSTree deployment/bootloader, boot from the installed disk, first-run user provisioning and base services, then activation of a test Managed Overlay and a package Host Extension. Artifact schemas and package database adapters are experimental; public release gates remain unchanged.",
"path": "spec/decision-log.md",
"line": 192,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-064",
"title": "Include installation and first-run control in the live/installed archipelago workflow: prepare target storage,…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Include installation and first-run control in the live/installed archipelago workflow: prepare target storage, install the system, and support deferred provisioning with primary-user creation on the first installed boot. Prefer native GNOME/KDE initial-setup tools where feasible; provide terminal CLI onboarding for Archipelago Core. Preserve D-036: create the primary user in the initial deployment before subsequent normal rollback targets. Exact disk profile, frontend adapters, completion/retry state and privilege/API contracts remain open.",
"path": "spec/decision-log.md",
"line": 191,
"references": [
"D-036"
],
"later_references": [
"D-087"
]
},
{
"id": "D-063",
"title": "Plan monthly package repository snapshots, eventually created through ZFS on the mirror host.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Plan monthly package repository snapshots, eventually created through ZFS on the mirror host. Defer that infrastructure until a bootable, working experimental archipelago-core-latest.iso exists. Snapshot identity and public testing/stable reproducibility requirements remain governed by D-043/D-050; a monthly label or latest filename does not replace immutable input identity.",
"path": "spec/decision-log.md",
"line": 190,
"references": [
"D-043",
"D-050"
],
"later_references": [
"D-072",
"D-087"
]
},
{
"id": "D-062",
"title": "Implement the primary archipelago binary and functional modules in Rust.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Implement the primary archipelago binary and functional modules in Rust. Laboratory tooling may use other languages; this does not freeze artifact schemas or FFI/adapter interfaces.",
"path": "spec/decision-log.md",
"line": 189,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-061",
"title": "RFC Committee approves RFC v0 (RFC-0001–0007) as an architectural contract on 2026-11-04, interpreted with…",
"status": "Accepted",
"date": "2026-11-04",
"date_source": "Date recorded in entry",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 188,
"references": [
"D-001",
"D-016",
"D-018",
"D-019",
"D-020",
"D-060"
],
"later_references": [
"D-087"
]
},
{
"id": "D-060",
"title": "D-029's deletion prohibition applies to persistent system/service account records.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 187,
"references": [
"D-029"
],
"later_references": [
"D-061",
"D-087"
]
},
{
"id": "D-059",
"title": "Finalize aggregate schema, MIME, icon and library caches, vendor hwdb, selected distribution locales and…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 186,
"references": [],
"later_references": [
"D-080",
"D-087"
]
},
{
"id": "D-058",
"title": "Classify every package hook/scriptlet action into layer build, composition finalization, deployment preparation…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 185,
"references": [
"D-027"
],
"later_references": [
"D-087"
]
},
{
"id": "D-057",
"title": "Support status describes the current booted deployment and its effective local modifications, primarily for…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 184,
"references": [],
"later_references": [
"D-087",
"D-088"
]
},
{
"id": "D-056",
"title": "Reapply the complete Host Extension set atomically on base update.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 183,
"references": [
"D-017"
],
"later_references": [
"D-087"
]
},
{
"id": "D-055",
"title": "A composition contains exactly one Core, zero or one Purpose, and zero or more Managed Overlays.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 182,
"references": [
"D-041",
"D-052"
],
"later_references": [
"D-087"
]
},
{
"id": "D-054",
"title": "RFC v0 excludes unrestricted Managed Overlay replacement capabilities, including replace_lower_layer_files: true.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 181,
"references": [
"D-025"
],
"later_references": [
"D-087"
]
},
{
"id": "D-053",
"title": "Retain the full architecture while implementing one end-to-end profile first: x86_64 UEFI VM, one concrete…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 180,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-052",
"title": "Purpose release validation inherits every Core functional gate from D-051, since a Purpose deployment includes…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 179,
"references": [
"D-051"
],
"later_references": [
"D-055",
"D-079",
"D-087"
]
},
{
"id": "D-051",
"title": "Public-release functional validation covers Core boot, local login, successful Host Extension package…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 178,
"references": [],
"later_references": [
"D-052",
"D-087"
]
},
{
"id": "D-050",
"title": "Public testing and stable both require full reproducibility and successful required validation, including…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 177,
"references": [
"D-045"
],
"later_references": [
"D-063",
"D-073",
"D-074",
"D-079",
"D-087"
]
},
{
"id": "D-049",
"title": "Rollback requires an explicit user command.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 176,
"references": [
"D-047"
],
"later_references": [
"D-077",
"D-087"
]
},
{
"id": "D-048",
"title": "Purpose services, service-start scripts and layer runtime checks must be declared in manifests and execute…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 175,
"references": [
"D-027"
],
"later_references": [
"D-087"
]
},
{
"id": "D-047",
"title": "Core defines required boot readiness checks; Purpose may add explicitly declared checks, executed through…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 174,
"references": [],
"later_references": [
"D-049",
"D-087"
]
},
{
"id": "D-046",
"title": "Retain the booted deployment, a previous rollback deployment, a pending deployment when present, and all…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 173,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-045",
"title": "Initial image update channels are testing and stable, implemented with native OSTree refs/signatures/summary…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 172,
"references": [],
"later_references": [
"D-050",
"D-087"
]
},
{
"id": "D-044",
"title": "Layer commits separate a system payload namespace from layer metadata (manifest, package index, overrides and…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 171,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-043",
"title": "A package snapshot is an immutable, ordered repository set combining pinned Arch repositories and an…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 170,
"references": [],
"later_references": [
"D-063",
"D-087"
]
},
{
"id": "D-042",
"title": "Separate declarative manifest intent from a resolved lockfile.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 169,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-041",
"title": "A composition selects exactly one Purpose, distinguished by role (Desktop/Server/IoT) and concrete variant (e.g.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 168,
"references": [],
"later_references": [
"D-055",
"D-087"
]
},
{
"id": "D-040",
"title": "Add absent paths; merge common directories only with matching ownership, modes and xattrs unless metadata…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 167,
"references": [
"D-025"
],
"later_references": [
"D-087"
]
},
{
"id": "D-039",
"title": "Composition order is Core, Purpose, Managed Overlays in the explicit composition-manifest list order, then…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 166,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-038",
"title": "Package addition and lower-layer package replacement are distinct explicit intents.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 165,
"references": [
"D-017"
],
"later_references": [
"D-087"
]
},
{
"id": "D-037",
"title": "Host Extensions preserve explicit user package intent and generation history.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 164,
"references": [
"D-017"
],
"later_references": [
"D-087",
"D-088"
]
},
{
"id": "D-036",
"title": "Initial account UX targets a generic single-user PC: provision the primary user in the initial deployment and…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 163,
"references": [
"D-032"
],
"later_references": [
"D-064",
"D-087"
]
},
{
"id": "D-035",
"title": "Use the OSTree version supplied by Arch Linux, pinned with the common package snapshot and recorded package…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Use the OSTree version supplied by Arch Linux, pinned with the common package snapshot and recorded package identity. Optional deployment features remain explicit choices.",
"path": "spec/decision-log.md",
"line": 162,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-034",
"title": "Use staged deployments for normal updates and an explicit retention policy.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Use staged deployments for normal updates and an explicit retention policy. Retention counts, finalization failure UX and health-based automatic recovery remain open.",
"path": "spec/decision-log.md",
"line": 161,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-033",
"title": "Focus the initial boot integration exclusively on systemd-boot; reuse OSTree and the Arch-packaged mkinitcpio…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 160,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-032",
"title": "Adopt native OSTree per-deployment configuration and rollback semantics, refining D-028's cross-deployment…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 159,
"references": [
"D-028",
"D-029"
],
"later_references": [
"D-036",
"D-087"
]
},
{
"id": "D-031",
"title": "Store the image's pacman-format installed-package database outside pacman's default location; disable ordinary…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 158,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-030",
"title": "Use one `archipelago` stateroot and Silverblue-style persistent-data symlinks into `/var`, including `/opt ->…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 157,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-029",
"title": "Archipelago permits explicit deletion only of human/user accounts, not service/system accounts, including those…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 156,
"references": [],
"later_references": [
"D-032",
"D-060",
"D-087"
]
},
{
"id": "D-028",
"title": "Layers supply standard Arch/systemd sysusers, tmpfiles and service declarations.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 155,
"references": [],
"later_references": [
"D-032",
"D-087"
]
},
{
"id": "D-027",
"title": "Package installation and package scripts execute in isolated layer builds; system-wide generated artifacts are…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 154,
"references": [],
"later_references": [
"D-048",
"D-058",
"D-087"
]
},
{
"id": "D-026",
"title": "Layer OSTree commits contain package payloads and a package ownership index, including dependency payloads…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 153,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-025",
"title": "A shared package dependency absent from lower layers is included once and owned by the first requiring layer in…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 152,
"references": [],
"later_references": [
"D-040",
"D-054",
"D-087"
]
},
{
"id": "D-024",
"title": "Each package has one effective owning layer in a composition.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 151,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-023",
"title": "All layers in a composition must use one common pinned package repository snapshot.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 150,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-022",
"title": "Purpose layers extend Core, with desktop implementations such as KDE Plasma, GNOME and XFCE.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 149,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-021",
"title": "Arch Core starts from the Arch Linux `base` metapackage plus the `linux` kernel package.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 148,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-020",
"title": "Layers are built independently, without mandatory exact-commit coupling to lower layers.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 147,
"references": [],
"later_references": [
"D-061",
"D-087"
]
},
{
"id": "D-019",
"title": "Persistent user and runtime state must not be implicitly deleted by update, rollback, rebase or purpose changes.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Persistent user and runtime state must not be implicitly deleted by update, rollback, rebase or purpose changes.",
"path": "spec/decision-log.md",
"line": 146,
"references": [],
"later_references": [
"D-061",
"D-087"
]
},
{
"id": "D-018",
"title": "Host Extensions must not directly mutate the live immutable `/usr`; they are applied in staging and…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Host Extensions must not directly mutate the live immutable `/usr`; they are applied in staging and materialized as a local OSTree deployment.",
"path": "spec/decision-log.md",
"line": 145,
"references": [],
"later_references": [
"D-061",
"D-087"
]
},
{
"id": "D-017",
"title": "Host Extension update behavior uses best-effort reapplication (Option B); on failure, deploy the supported…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "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.",
"path": "spec/decision-log.md",
"line": 144,
"references": [],
"later_references": [
"D-037",
"D-038",
"D-056",
"D-087"
]
},
{
"id": "D-016",
"title": "Host Extension failures do not obligate changes to Arch Core, Archipelago source code or RFCs.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Host Extension failures do not obligate changes to Arch Core, Archipelago source code or RFCs.",
"path": "spec/decision-log.md",
"line": 143,
"references": [],
"later_references": [
"D-061",
"D-087"
]
},
{
"id": "D-015",
"title": "Applying Host Extensions changes host support status to `unsupported`.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Applying Host Extensions changes host support status to `unsupported`.",
"path": "spec/decision-log.md",
"line": 142,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-014",
"title": "Host Extensions allow explicit local `.pkg.tar.zst` injection outside the supported managed composition.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Host Extensions allow explicit local `.pkg.tar.zst` injection outside the supported managed composition.",
"path": "spec/decision-log.md",
"line": 141,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-013",
"title": "The resulting OS preserves conventional Linux filesystem and ELF execution contracts; no Nix-style store model…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "The resulting OS preserves conventional Linux filesystem and ELF execution contracts; no Nix-style store model is introduced.",
"path": "spec/decision-log.md",
"line": 140,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-012",
"title": "Binary packages are preferred; source builds are exceptions for adaptation, unavailable packages, project-owned…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Binary packages are preferred; source builds are exceptions for adaptation, unavailable packages, project-owned software and DKMS.",
"path": "spec/decision-log.md",
"line": 139,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-011",
"title": "DKMS modules are built against a specific kernel ABI and required build/validation failures block publication.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "DKMS modules are built against a specific kernel ABI and required build/validation failures block publication.",
"path": "spec/decision-log.md",
"line": 138,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-010",
"title": "Managed Overlays are versioned OSTree commits and may replace lower-layer files only with explicit permissions.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Managed Overlays are versioned OSTree commits and may replace lower-layer files only with explicit permissions.",
"path": "spec/decision-log.md",
"line": 137,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-009",
"title": "Hardware-specific adaptations can be expressed through Managed Overlays and hardware profile manifests.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Hardware-specific adaptations can be expressed through Managed Overlays and hardware profile manifests.",
"path": "spec/decision-log.md",
"line": 136,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-008",
"title": "A dedicated Hardware Layer category is excluded from the initial scope; generic support comes from Arch Core…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "A dedicated Hardware Layer category is excluded from the initial scope; generic support comes from Arch Core and its kernel capabilities.",
"path": "spec/decision-log.md",
"line": 135,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-007",
"title": "Initial purpose categories are Desktop, Server and IoT.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Initial purpose categories are Desktop, Server and IoT.",
"path": "spec/decision-log.md",
"line": 134,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-006",
"title": "Registry infrastructure is part of the initial architecture, not a later optional feature.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Registry infrastructure is part of the initial architecture, not a later optional feature.",
"path": "spec/decision-log.md",
"line": 133,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-005",
"title": "Source manifests, RFCs, composition definitions and build recipes are stored in Git.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Source manifests, RFCs, composition definitions and build recipes are stored in Git.",
"path": "spec/decision-log.md",
"line": 132,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-004",
"title": "A composition resolves layer commits and produces one complete image OSTree commit.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "A composition resolves layer commits and produces one complete image OSTree commit.",
"path": "spec/decision-log.md",
"line": 131,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-003",
"title": "A managed Layer is an independently versioned OSTree commit.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "A managed Layer is an independently versioned OSTree commit.",
"path": "spec/decision-log.md",
"line": 130,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-002",
"title": "Archipelago uses existing Linux mechanisms (nspawn, pacman, DKMS, mkinitcpio, depmod, systemd) rather than…",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "Archipelago uses existing Linux mechanisms (nspawn, pacman, DKMS, mkinitcpio, depmod, systemd) rather than reimplementing them.",
"path": "spec/decision-log.md",
"line": 129,
"references": [],
"later_references": [
"D-087"
]
},
{
"id": "D-001",
"title": "OSTree is the foundation for immutable filesystem storage, commits, refs, deployments, updates and rollback.",
"status": "Accepted",
"date": null,
"date_source": "Date not recorded",
"markdown": "OSTree is the foundation for immutable filesystem storage, commits, refs, deployments, updates and rollback.",
"path": "spec/decision-log.md",
"line": 128,
"references": [],
"later_references": [
"D-061",
"D-087"
]
}
],
"rfcs": [
{
"id": "RFC-0001",
"title": "Archipelago System Architecture",
"status": "Accepted",
"status_detail": "Accepted — architectural contract under D-061; explicit implementation questions remain open",
"date": "2026-11-04",
"version": "0.0",
"scope": "Overall system architecture and component boundaries",
"path": "rfc/RFC-0001-architecture.md",
"markdown": "# RFC-0001: Archipelago System Architecture\n\n- **Status:** Accepted — architectural contract under D-061; explicit implementation questions remain open\n- **Accepted:** 2026-11-04\n- **Version:** 0.0\n- **Date:** 2026-11-03\n- **Scope:** Overall system architecture and component boundaries\n\n## 1. Summary\n\nArchipelago is an Arch Linux-based, OSTree-managed generic Linux distribution and operating-system composition platform.\n\nIt provides a declarative way to build, publish, install, update, rebase, roll back and manage operating-system compositions. It also manages selected runtime workloads while preserving the standard Linux filesystem and execution contracts.\n\nD-062 selects Rust for the primary `archipelago` binary and its functional modules.\nD-093 adds the `archipelagod` service entrypoint from the same shared engine; the\nunified user CLI remains `archipelago`. Laboratory tooling\nmay use other languages; exact FFI/adapter interfaces remain implementation contracts.\n\nThe project must support three execution contexts through one primary `archipelago` CLI/binary:\n\n1. **Build host** — build packages, layers, compositions, releases and installer artifacts from a supported Linux host.\n2. **Installed system** — inspect and manage the local system, compose new deployments, update, rebase, roll back and reconcile runtime workloads.\n3. **Installer / live environment** — provision disks and install a published image or OSTree repository onto bare-metal or virtual machines.\n\n## 2. Goals\n\n- Build generic Desktop, Server and IoT-purpose distribution images.\n- Use OSTree as the central storage and deployment foundation.\n- Represent reusable system layers as immutable, versioned OSTree commits.\n- Keep all source manifests, composition definitions, RFCs and build recipes in Git.\n- Provide registries from the beginning for packages, layers, images and release artifacts.\n- Build on generic Linux hosts using isolated Arch Linux build environments.\n- Preserve conventional Linux filesystem hierarchy, ELF execution and dynamic linking expectations.\n- Prefer existing binary packages over rebuilding software from source.\n- Support local and remote builders using the same artifact and manifest contracts.\n- Support installation to bare-metal and virtual machines.\n- Preserve user data and runtime state across OS updates and purpose changes.\n- Clearly separate supported managed composition from explicitly unsupported host modifications.\n\n## 3. Non-goals\n\n### Initial delivery scope (D-053)\n\nImplement one end-to-end profile first: x86_64 UEFI VM, one concrete Purpose,\nlocal builder, online installation and CLI-driven operations. Select the concrete\nPurpose and storage profile before implementing boot integration. The architecture\ncontinues to cover all three Purposes and execution contexts; remote builders,\nother Purposes, workload-manager integrations, offline media and advanced storage/\nboot features follow in later milestones. D-050–D-052 public release gates apply\nto any published testing/stable candidate regardless of delivery scope.\n\nD-055 also defines the supported Archipelago Core variant, shipping with zero\nPurpose layers. Users may select one Purpose later or build custom overlay sets;\ncustom sets do not automatically gain official support but may later be adopted\nas an official Purpose. The initial delivery milestone does not restrict this model.\n\n### Architectural non-goals\n\n- Reimplementing OSTree, pacman, systemd, nspawn, DKMS, mkinitcpio, depmod, container runtimes or bootloaders.\n- Introducing a Nix-style store-based filesystem or requiring applications to use non-standard binary/library paths.\n- Requiring all software to be built from source.\n- Making every hardware-specific adaptation part of Arch Core.\n- Treating arbitrary host modifications as supported distribution components.\n- Building a new init system, package manager or container runtime.\n\n## 4. Architectural principles\n\n### 4.1 Reuse existing Linux mechanisms\n\nArchipelago orchestrates existing tools and defines their contracts and lifecycle. It should not replace mature generic Linux mechanisms without a concrete requirement.\n\nInitial tool responsibilities:\n\n| Existing component | Archipelago responsibility |\n|---|---|\n| OSTree | Content-addressed objects, commits, refs, repository transport, deployments and rollback |\n| systemd-nspawn | Isolated Arch build and staging environments |\n| pacman / makepkg / repo-add | Package resolution, installation into staging roots, package builds and package repositories |\n| Arch Linux Archive | Pinned package repository snapshots |\n| DKMS | Build kernel modules for a specific kernel ABI |\n| depmod | Generate module dependency metadata |\n| mkinitcpio | Generate initramfs images |\n| systemd | Service and host lifecycle |\n| systemd-boot / BLS or another supported boot integration | Boot deployment selection and startup |\n\n### 4.2 OSTree is foundational, not the composition engine\n\nOSTree is the source of truth for immutable filesystem objects, commits, refs and deployments.\n\nOSTree does not natively define Archipelago's layer dependency resolution, merge semantics, package ownership policy or conflict policy. Those are responsibilities of Archipelago's Composition Engine.\n\n### 4.3 Conventional Linux compatibility\n\nThe resulting system must remain a conventional Linux filesystem and execution environment:\n\n- Standard ELF binaries should run without an Archipelago-specific runtime.\n- The conventional ELF interpreter path and dynamic linker behavior must be preserved.\n- System libraries and binaries use standard locations such as `/usr/lib`, `/usr/bin` and `/usr/share`.\n- The distribution follows the selected Arch Linux filesystem layout and its `/usr` merge conventions.\n- No mandatory `/nix/store`-style application paths or custom loader semantics are introduced.\n- Standard runtime paths and interfaces such as `/etc`, `/var`, `/run`, `/tmp`, `/dev`, `/proc` and `/sys` retain their expected roles.\n\n### 4.4 Immutable system, persistent state\n\nThe OS deployment is immutable and atomically replaceable. Machine configuration and runtime state remain separate.\n\nInitial filesystem intent:\n\n| Path | Intended ownership / behavior |\n|---|---|\n| `/usr` | Image-owned, immutable system payload |\n| `/etc` | Machine configuration, writable and managed with OSTree semantics |\n| `/var` | Persistent system and workload state |\n| `/home` | Persistent user data |\n| `/run` | Volatile runtime state |\n| `/tmp` | Temporary writable state |\n| `/boot` and ESP | Managed by the selected OSTree/bootloader integration |\n\nThe initial persistence layout now follows Silverblue-style symlinks into `/var`,\nincluding `/opt`, within one `archipelago` stateroot (D-030). Machine configuration\nretains native OSTree `/etc` semantics. systemd-boot is the initial bootloader\n(D-033). Exact partitions, `/opt` package adaptation and boot profile remain open;\nsee [RFC-0007](RFC-0007-ostree-platform-integration.md).\n\n## 5. System components\n\nD-093 routes installed-host management through `archipelagod`. CLI and native\nclients use typed D-Bus interfaces; a PackageKit backend adapts Host Extension\npackages, while Managed Overlays retain a distinct ordered-layer interface.\nSee [RFC-0013](RFC-0013-host-management-and-packagekit.md). This extends D-092's\nupdate service without introducing another package/deployment engine.\n\n### 5.1 Source Registry\n\nGit is the source of truth for:\n\n- RFCs and architecture decisions.\n- Layer manifests.\n- Purpose and composition manifests.\n- Package build recipes and patches.\n- Build configuration.\n- Release definitions and policy.\n\nA build must record immutable source revision identifiers.\n\n### 5.2 Package Registry\n\nA pacman-compatible repository containing binary packages built or curated for Archipelago. Package versions and repository snapshots must be pinned for reproducible composition.\n\n### 5.3 Layer Registry\n\nAn OSTree repository containing immutable layer commits and metadata. Layer references are discoverable and versioned. A registry may physically share an OSTree repository with image commits while maintaining separate logical namespaces.\n\n### 5.4 Image Registry\n\nAn OSTree repository/ref namespace containing complete distribution image commits. Each published image must identify its complete composition inputs.\n\n### 5.5 Release Registry\n\nD-045/D-050 define public `testing` and `stable` image channels, both subject to\nfull reproducibility and required validation, plus developer-restricted experimental\n`staging`. Local reproducible experiments use a local source manifest tree on\nuser-controlled infrastructure. Promote the exact validated commit without\nrebuilding; updates select a coherent full composition.\nSee RFC-0003 §11.1 for publication and promotion requirements.\n\nStores distributable artifacts such as installer ISO, RAW and QCOW2 images, repository bundles, checksums, signatures, SBOM and release metadata.\n\n### 5.6 Build Engine\n\nCreates isolated Arch build environments, resolves pinned packages, builds packages when required, creates layer trees and publishes layer commits.\n\n### 5.7 Composition Engine\n\nResolves a composition manifest, obtains exact layer commits, applies deterministic filesystem merge rules, validates the result and creates a complete image commit.\n\n### 5.8 System Manager\n\nRuns on an installed Archipelago host. It manages desired state, status, update, rebase, deployment preparation, rollback and runtime workload reconciliation.\n\nD-092 selects systemd/D-Bus activation of the unified binary's system-service mode\nfor installed-system update control. Native GNOME/KDE and CLI clients use shared\ndurable transactions with Polkit authorization; privileged work remains in the\nservice/engine. See [RFC-0012](RFC-0012-system-service-and-dbus.md) for v1 scope,\nmethods, recovery and acceptance. Future host-operation APIs are capability-gated;\nthis does not imply that all System Manager operations are implemented.\n\n### 5.9 Installer\n\nRuns in a live environment. It provisions storage, initializes the target OSTree repository/deployment, installs a selected image and configures boot integration.\n\nD-064 includes installation and first-run control in the unified binary's live and\ninstalled contexts. Support deferred primary-user provisioning on the first installed\nboot, terminal onboarding for Core and native GNOME/KDE setup tools where feasible.\nFrontend integration belongs to the concrete Purpose. D-064 does not select a\npartition profile or provisioning daemon; D-092 separately selects the installed\nupdate service/API. See RFC-0006 §4.1 for the account boundary.\n\n## 6. Execution contexts\n\nThe `archipelago` binary must expose functionality appropriate to its execution context.\n\n### Build host\n\nMust be able to:\n- Initialize or provision an Arch build environment.\n- Build and publish packages and layer commits.\n- Compose and publish image commits.\n- Build release and installer artifacts.\n- Use local or remote registries/builders.\n\nThe build host itself may be Ubuntu, Fedora, Arch or another supported Linux distribution. The Arch build environment is isolated and controlled by Archipelago.\n\n### Installed host\n\nMust be able to:\n- Report current deployment and composition.\n- Inspect desired and effective state.\n- Check and apply updates.\n- Rebase to another image/ref.\n- Roll back to a prior deployment.\n- Add/remove managed layers by changing desired state and building a new deployment.\n- Manage Host Extensions under the explicit unsupported policy.\n- Reconcile supported runtime workloads.\n\n### Installer environment\n\nMust be able to:\n- Discover and validate target disks.\n- Partition and format according to an installation profile.\n- Install from online registry or offline repository/bundle.\n- Deploy a selected image.\n- Configure bootloader and machine-specific settings.\n- Verify installation before reboot.\n\n## 7. Core invariants\n\n1. A booted supported system is represented by one complete OSTree image deployment.\n2. Layer commits are immutable inputs; composition creates a new complete image commit.\n Layers are built independently, without mandatory exact-commit coupling to\n lower layers. Core starts from Arch Linux `base` plus `linux` and provides the\n foundation for all other layers; package and ABI compatibility still apply.\n3. No direct pacman mutation of the live host `/usr`.\n4. Build and package installation happen in isolated staging environments.\n5. Composition is deterministic for fixed inputs and toolchain.\n6. Every image records exact layer commit checksums and package inputs.\n7. Failed required build or validation steps prevent publication.\n8. Persistent user and workload data are not implicitly deleted during update, rollback, rebase or purpose switch.\n9. Destructive operations require explicit user intent.\n10. Host Extensions do not silently become part of the supported project contract.\n11. A Host Extension must not prevent the system from attempting a supported OS update; update behavior is defined in RFC-0004.\n12. Local and remote builders produce artifacts conforming to the same schemas.\n\n## 8. Registry model\n\nThe project starts with registry infrastructure rather than postponing it.\n\nLogical registries:\n\n- Git source registry.\n- Pacman package registry.\n- OSTree layer registry.\n- OSTree image registry.\n- Release artifact registry.\n- Optional OCI registry for build environment images and related build inputs.\n\nLayer and image registries may share physical OSTree storage. Logical separation is provided by refs, metadata and access policy.\n\n## 9. Security and trust boundaries\n\n- Published commits and release artifacts should be signed.\n- Registry trust roots and key rotation require a dedicated security RFC.\n- Build provenance must identify source revision, builder identity, package snapshot, toolchain and input commits.\n- Untrusted AUR or user-supplied package recipes execute only in isolated build environments.\n- Host Extensions are an explicit trust downgrade and support boundary, not a privilege escalation mechanism for remote actors.\n\n## 10. Acceptance criteria for the initial architecture\n\n- The same `archipelago` program can expose build-host, installed-host and installer workflows.\n- A non-Arch Linux build host can create an isolated Arch build environment.\n- A base plus purpose composition can produce a complete OSTree image commit.\n- The image can be installed into a VM and booted.\n- The installed system can report its deployment, update and roll back.\n- The source and composition inputs are traceable to Git revisions.\n- The resulting system runs ordinary Linux ELF binaries using conventional filesystem and loader contracts.\n\n## 11. Open questions\n\nSee [`../spec/open-questions.md`](../spec/open-questions.md).\n",
"sha256": "a261f5f582ba9ea831112b60e806f6fe3964ca2606772b3dde3f8a51e11962d3",
"decisions": [
"D-030",
"D-033",
"D-045",
"D-050",
"D-052",
"D-053",
"D-055",
"D-061",
"D-062",
"D-064",
"D-092",
"D-093"
]
},
{
"id": "RFC-0002",
"title": "Layer, Purpose and Managed Overlay Model",
"status": "Accepted",
"status_detail": "Accepted — architectural contract under D-061; explicit implementation questions remain open",
"date": "2026-11-04",
"version": "0.0",
"scope": "Reusable OSTree layer commits and composition semantics",
"path": "rfc/RFC-0002-layers-and-overlays.md",
"markdown": "# RFC-0002: Layer, Purpose and Managed Overlay Model\n\n- **Status:** Accepted — architectural contract under D-061; explicit implementation questions remain open\n- **Accepted:** 2026-11-04\n- **Version:** 0.0\n- **Date:** 2026-11-03\n- **Scope:** Reusable OSTree layer commits and composition semantics\n\n## 1. Summary\n\nEvery managed layer is an independently versioned OSTree commit with a declared semantic position in the composition model.\n\nLayers are built independently, without mandatory exact-commit coupling to lower\nlayers. Core does not depend on other layers and provides the foundation for all\nothers. Compatibility must respect Arch Linux package dependencies and applicable\nABI constraints. Independent builds do not imply compatibility between arbitrary\nlayer versions. A resolved composition still pins exact input layer commits.\n\nAll layers participating in a composition must use the same pinned package\nrepository snapshot (D-023). Mixing snapshots is forbidden, even if declared\npackage version dependencies appear satisfiable: ABI and whole-system consistency\nmust be preserved. Composition must reject snapshot mismatches before merging\npayloads. Independent builds share this snapshot contract without requiring\nexact-commit coupling between layers. Snapshot equality is necessary but does not\nreplace package ownership, dependency, conflict or kernel ABI validation.\n\nD-043 defines this snapshot as an immutable ordered Arch plus Archipelago package\nrepository set with a content-derived `snapshot_id`, target architecture, repository\ndatabase checksums and available package identities. See RFC-0003 §4.\n\nInitial layer categories:\n\n- `core` — Archipelago's generic Arch Linux foundation.\n- `purpose` — role-specific distribution payload, initially Desktop, Server and IoT.\n- `overlay` — additional managed system payload with explicitly declared composition permissions.\n\nA Hardware Layer category is intentionally excluded from the initial scope. Generic hardware coverage is provided by Arch Core and its selected kernel(s). Hardware-specific adaptations are represented through Managed Overlays and may be grouped into reusable hardware profile manifests.\n\n## 2. Terminology\n\n### Layer\n\nA versioned composition input stored as an OSTree commit. It has a manifest, metadata, dependencies, compatibility constraints and a filesystem payload.\n\n### Layer commit\n\nThe immutable OSTree commit identified by its checksum. The commit contains the\nlayer payload tree, package payloads and a package ownership index (D-026), plus\nassociated commit metadata. D-044 separates a system payload namespace from\nlayer metadata. Exact namespace names and serialization remain to be frozen.\n\nIllustrative layout:\n\n```text\nlayer commit\n├── payload/\n│ └── usr/...\n└── metadata/\n ├── manifest\n ├── packages\n ├── overrides\n └── provenance\n```\n\nLayer commits are composition inputs, not bootable deployments. The payload holds\ndeclared runtime packages and required dependencies, not incidental build tools or\ntemporary build state. A tool explicitly selected as part of the target system\nis legitimate payload even if it is also used during builds.\n\nThe package index maps package identities (including version, architecture and\nsource package checksum) to files and metadata needed to construct a coherent\npacman database. Package content, layer-added configuration, explicit overrides and\ngenerated results must be distinguishable by provenance.\n\nComposition selects indexed content, includes shared packages once, applies\nauthorized overrides and produces a complete image tree with conventional runtime\npaths. Layer metadata is not copied wholesale into that root; image provenance and\nthe installed-package database are assembled separately. OSTree continues to store\nordinary trees and deduplicate objects; namespaces do not introduce a new store or\nnon-standard runtime paths.\n\nImportant: 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.\n\n### Purpose\n\nA distribution role. Initial values:\n\n- `desktop`\n- `server`\n- `iot`\n\nPurpose is a first-class semantic category, not a separate operating-system implementation.\n\nD-041 distinguishes the role (`desktop`, `server`, `iot`) from a concrete variant\nsuch as `desktop/kde` or `desktop/gnome`. D-055 revises D-041's cardinality:\na composition selects zero or one concrete Purpose layer. Exact manifest field\nnames remain open.\n\n### Managed Overlay\n\nA 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.\n\n### Hardware profile\n\nA Git-managed manifest or profile definition that selects one or more Managed Overlays and their configuration. It is not a separate layer category in the initial model.\n\n### Composition\n\nThe deterministic application of the selected Core, Purpose and Managed Overlay commits into a complete filesystem tree, followed by creation of a complete image OSTree commit.\n\n## 3. Initial composition order\n\nThe initial logical order is:\n\n1. Exactly one Arch Core.\n2. Zero or one Purpose layer (D-055).\n3. Zero or more Managed Overlays in their explicit composition-manifest list order (D-039).\n\nThe manifest list is authoritative for Managed Overlay order. Each overlay may\ndeclare required overlays, before/after constraints and incompatibilities. The\nComposition Engine validates these constraints against the selected list rather\nthan silently reordering it or inserting missing required overlays. Missing required\noverlays, violated ordering, cycles and incompatible selections fail resolution\nwith diagnostics identifying the offending overlays and constraints.\n\nLater position does not grant replacement rights. Whole-package replacement still\nrequires explicit intent under D-038; file overrides require their declared path\npermissions. Shared dependency ownership follows the explicit order under D-025.\nHost Extensions are applied after the managed composition in the local workflow;\nD-039 does not define their internal package transaction ordering or request schema.\n\nIllustrative graph:\n\n```text\nArch Core\n └── Purpose: Desktop\n ├── Managed Overlay: hardware/hp-elite-x2\n ├── Managed Overlay: hardware/custom-fingerprint\n └── Managed Overlay: feature/virtualization\n ↓\n Complete image commit\n```\n\nA composition may select a different Purpose, but it must still resolve to one complete image commit.\n\nD-055 defines the official supported Archipelago Core variant with zero Purpose\nlayers out of the box. Core-only is a complete composition model, not a bootable\nlayer commit or a test-only exception. Users may construct custom overlay systems\nor select one Purpose later through system management. Adding Purpose creates a\nnew deployment, validates the complete selection and preserves persistent data.\nFurther customization uses Overlays or Host Extension packages, never a second\nPurpose layer. User-authored overlay sets do not automatically receive official\nsupport; they may later be reviewed and adopted as an official Purpose.\nHost Extensions retain their separate unsupported policy.\n\nHost Extensions are applied above the managed composition in a separate local\ncomposition (RFC-0004). Managed Overlays and Host Extensions can change lower\npayloads under their respective policies; their position does not grant implicit\nunrestricted replacement permissions.\n\nThe ordering is logical and does not imply OSTree has native layer stacking. The Composition Engine performs the merge.\n\n## 4. Arch Core responsibilities\n\nCore is built from the Arch Linux `base` metapackage plus the `linux` kernel\npackage. This is the initial foundation, not an exhaustive package list:\nD-074 adds `linux-firmware` explicitly with its normal dependency closure, in Core\nand the live installer. Do not rely on an incidental `linux` dependency. Further\nhardware-specific firmware and boot/deployment integration inputs require review.\n\nArch Core provides the generic Linux foundation, including:\n\n- Base userspace and package management foundations.\n- Kernel flavor(s) selected by the distribution contract.\n- Generic firmware and drivers included in the Core package set.\n- systemd and base system services.\n- Standard filesystem hierarchy and runtime interfaces.\n- Base initramfs and boot integration inputs.\n\nInitial hardware support is bounded by the hardware support provided by Arch Core and its selected kernels. Hardware-specific expansion is not a separate mandatory Hardware Layer at this stage.\n\n## 5. Purpose responsibilities\n\nPurpose layers provide role-specific packages, configuration and services.\n\nDesktop implementations include KDE Plasma, GNOME and XFCE. Purpose layers extend\nCore but are built independently, without mandatory pinning to an exact Core\ncommit. Role and variant are distinct under D-041; their schema remains to be frozen.\n\nA multi-desktop installation may use an explicitly designed Purpose variant or an\nadditional Managed Overlay, but must not select multiple Purpose layers. Display\nmanager selection, systemd display-manager switching, desktop service defaults\nand related integration are responsibilities of the concrete Purpose's content\nand lifecycle contract. The generic Composition Engine does not select or switch\ndesktop components through a separate desktop policy.\n\nD-048 requires Purpose services, service-start scripts and layer runtime checks to\nbe declared in manifests and executed after deployment in the target lifecycle.\nD-047 supplies the common boot-readiness framework without choosing desktop policy.\n\nUnder D-051, a Purpose's release validation must demonstrate that all its declared\ntarget services are correctly activated and functional without errors in a clean\nsupported environment. The manifest defines those services and functional checks.\nUnder D-052, this is additional to all Core functional gates, which must also pass\non the complete Core + Purpose image; a separately validated Core is insufficient.\nUser-corrupted persistent/application data is outside that clean-environment\nguarantee; correct distribution defaults and service activation remain required.\n\nChanging Purpose produces a new complete deployment and revalidates selected\noverlays against it. An incompatible overlay blocks the transition until the user\nexplicitly resolves the selection. Persistent data is preserved; desktop-specific\nuser settings are neither automatically converted nor deleted. Native OSTree `/etc`\nhandling still applies; Purpose integration must respect the shared hook/runtime\ncontracts and account for administrator configuration rather than bypassing them.\n\nExamples:\n\n- Desktop: desktop environment, display manager, audio stack, desktop services and related tooling.\n- Server: server-oriented tools, services and operational defaults.\n- IoT: selected runtime, device/service integration and function-specific packages.\n\nPurpose layers must not assume that a particular hardware model is present unless that dependency is explicitly expressed through a Managed Overlay or profile.\n\n## 6. Managed Overlay responsibilities\n\nD-093 accepts managed-overlay control through `archipelagod` D-Bus for CLI and\nfuture UIs: inspect the selected context, prepare a complete ordered exact-commit\nselection, then stage a checked plan. Overlays are not PackageKit packages.\n[RFC-0013](RFC-0013-host-management-and-packagekit.md) defines this API and preserves\nthe dependency, snapshot, ordering, permission and recomposition rules below.\n\nManaged Overlays may provide:\n\n- DKMS modules and other kernel modules.\n- Additional firmware.\n- Hardware-specific configuration.\n- Udev rules.\n- Systemd units and drop-ins.\n- Kernel parameters and initramfs configuration.\n- Feature-specific packages and services.\n- Explicit file replacements or adaptations of lower layers.\n\nOverlays should be as reusable as possible. A hardware profile may compose multiple overlays for a specific machine or device family.\n\n## 7. Overlay permissions and replacement semantics\n\nA Managed Overlay has ordinary layer capabilities by default: it may add files where no conflicting owner exists.\n\nReplacing a file owned by a lower layer requires explicit permission in the overlay manifest.\n\nThe permission must identify:\n- The target path or declared path set.\n- The expected lower layer or owner being replaced.\n- The operation type.\n- A reason or justification.\n- Optional expected content hash/version to guard against stale overrides.\n\nD-054 excludes unrestricted replacement capabilities, including\n`replace_lower_layer_files: true`, from v0. Trusted overlays must also declare\nscoped paths or path sets, expected owner, operation and reason.\n\nPersistent 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.\n\n## 8. Conflict rules\n\nThe accepted path composition contract (D-040) is:\n\n| Situation | Required behavior |\n|---|---|\n| Path absent below | Add the entry, subject to payload path policy |\n| Shared directory with identical owner, group, mode and xattrs | Merge children |\n| Shared directory metadata differs | Require an explicit metadata override |\n| Same resolved shared package supplied by multiple layers | Include once under D-025 |\n| Different packages claim a file, even with identical content | Fail unless replacement is explicitly authorized |\n| File/directory/symlink type differs | Fail unless type change is explicitly authorized |\n\nExplicit file deletion must identify the path, expected owner and reason. Record\nit in the composition diff and provenance; a deleted package-owned file is an\nexplicit file override and must not silently falsify package database records.\nPermission to remove a directory does not implicitly authorize recursive removal\nof its contents: the operation must explicitly cover affected paths. Type changes\nthat remove a directory's contents are subject to the same rule.\n\nThese operations apply to image composition, not persistent `/var` or `/home`\ndata, and remain subject to the dedicated `/etc` and boot integration contracts.\nRemoving an entire package uses package semantics rather than disguising it as\na collection of file deletions. D-054 defers standalone removal of lower-layer\npackages until a separate authorization and dependency contract is agreed.\nAdditions, explicit whole-package replacements and scoped file overrides remain\nsupported intents. Removing an overlay itself remains recomposition from the\nremaining selection, including dependency retention and reassignment under D-025.\n\nTreat symlinks as objects. Do not implicitly follow a symlink when applying an\noverride: modifying its target and replacing the link are distinct operations.\nThe implementation must define canonical path resolution for intentional Arch\nusr-merge aliases without allowing overrides to escape their declared targets.\n\nUse native OSTree tree operations after validating this policy; union order alone\ndoes not authorize conflicting ownership, metadata changes, deletion or type changes.\n\nDefault rule: two layers may not silently claim or replace the same path.\n\nThe Composition Engine must:\n- Track path ownership across all input layers.\n- Detect file/file, file/directory, symlink and type conflicts.\n- Fail composition on undeclared conflicts.\n- Permit explicitly authorized replacement according to the manifest.\n- Record the winning owner and replacement chain in composition metadata.\n- Produce a human-readable composition diff before apply/publish.\n\nTwo Managed Overlays that conflict must fail unless the later overlay explicitly declares the replacement relationship. Overlay order must be deterministic and must not depend on incidental registry enumeration or filesystem traversal order.\n\n## 9. Package database consistency\n\n### Explicit package replacement (D-038)\n\nPackage addition and replacement of a lower-layer package are separate intents.\nAn ordinary addition must not silently replace a base package; report the required\nreplacement and require it to be explicitly declared before applying the transaction.\nRecord the target and replacement package in the Managed Overlay manifest or Host\nExtension request state. Package-manager replacement metadata alone is not a\nsubstitute for that declaration.\n\nReplace whole packages using coherent package metadata and validate dependencies,\nconflicts and file ownership across the complete result, plus kernel ABI constraints\nwhere applicable. Do not implement replacement by blindly unpacking files over the\nexisting tree. Managed payloads still come from layer commits under D-026; this\npolicy does not require reinstalling them from the Package Registry.\n\nRemoving a replacement declaration creates a new composition using the package\nfrom the selected lower/base composition. A base update revalidates every applicable\nreplacement; Host Extension failures follow D-017. Record the effective owner and\nreplacement chain without rewriting immutable input commits.\n\nExplicit file overrides by Managed Overlays remain permitted under their path\npermissions and provenance rules. A file override is not a whole-package replacement\nand must not silently claim that pacman's package content is unmodified.\n\n### Ownership and database assembly\n\nThe accepted package ownership model (D-024) is:\n\n- Each package has one effective owning layer within a composition.\n- An upper layer reuses a package supplied by a lower layer without duplicating it.\n- Dependencies not supplied below belong to the extending layer.\n- An overlay must explicitly declare a package replacement; ownership transitions\n must be recorded rather than silently creating competing owners.\n- A layer's package requirements are described separately from its own payload,\n preserving independent builds without mandatory exact lower-layer commit coupling.\n\nShared dependency ownership is resolved per composition (D-025). If a dependency\nis not already provided below, include it once and assign it to the first layer\nrequiring it in deterministic composition order. Later layers reuse that package.\nWhen the owning layer is removed, a new composition retains the package if other\nlayers still require it and assigns ownership to the first remaining requiring\nlayer. Input layer commits remain unchanged; effective ownership is recorded in\nthe resolved composition metadata.\n\nThis rule applies to the same resolved package identity, not arbitrary packages\nsharing a name. It does not authorize implicit replacements or bypass dependency,\nsnapshot, ABI or path conflict checks.\n\nLayer commits carry package payloads and a package ownership index (D-026),\nincluding dependency payloads needed for composition. Independently built commits\nmay carry the same dependency; the Composition Engine includes the resolved\npackage only once in the final tree and assigns its effective owner under D-025.\nThe artifact index describes package content; effective layer ownership is a\nproperty of the resolved composition. Input commits are not rewritten.\n\nPackage payloads are materialized from layer OSTree commits rather than installed\nfrom the Package Registry during composition. The Package Registry remains a build\ninput. OSTree provides storage and content deduplication; package-level selection,\nownership resolution and merge validation are Archipelago responsibilities.\nThe exact index schema, payload layout and construction of the final coherent\npacman database remain open.\n\nPackage transactions in layer builds and Host Extension workflows run in isolated\nstaging using pacman-compatible mechanisms. Managed composition instead selects\npackage payloads from layer commits under D-026, including declared replacements;\nit assembles coherent database records without replaying package installation.\n\nThe 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.\n\nThe exact package database model across independently built layer commits is an open question. It must be resolved before production implementation of composition.\n\nD-031 selects a non-default image-owned pacman database location and persistent\nworking/history copies for Host Extensions; ordinary live-host pacman mutation is\ndisabled. Exact paths and generation lifecycle are detailed proposals in RFC-0007.\n\n## 10. DKMS and kernel compatibility\n\nA Managed Overlay containing kernel modules must declare compatibility with the exact Core/kernel artifact or an equally strong kernel ABI identity.\n\nA kernel change invalidates an overlay's module compatibility unless the overlay explicitly supports the new ABI and validation confirms it.\n\nRequired DKMS build failures block publication of the affected overlay and any image depending on it.\n\nValidation should include:\n- Kernel release and ABI match.\n- Expected module files exist.\n- `depmod` succeeds.\n- Module dependencies resolve.\n- Required modules are included in initramfs where necessary.\n- Module signing is performed when required by the target Secure Boot policy.\n\n## 11. Layer metadata and provenance\n\nEvery published layer must expose at least:\n\n- Layer name and immutable version.\n- Layer category and semantic position.\n- Architecture.\n- OSTree commit checksum.\n- Manifest schema version.\n- Dependencies and compatibility constraints.\n- Git source repository and commit.\n- Package names, versions and package repository snapshot.\n- Build environment identity.\n- Build toolchain identity.\n- Validation results.\n- Overlay permissions, if applicable.\n- Signature/provenance reference.\n\nSemantic versions are human-facing labels. OSTree commit checksums are the immutable content identity.\n\n## 12. Reuse and compatibility\n\nA layer can be reused by multiple compositions only when all declared compatibility constraints are satisfied.\n\nA layer version must never be silently retargeted to different content. A changed payload or manifest creates a new immutable commit and version identity.\n\nD-042 separates manifest intent from a resolved build lock. Manifests may use\nhuman-friendly refs/channels for discovery and update selection, or explicit commit\npins. The lock records exact commits and the common snapshot; composition consumes\nthose inputs without silently refreshing them. Manifest/lock mismatch requires\nresolution again. See RFC-0003 §5 for the accepted lifecycle.\n\n## 13. Acceptance criteria\n\n- Core, Purpose and Overlay commits can be independently published and retrieved.\n- A composition can resolve exact commits from the Layer Registry.\n- The Composition Engine can deterministically merge them.\n- Undeclared file conflicts fail the build.\n- Explicitly authorized overlay replacements succeed and are recorded.\n- Kernel-bound overlays reject incompatible Core/kernel changes.\n- The resulting complete image is an OSTree commit with traceable inputs.\n\n## 14. Open questions\n\nSee [`../spec/open-questions.md`](../spec/open-questions.md).\n",
"sha256": "5c4b33d94306af9dd0e79a76bfb4ef54f81d4e4e53fb5c44e9d101d27613de1b",
"decisions": [
"D-017",
"D-023",
"D-024",
"D-025",
"D-026",
"D-031",
"D-038",
"D-039",
"D-040",
"D-041",
"D-042",
"D-043",
"D-044",
"D-047",
"D-048",
"D-051",
"D-052",
"D-054",
"D-055",
"D-061",
"D-074",
"D-093"
]
},
{
"id": "RFC-0003",
"title": "Build Engine, Composition Engine and Linux Filesystem Contract",
"status": "Accepted",
"status_detail": "Accepted — architectural contract under D-061; explicit implementation questions remain open",
"date": "2026-11-04",
"version": "0.0",
"scope": "Build and composition pipeline, generic Linux compatibility",
"path": "rfc/RFC-0003-build-and-composition.md",
"markdown": "# RFC-0003: Build Engine, Composition Engine and Linux Filesystem Contract\n\n- **Status:** Accepted — architectural contract under D-061; explicit implementation questions remain open\n- **Accepted:** 2026-11-04\n- **Version:** 0.0\n- **Date:** 2026-11-03\n- **Scope:** Build and composition pipeline, generic Linux compatibility\n\n## 1. Summary\n\nArchipelago builds and composes operating-system artifacts using existing Linux and Arch Linux tools in controlled environments.\n\nThe default strategy is binary package reuse. Source builds are performed only when necessary for project-owned software, patches/adaptations, unavailable binary packages or kernel modules such as DKMS.\n\n## 2. Build host independence\n\nThe build host may be a supported Linux distribution other than Arch Linux.\n\nArchipelago provisions an isolated Arch Linux build environment, initially using `systemd-nspawn` and a pinned Arch Linux package snapshot. The build host's package manager and host filesystem must not be used to mutate the target system root.\n\nNon-Linux build hosts are out of initial scope unless they provide a supported Linux VM or remote Linux builder.\n\n## 3. Build environment\n\nThe initial build environment is an Arch Linux root filesystem created and managed by Archipelago.\n\nResponsibilities:\n- Pin the Arch Linux Archive snapshot or controlled package repository state.\n- Use the common pinned package snapshot required by all layers of the target\n composition (D-023). Reject layers from different snapshots during input\n resolution; do not attempt to repair the mismatch through partial upgrades.\n- Install build tools and package dependencies.\n- Execute pacman and makepkg operations.\n- Provide target architecture and kernel build context.\n- Keep build outputs and logs outside the immutable build root where practical.\n- Capture toolchain and environment identity.\n\n`systemd-nspawn` is the initial isolation mechanism. The architecture should not hard-code nspawn-specific behavior into manifests where a future isolated OCI or VM worker could implement the same build contract.\n\n## 4. Binary-first package policy\n\n### Common package snapshot (D-043)\n\nA snapshot is one immutable, ordered set of package repositories for a target\narchitecture. It combines pinned Arch repository content (for example an Arch\nLinux Archive slice) with a specific Archipelago package repository revision.\nIts description records repository order/priority, repository database checksums\nand available package identities. Preserve standard pacman repository priority\nsemantics rather than inventing a separate package selection precedence.\n\nDerive `snapshot_id` from the content of that description. All managed layers in\na composition declare the same ID, although each selects a different package set.\nPublishing, adding or replacing package content requires a new snapshot; published\nsnapshots must not be mutated. Dates and repository URLs alone are not identity.\nDelivery locations may change if retrieved databases/packages match their pinned\nchecksums. Exact descriptor schema, canonicalization and trust policy remain open.\n\nA snapshot defines the available package universe; a D-042 lockfile records the\ninputs actually selected from it. Local Host Extension package files are explicit\nexternal inputs recorded separately, not additions to a published managed snapshot.\nTheir dependencies are resolved against the selected base and its snapshot under\nD-037. Snapshot identity does not itself prove ABI compatibility or replace\nsignature, dependency and final-composition validation.\n\n### Package selection\n\nD-090 supersedes the historical monthly cadence below: capture a repository view\non terra's `tank` using ZFS, then rebuild at 00:00 UTC on the 15th and 30th. Upgrade\nall packages already present in the isolated bootstrap from that selected snapshot\nbefore building Core; Purpose consumes the same inputs. Prompt Archipelago fixes\nremain manual. See [release snapshots](../spec/release-snapshots.md). Migration and\nactivation follow completion of the current desktop/CLI/image task.\n\nD-063 schedules monthly repository snapshots, with ZFS-based creation on the mirror\nhost deferred until a working experimental `archipelago-core-latest.iso` exists.\nThis delivery order does not relax D-043 identity or D-050 public release gates.\nAn experimental latest filename is not a snapshot identity or a public-channel release.\n\nDefault package flow:\n1. Resolve a package from a pinned binary repository.\n2. Verify package identity and integrity.\n3. Install it into the staging root.\n4. Record package name, version, architecture, repository and checksum.\n\nBuild from source only when needed:\n- Archipelago-owned software.\n- Required patching or adaptation.\n- Missing compatible binary package.\n- AUR package selected by a managed profile.\n- DKMS or other kernel-ABI-specific module build.\n\nAUR recipes and user-supplied build inputs are untrusted code and must execute only inside isolated build environments.\n\n## 5. Composition pipeline\n\n### Manifest intent and resolved inputs (D-042)\n\nThe source manifest declares Core, an optional single concrete Purpose, the ordered Managed\nOverlay list, compatibility constraints, composition configuration and explicit\noverrides. Human-friendly refs/channels are allowed for discovery; explicit commit\npins are also allowed. A resolved lockfile is a separate record of exact inputs.\n\nResolve/update produces a new lockfile after compatibility validation. It records:\n\n- Exact OSTree commit checksums for all selected layers and their order.\n- The common pinned package snapshot identity and target architecture.\n- Resolved package identities, versions and checksums.\n- Schema versions and finalization inputs required for repeatable composition,\n including declared configuration and relevant tool/environment identities.\n\nBuild/compose consumes the locked inputs. It must not resolve newer refs, refresh\npackage selections or substitute an unavailable artifact silently. Fetching the\nexact locked object is allowed; inability to obtain it is an error. A manifest\nchange that invalidates the lock requires a new resolve before composition.\n\nRecord both manifest and lockfile identities in image provenance. The exact schema,\ncanonical identity representation and compatibility checks remain to be specified.\nPinned inputs provide repeatable resolution; they do not alone establish bit-for-bit\nreproducibility of all generators or commits.\n\n### Pipeline stages\n\nInitial logical pipeline:\n\n```text\nGit source revision\n |\n v\nResolve composition manifest\n |\n v\nResolve exact layer commits and dependencies\n |\n v\nResolve pinned package/build inputs\n |\n v\nValidate/write resolved lockfile (resolve/update)\n |\n v\nBuild/compose from manifest and matching locked inputs\n |\n v\nCreate isolated Arch staging environment\n |\n v\nAssemble layer payloads into staging filesystem\n |\n v\nApply deterministic merge and explicit override rules\n |\n v\nRun configuration hooks and validations\n |\n v\nValidate package database and filesystem policy\n |\n v\nCreate complete OSTree image commit\n |\n v\nSign and publish refs + provenance\n |\n v\nBuild release artifacts when requested\n```\n\nThis pipeline is a contract-level outline. Exact staging-root implementation and OSTree APIs are to be specified in implementation RFCs.\n\nLayer builds are independent (D-020). Resolving exact layer commits here pins the\ninputs of a particular composition, rather than imposing mandatory exact-commit\ncoupling between independently published layers. Build inputs must still be\nrecorded and Arch Linux package and ABI compatibility checked. Cross-layer package\ndependency resolution and package database assembly remain open contracts.\n\nD-039 makes the composition manifest's Managed Overlay list order authoritative.\nValidate required overlays, before/after constraints and incompatibilities before\npayload assembly; report missing dependencies, violated order or cycles without\nsilently reordering or augmenting the selected list.\n\nD-040 defines the path conflict policy used before native OSTree union operations:\nmerge directories with matching metadata, reject unauthorized file ownership or\ntype conflicts, and require explicit metadata overrides and deletions. Symlinks\nare objects, not implicit routes to override targets. See RFC-0002 §8.\n\nPackage resolution follows D-024: requirements are distinct from a layer's own\npayload, each package has one effective owning layer, lower-layer packages are\nreused without duplication, and missing dependencies belong to the extending\nlayer. Overlay package replacements must be explicit. Validate this ownership\nmodel alongside the common snapshot requirement.\n\nResolve shared dependencies according to D-025: include each resolved package\nonce, reusing lower-layer providers or assigning it to the first requiring layer\nin deterministic order. Record effective ownership in composition metadata.\nRecomposition after owner removal retains dependencies still required by remaining\nlayers and reassigns ownership without modifying input layer commits.\n\nLayer builds capture package payloads and a package ownership index in their\nOSTree commits (D-026). Composition materializes selected packages from those\ncommits, including each resolved shared dependency once. It does not reconstruct\nlayer payloads by installing packages from the Package Registry. Package resolution\nand installation from that registry remain part of layer builds. OSTree supplies\nobject storage and deduplication; Archipelago supplies package-aware selection\nand deterministic merging. Final pacman database construction is still open.\n\nD-044 separates the layer's system payload namespace from its manifest, package\nindex, override records and provenance. Select content using the index rather than\nchecking out an entire layer commit as a runtime root. Exclude incidental build\ntools/state, preserve provenance of layer changes and generated outputs, and\nassemble image metadata and the installed-package database separately. Namespace\nnames and serialization are not yet frozen.\n\n## 6. OSTree responsibilities\n\nOSTree is used for:\n- Immutable object storage and deduplication.\n- Layer and image commits.\n- Refs and channels.\n- Repository transport and publication.\n- Deployment preparation.\n- Atomic update and rollback.\n\nArchipelago is responsible for:\n- Layer semantics and dependency resolution.\n- Merge ordering and conflict handling.\n- Package database coherence.\n- Build hooks and validation.\n- Composition provenance.\n- Policy enforcement.\n\nA layer commit is an OSTree commit, but OSTree does not automatically merge multiple commits as semantic layers. The Composition Engine must produce the resulting complete tree and commit it.\n\n## 7. Conventional filesystem contract\n\nThe resulting distribution follows the conventional Linux filesystem hierarchy and Arch Linux's selected `/usr`-merged layout.\n\nRequirements:\n- Normal executable paths such as `/usr/bin`.\n- Normal library paths such as `/usr/lib`.\n- Standard ELF interpreter and dynamic linker behavior.\n- Standard glibc ABI for the selected Arch base.\n- Standard shared data paths such as `/usr/share`.\n- No mandatory Nix-style content-addressed application path.\n- Ordinary Linux binaries must not require an Archipelago-specific loader or runtime.\n\nThe exact `/bin`, `/sbin`, `/lib` and `/lib64` symlink policy follows the chosen Arch base and must be tested rather than invented independently.\n\n## 8. Mutable and immutable paths\n\nInitial intent:\n\n- `/usr`: image-owned immutable payload.\n- `/etc`: machine-specific writable configuration, using OSTree's configuration handling.\n- `/var`: persistent state shared across deployments within the installation.\n- `/home`: persistent user data.\n- `/run`: volatile runtime state.\n- `/tmp`: temporary writable state.\n- `/boot` and ESP: managed by the chosen boot integration.\n- `/opt`: symlink to `/var/opt` under D-030; package payload adaptation remains open.\n\nLayer payloads must not directly inject persistent user data. The exact path allowlist/denylist and special handling of `/etc`, `/boot` and `/opt` are open questions.\n\nRFC-0007 records the accepted Silverblue-style persistent-data symlinks, shared\nstateroot, native `/usr/etc` defaults and per-deployment `/etc`, systemd-boot focus,\nstaged updates and the Arch-supplied OSTree version baseline (D-030–D-035).\n\n## 9. Hooks and scripts\n\nHooks may be used for build-time configuration and validation. They must be:\n- Declared in the source manifest.\n- Executed in a controlled build environment.\n- Deterministic where possible.\n- Logged and included in provenance.\n- Prohibited from modifying the build host.\n- Subject to explicit network access policy.\n\nRuntime first-boot actions are a separate mechanism and must not be confused with build-time hooks.\n\nD-027 accepts phase separation: install packages and execute package scripts in\nisolated layer builds; regenerate system-wide derived artifacts against the final\ncomposition; required failures block publication. Deferred hooks must have explicit\nreplacements, and package scripts must not be blindly replayed during composition.\nD-058 accepts complete action classification, explicit deferred-action mappings,\nnetwork-free finalization with locked inputs and explicit order, and required\nfailure capture even when pacman exits successfully. D-059 accepts selected action\nplacements; RFC v0 approval under D-061 accepts the architectural baseline while\nleaving exact adapters and schemas open. The action matrix and execution contracts are specified in\n[RFC-0005](RFC-0005-hooks-and-finalization.md).\n\n## 10. Caching\n\nThe build system should cache:\n- Downloaded binary packages.\n- Built packages.\n- Build environment images/rootfs.\n- Layer commits.\n- Intermediate staging outputs where safe.\n\nCache keys must include all relevant inputs, including source revision, package snapshot, architecture, toolchain, build configuration and dependency commit checksums.\n\nA cache hit must not bypass signature verification or required validation.\n\n## 11. Reproducibility and provenance\n\nFor each layer and image, record:\n- Git revision.\n- Exact input layer commit checksums.\n- Package repository snapshot.\n- Package checksums and versions.\n- Build environment and toolchain identity.\n- Build commands/hooks.\n- Validation results.\n- Output OSTree commit checksum.\n- Signature and signing identity.\n\nD-087 (2026-11-06) explicitly authorizes the current daily Core/GNOME pipeline to\npublish to `stable/core` and `stable/gnome` with its current checks, matching the\ninstalled ISO update profiles. This operational exception records exact candidate\nidentities and outstanding admission evidence on each publication; it does not\nclaim the general reproducibility or integration requirements below are proven.\n\nD-050 requires full reproducibility for publication to both `testing` and `stable`,\nnot merely traceability or repeatable dependency resolution. Fixed source manifests,\nlocks and declared build inputs must reproduce the image content and canonical\ncommit identity. Nondeterministic inputs must be eliminated or explicitly normalized\nin the release build contract. Exact comparison scope for additional release\nartifacts and signatures, canonical metadata rules and the required independent\nrebuild evidence remain to be specified before this gate can be implemented.\n\nOperational logs, wall-clock execution times and individual builder attestations\nmust not introduce uncontrolled variation into the canonical image identity; their\nstorage and binding to the result need a defined provenance contract.\n\n### 11.1 Release channels and promotion (D-045)\n\nThe public image update channels are `testing` and `stable`, supplemented by an\naccess-restricted experimental `staging` channel (D-050). A channel is a\nmutable reference to an immutable complete image commit; deployments always use\nan exact commit. Use native OSTree refs, signature mechanisms and summary files,\nsupplemented by Archipelago release metadata.\n\nBuild and validate the candidate before publication. Make its objects and required\nmetadata available before publishing the new channel target. A failed build or\nrequired validation must leave the previous channel target unchanged and available.\nThe exact publication transaction across refs, signatures, summary and any external\nrelease metadata remains to be specified; native OSTree alone is not a guarantee\nof multi-registry atomic publication.\n\nPromote a tested image from `testing` to `stable` by referencing the same commit,\nnot by rebuilding or creating a new commit with different metadata. Channel-specific\npromotion records must not change that image identity. Exact channel ref naming,\nrequired validation matrix, reproducibility evidence and retention periods remain open.\n\nBoth public channels must satisfy full reproducibility and all required build,\ncomposition, script and runtime validation gates. Known failures must not be waived\nmerely because the destination is `testing`. Runtime scripts/checks are exercised\nafter deployment in the declared supported validation environments before publishing\nthe candidate to a public channel; this does not move runtime actions into layer\nbuilds or remove their manifest-driven lifecycle.\n\n`testing` is where new software and RFC-driven behavior are validated and observed\nbefore promotion to `stable`; it is not the destination for known broken builds.\nDetailed promotion criteria and the hardware/VM/Purpose validation matrix remain\nopen. This release requirement does not imply that every possible machine condition\ncan be proven failure-free, and does not remove D-047/D-049 runtime diagnostics,\nretention or explicit user-controlled rollback.\n\nExperiments belong in two contexts:\n\n- `staging`, restricted to selected Archipelago developers. Access must be enforced\n by registry/source infrastructure as applicable, not merely hidden ref names.\n- Reproducible local environments on user-controlled infrastructure, built from a\n local source manifest tree. Users may modify and break these environments; source\n changes and resolved inputs must be captured so the experiment can be repeated.\n\nExperimental outputs do not become public `testing`/`stable` releases until they\npass the public release gates. They must not accidentally advance public refs.\n\nUpdate selection operates on a coherent complete composition. Do not independently\nupdate Core while retaining Purpose or overlays from another package snapshot.\nCustom compositions resolve and validate a complete new lockfile before preparing\na deployment. Host Extensions are then reapplied to that selected result under\nD-017/D-037, rather than being silently included in a supported published image.\n\n## 12. Acceptance criteria\n\n### 12.1 Public-channel functional gates (D-051)\n\nBoth `testing` and `stable` candidates must pass the following integration checks\nin controlled validation environments, in addition to the existing build checks.\n\n**Arch Core:**\n\nD-055 defines the official Archipelago Core variant with zero Purpose layers.\nRun these gates on its complete Core-only image and on every Core + Purpose\ncandidate under D-052. Core layer commits remain composition inputs; Core-only\nimages still undergo composition, finalization and deployment validation.\n\n- Boot the candidate through the selected boot integration.\n- Authenticate successfully through local login using a provisioned test user.\n- Install a representative package through Host Extensions, finalize and activate\n the resulting deployment, and verify the package is usable without required\n check or script errors.\n- Apply a representative Managed Overlay, finalize and activate the resulting\n deployment, and verify its declared effect without required check or script errors.\n\nExercise the supported lifecycle, not merely a successful CLI return or an\nunactivated staging tree. The Host Extension result remains a local unsupported\ncomposition; testing that mechanism does not promote it into the published image.\nFixtures must obey the selected snapshot and replacement policies. Exact fixture\npackages/overlays and test harness remain to be specified.\n\n**Purpose:**\n\n- Inherit every Arch Core gate above (D-052): boot, local login, Host Extension\n installation/activation and Managed Overlay application/activation must pass on\n the complete Core + Purpose candidate. A Purpose deployment necessarily includes\n Core; results from an isolated Core test do not replace full-composition tests.\n- In a clean, supported environment, all declared target services have their\n required defaults, enablement/activation and dependencies in place.\n- The services start and satisfy their declared functional readiness checks without\n errors. A unit state alone is not proof of functional behavior; handle oneshot,\n socket-activated and other service types according to their intended lifecycle.\n- Purpose manifests define the target services, activation behavior and checks;\n the generic release system does not invent desktop-specific policy.\n\nThe clean-environment guarantee excludes failures attributable to user-corrupted\npersistent or application data. It still requires distribution-controlled settings\nand activation to work. This boundary does not excuse defects in our own scripts,\ndefaults or supported transition logic, and does not authorize deletion of user data\nto make a check pass. Runtime diagnostics and explicit rollback remain available.\n\nThese are functional release gates, not a proof of bit-for-bit reproducibility.\nD-050's independent reproducibility evidence remains a separate open contract.\n\n### 12.2 Build and composition checks\n\n- Build runs on a supported non-Arch Linux host.\n- Build isolation prevents host package/filesystem mutation.\n- Binary packages are used by default.\n- A composition produces a complete OSTree image commit.\n- Standard Linux ELF binaries execute without a custom Archipelago runtime.\n- Package and layer provenance is queryable.\n- Undeclared filesystem conflicts block publication.\n\n## 13. Open questions\n\nSee [`../spec/open-questions.md`](../spec/open-questions.md).\n",
"sha256": "df25697d88446c20a73016b7c88fdcf0ddeeb20091283922155e1df6d637d66e",
"decisions": [
"D-017",
"D-020",
"D-023",
"D-024",
"D-025",
"D-026",
"D-027",
"D-030",
"D-035",
"D-037",
"D-039",
"D-040",
"D-042",
"D-043",
"D-044",
"D-045",
"D-047",
"D-049",
"D-050",
"D-051",
"D-052",
"D-055",
"D-058",
"D-059",
"D-061",
"D-063",
"D-087",
"D-090"
]
},
{
"id": "RFC-0004",
"title": "Host Extensions and Unsupported Local Modifications",
"status": "Accepted",
"status_detail": "Accepted — architectural contract under D-061; explicit implementation questions remain open",
"date": "2026-11-04",
"version": "0.0",
"scope": "Local package injection outside the supported managed composition",
"path": "rfc/RFC-0004-host-extensions.md",
"markdown": "# RFC-0004: Host Extensions and Unsupported Local Modifications\n\n> **D-088 amendment (Accepted, 2026-11-06):** repository-name additions retain\n> `supported` on a supported base with a separate `customed` annotation. Local\n> files remain unsupported, even when their names match repository packages.\n> Custom bases/overlays and lower-package overrides do not gain support. This\n> supersedes blanket unsupported wording for Host Extensions throughout this RFC.\n> Record every request's source and retain it through update reapply and removal;\n> missing legacy provenance is unknown, never inferred from names. Removal rebuilds\n> the base plus remaining requests, preserving inputs/history and user data.\n> Classify booted; pending/requested state is separate (D-057). List sorted effective\n> added packages including dependencies: ten names, then `… +N packages`.\n> `customed` cannot upgrade an unsupported/unverified base. Local-file acceptance\n> criteria below remain unchanged; repository additions must retain support.\n\n- **Status:** Accepted — architectural contract under D-061; explicit implementation questions remain open\n- **Accepted:** 2026-11-04\n- **Version:** 0.0\n- **Date:** 2026-11-03\n- **Scope:** Local package injection outside the supported managed composition\n\n## 1. Summary\n\nHost Extensions provide an explicitly unsupported mechanism for installing\npackages into a host-specific composition. D-037 extends the initial local\n`.pkg.tar.zst` interface to package selection by name from the base image's pinned\nrepository snapshot, while retaining local package file inputs.\n\nThe 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.\n\nHost Extensions are separate from Managed Overlays:\n- Managed Overlays are Git-defined, versioned, registry-published and validated.\n- Host Extensions are local, user-controlled and explicitly outside the project's support guarantee.\n\n## 2. User intent and support boundary\n\nUnder D-057, support status describes the current booted deployment. Applying Host\nExtensions makes the resulting composition `unsupported`; merely enabling the\nfeature, requesting packages or preparing a pending deployment does not change\nthe booted deployment's status. Requested and pending state is shown separately.\n\nThis status means:\n- Archipelago does not guarantee compatibility of the modified composition.\n- Issues caused by local packages or their interactions are not project defects.\n- The project is not obligated to modify Arch Core, Composition Engine, project source code or RFCs to accommodate a local Host Extension.\n- Users remain responsible for package selection, provenance, compatibility and recovery.\n\nThis policy does not prohibit users from reporting bugs in unmodified Archipelago components. The project may investigate issues that can be reproduced without Host Extensions, but no obligation to support the modified composition is created.\n\n## 3. No direct mutation of the live system\n\nD-093 accepts native-package management through PackageKit's Archipelago backend\nand direct CLI use of the same `archipelagod` D-Bus interface. Both create checked\nplans and staged deployments; PackageKit is not the ALPM live-host backend or an\nindependent resolver. Snapshot-bound identities, FD import of local files, original\ncaller authorization, ownership/removal limits and pending/restart UX are defined\nin [RFC-0013](RFC-0013-host-management-and-packagekit.md). Existing enablement,\nprovenance, atomic reapplication and persistence contracts remain binding.\n\nHost Extensions must not run pacman against the live immutable host `/usr`.\n\nInstead:\n1. User explicitly enables Host Extensions and acknowledges the unsupported status.\n2. Archipelago imports or references local `.pkg.tar.zst` packages.\n Alternatively, resolve explicitly requested package names from the selected\n base's pinned repository snapshot (D-037).\n3. Packages are verified and recorded.\n4. A staging root is created from the selected base image.\n5. pacman installs the local packages into the staging root with a coherent package database.\n6. Composition validation runs.\n7. A local host-specific OSTree commit is created.\n8. A new deployment is prepared.\n9. The user activates it through the normal deployment lifecycle.\n\nThe exact implementation may use a local pacman repository or a controlled package file set. It must not simply unpack archives over `/usr`.\n\n## 4. Local state and history\n\nD-090 fixes the repository transport binding: named Host Extensions and their\ndependencies use the immutable snapshot embedded in their selected base. New OS\ndeliveries advance its URL/identity; reapplication starts from the new base and\nsnapshot. Retired/missing snapshot inputs are errors, never permission to use the\nrolling mirror. See [release snapshots](../spec/release-snapshots.md) for the\nthree-snapshot retention and remaining retirement implementation.\n\n### 4.1 Accepted intent and generation model (D-037)\n\nPersist the user's explicitly requested extension set separately from automatically\nresolved dependencies. Each local generation records its base image commit,\npackage snapshot, resolved package versions/checksums, result commit, matching\nbase-plus-extensions package database, and validation results.\n\nSupport two input kinds:\n\n- Package names resolved from the pinned repository snapshot of the selected base.\n- Local `.pkg.tar.zst` files retained with checksums; their compatibility must be\n validated rather than inferred from their availability or filename.\n\nResolve dependencies against the selected base and its pinned repository snapshot,\nincluding explicitly supplied local packages as transaction inputs. Do not consult\nan unrelated live/latest Arch repository for missing dependencies. Managed layers\nstill obey D-023; accepting local package inputs does not classify them as managed\nsnapshot-compatible layers or remove the unsupported status.\n\nCompose from the selected base and full requested extension set. The working\ndatabase starts as a copy of that base's database and, after successful installation,\ndescribes the full local composition. Retain its persistent generation copy and\nthe corresponding database in the resulting image. A writable workspace does not\nreplace the authoritative database of an already committed deployment.\n\nOn base change, resolve named requests against the new base snapshot and reapply\nthe declared set using the new base's database. Retained local files remain exact\ninputs until explicitly changed; incompatible files invoke D-017 failure handling.\nNever carry an old mutated database forward as though it described a new base.\n\nRemoving an extension changes explicit intent and recomposes from the base plus\nthe remaining set. Dependencies required by neither the base nor remaining\nextensions are omitted. Persistent application/user data and prior generation\nhistory are not implicitly removed. Package replacements follow D-038 below;\ndetailed schema and dependency policy beyond this baseline remain to be specified.\n\nPackage addition and base-package replacement are distinct requests (D-038).\nAn addition requiring replacement must report that requirement instead of silently\nchanging the base package. Explicit replacement requests identify the target and\nreplacement and operate on whole packages through the staging transaction.\nValidate the full resulting dependency set, conflicts, file ownership and applicable\nkernel ABI. Removing an override recomposes from the selected base and remaining\nrequests. Revalidate replacements on base updates; D-017 applies on failure.\n\n### 4.2 Persistent storage\n\nHost Extension inputs and state must persist independently of the currently booted deployment.\n\nIllustrative layout:\n\n```text\n/var/lib/archipelago/host-extensions/\n├── packages/\n├── repository/\n├── manifests/\n├── history/\n└── metadata/\n```\n\nThe final path is not frozen. The required properties are:\n- Inputs survive OS updates and rollback.\n- The user can inspect installed local packages and their origins.\n- A previous Host Extension set can be restored.\n- No package is silently discarded during update.\n- Cleanup requires explicit user action.\n\nD-046's automatic deployment/cache cleanup does not authorize deletion of these\nlocal package inputs or generation history. Preserve the OSTree roots needed for\nprotected local recovery state; removing an unpinned deployment must not silently\ninvalidate history that remains promised as recoverable. See RFC-0007 §6.1.\n\n## 5. Update policy: best-effort reapplication (Option B)\n\nD-031 selects persistent package database working/history copies; D-037 accepts\nthe generation lifecycle and repository-backed selection described above and in\nRFC-0007 §4. Each copy is associated with its base image; periodic maintenance alone\nmust not allow a stale database to describe another base's payload. Exact storage\nschema and safe cache reuse mechanics remain open.\n\n**Decision: Option B is selected.**\n\nWhen a supported upstream image is updated:\n1. Archipelago resolves and verifies the new supported image.\n2. It attempts to reapply the current Host Extension package set to the new image in staging.\n3. If all packages install and validation passes, Archipelago creates a new unsupported host-specific image commit containing the updated base plus Host Extensions.\n4. If reapplication fails, Archipelago must not silently force incompatible packages into the new image.\n5. The supported upstream image remains installable and bootable without Host Extensions.\n6. On failure, preserve the current deployment and boot selection. Offer the new\n supported image without the entire extension set, with a clear diff; activate\n that fallback only on explicit user selection (D-056).\n7. The previous deployment and local package inputs remain available for rollback or manual repair.\n\nD-056 prohibits automatic fallback activation and silently dropping individual\npackages. Exact CLI presentation remains open; the previous working deployment\nand local inputs must remain available.\n\n### 5.1 Failure handling\n\nA failed Host Extension reapplication must not:\n- Corrupt the upstream image commit.\n- Modify the registry's supported image.\n- Delete local package inputs.\n- Delete the previous deployment.\n- Prevent the user from selecting the unmodified supported image.\n\nArchipelago may offer:\n- Boot the updated supported image without Host Extensions.\n- Keep the previous deployment.\n- Retry after user changes the local package set.\n- Export diagnostics.\n\n### 5.2 Partial reapplication\n\nD-056 requires atomic reapplication of the declared set: all packages install and\nthe complete result passes validation, or reapplication fails. A failed attempt\nmust not publish a partially applied local image or change boot selection.\nThe unmodified upstream image remains an explicit fallback choice. Users may change\nthe requested set and retry; this is a new explicit request, not automatic partial\nreapplication.\n\n## 6. Status model\n\nD-057 defines support status for the current booted deployment:\n\n- `supported` — an officially supported composition without effective local\n modifications outside its support contract, including the official Core-only image.\n- `unsupported` — a composition with applied Host Extensions or user-authored\n modifications/custom overlays outside the official support contract.\n\nThere is no `recovery` status or separate recovery state in this model. Selecting\nor booting an older deployment does not itself change its support classification;\nthe effective composition determines that classification. Absence of Host Extensions\nalone is insufficient to classify an arbitrary custom overlay set as supported.\n\nStatus is primarily diagnostic evidence for issue reports. Expose the current\ndeployment and base identities, effective overlays and local package/file changes\nwith their provenance where available. Requested extension state and pending\ndeployments must be clearly distinguished from the booted result. Enabling the\nfeature without applying changes does not make an official image unsupported.\nExact reporting format and detection of out-of-band modifications remain open;\nan empty extension request list is not proof of an unmodified tree.\n\nStatus must be queryable through `archipelago status` and visible before update/apply\noperations, identifying which deployment each reported classification describes.\n\n## 7. Rollback and removal\n\n- Rollback must preserve the prior deployment and its Host Extension metadata.\n- Removing Host Extensions means composing a new deployment without them; it must not mutate the existing commit.\n- Disabling the feature must not delete local package files or history unless the user explicitly requests cleanup.\n- A user must be able to return to a supported composition by selecting/rebuilding from a supported image without Host Extensions.\n\n## 8. Security considerations\n\n- Local package files are untrusted inputs.\n- Package signatures and integrity must be checked according to configured policy.\n- Package install scripts execute only in the isolated staging environment.\n- Host Extensions must not grant remote actors additional privileges.\n- Unsupported status is a support classification, not a sandbox or security boundary.\n\n## 9. Acceptance criteria\n\n- A user can install a local `.pkg.tar.zst` without mutating the live `/usr`.\n- A new local OSTree deployment is created.\n- The system reports `unsupported`.\n- Local package inputs survive OS update and rollback.\n- On upstream update, Archipelago attempts atomic best-effort reapplication.\n- If reapplication fails, the supported upstream image remains deployable and the prior deployment is preserved.\n- The user receives actionable diagnostics and an explicit deployment choice.\n\n## 10. Open questions\n\nSee [`../spec/open-questions.md`](../spec/open-questions.md).\n",
"sha256": "e7d9bcf93923448a444d132c139a24ad189ea9d41974b7d9da345187c87d96b1",
"decisions": [
"D-017",
"D-023",
"D-031",
"D-037",
"D-038",
"D-046",
"D-056",
"D-057",
"D-061",
"D-088",
"D-090",
"D-093"
]
},
{
"id": "RFC-0005",
"title": "Package Hooks and Composition Finalization",
"status": "Accepted",
"status_detail": "Accepted — architectural contract under D-061; explicit implementation questions remain open",
"date": "2026-11-04",
"version": "0.0",
"scope": "Baseline hook classification, generated artifacts and execution lifecycle",
"path": "rfc/RFC-0005-hooks-and-finalization.md",
"markdown": "# RFC-0005: Package Hooks and Composition Finalization\n\n- **Status:** Accepted — architectural contract under D-061; explicit implementation questions remain open\n- **Accepted:** 2026-11-04\n- **Version:** 0.0\n- **Date:** 2026-11-03\n- **Scope:** Baseline hook classification, generated artifacts and execution lifecycle\n\n## 1. Contract and decision boundary\n\nD-027 accepts the principle: package installation and package scripts execute in\nisolated layer builds; system-wide generated artifacts are regenerated against the\ncomplete composition; required failures prevent publication. Runtime initialization\nis a separate lifecycle. D-058 additionally accepts classification of every package\nhook/scriptlet action, blocking publication on unknown actions, explicit replacements\nor lifecycle mappings for deferred actions, final-composition aggregate generation,\nnetwork-free finalization with locked inputs and explicit ordering, and publication\nfailure on any required action failure even when pacman succeeds.\n\nD-059 accepts final-composition generation of aggregate schema, MIME, icon and\nlibrary caches, vendor hwdb, selected distribution locales and distribution trust\noutputs. Mutable font caches, machine account/directory provisioning, machine-id\nand SSH host keys belong to the installed target lifecycle. Services start in the\ntarget deployment; initial defaults are declared and administrator enablement choices\nare preserved across updates. Machine-local trust, hwdb and linker configuration\nchanges require corresponding cache regeneration integration.\n\nD-061 accepts this architectural baseline as part of RFC v0. Exact finalizer schemas,\nadapter contracts and explicitly open integration choices remain unfrozen.\nSnapshot-specific adapters, command lines and paths must be specified and verified\nbefore implementing the selected features; package approval is not runtime evidence.\n\nThis contract orchestrates existing Arch tools. OSTree stores the resulting trees\nand manages deployments; it does not execute or resolve package hooks. No claim of\nidentical behavior to Fedora's implementation is required by this contract.\n\n## 2. Execution phases\n\n| Phase | Input and responsibility | Permitted result |\n|---|---|---|\n| 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 |\n| Composition finalization | Complete selected package payloads, overrides, coherent package metadata and target profile | Composition-owned caches, indexes, module metadata and initramfs |\n| Deployment preparation | Validated image and explicit target installation context | OSTree configuration integration and boot artifacts installed through the selected boot backend |\n| Runtime initialization | Booted deployment and persistent machine state | System accounts, mutable directories, runtime caches and normal service lifecycle |\n\nComposition finalization also applies to local Host Extension compositions. Local\npackage installation remains an isolated transaction under RFC-0004; an upstream\nimage's derived artifacts must be regenerated when affected by those packages.\n\n## 3. Package scripts versus ALPM hooks\n\nPackage `.INSTALL` scriptlets and ALPM `.hook` files are distinct mechanisms.\nDisabling an ALPM hook does not disable an equivalent action embedded in a scriptlet.\n\nBefore a managed layer is published, inventory scripts and hooks from its pinned\npackages. Classify every executable action as build-local, replaced by a finalizer,\ndeferred to deployment/runtime, or explicitly inapplicable with a recorded reason.\nAn unclassified executable hook/script blocks publication until its effects are\nunderstood. This is a compatibility requirement, not a new package manager.\n\nDuring actual package transactions retain libalpm trigger semantics, including\nPreTransaction/PostTransaction, Depends, NeedsTargets and filename ordering.\nUse documented hook overrides to suppress actions moved out of layer build;\nrecord the original hook identity/checksum and its replacement. Do not silently\ndisable all hooks or treat a successful pacman exit as proof that every hook passed.\nALPM AbortOnFail applies only to PreTransaction hooks; Archipelago must also capture\nrequired PostTransaction failures and reject the build.\n\nScriptlets execute only in isolated staging. If a scriptlet embeds a deferred or\nforbidden action, use a reviewed package adaptation or execution adapter with\nexplicitly defined semantics. Do not assume a generic no-op wrapper is sufficient.\nDo not replay all install/upgrade scriptlets over an assembled composition: it is\nnot a pacman transaction, and scripts may have non-idempotent side effects.\n\n## 4. Baseline action matrix\n\nCommands below identify tools, not frozen command lines or hook filenames. Exact\nadapters and their source hook mappings must be checked against the pinned snapshot.\nAn action is required whenever its declared inputs/feature are selected; absence\nof the feature is a recorded not-applicable result, not an ignored failure.\n\n| Action family | Layer build | Final composition / later phase | Output and validation |\n|---|---|---|---|\n| 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 |\n| `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 |\n| `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 |\n| `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 |\n| 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 |\n| GIO modules (`gio-querymodules`) | Preserve module payloads | Generate module cache for each selected ABI/directory | `giomodule.cache`; require target-compatible execution |\n| 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 |\n| Desktop entries (`update-desktop-database`) | Preserve `.desktop` sources | Regenerate the aggregate application MIME cache | `mimeinfo.cache` from final desktop entries |\n| 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 |\n| Icon themes (`gtk-update-icon-cache`) | Preserve theme files | Regenerate caches for applicable themes | Theme caches must reflect final icon contents, including removals |\n| 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 |\n| 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 |\n| 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 |\n| `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 |\n| `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 |\n| `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 |\n| 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 |\n| `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 |\n| `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 |\n| 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 |\n| `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 |\n\nBuild-only utilities and their dependencies must not accidentally enter the final\nimage. All adapters run with tools compatible with the pinned target snapshot and\narchitecture; cross-architecture execution support is a separate builder capability.\n\n## 5. Generated output and ordering contract\n\n1. Resolve the common snapshot, exact layer commits, package ownership and explicit\n replacements; validate package dependencies and filesystem conflicts.\n2. Assemble final payloads. Classify and exclude intermediate aggregate outputs\n from layer builds by explicit generator output declarations, not broad deletion.\n3. Establish coherent package metadata and validate account/file ownership inputs.\n4. Run selected finalizers in a deterministic dependency graph. Library setup must\n precede consumers; final signed module payloads precede `depmod`; `depmod`, final\n firmware and initramfs configuration precede `mkinitcpio`.\n5. Validate generated outputs and filesystem policy, then create/sign/publish the\n image. No finalizer mutates an input commit or an already published image.\n\nFinalizers declare stable IDs, tool identity, input selectors, output paths,\nprerequisite IDs, execution phase, required condition, timeout and network policy.\nCycles, undeclared overlapping outputs and missing required tools are errors.\nBaseline finalization uses no network; all required inputs are resolved beforehand.\nWithin otherwise unordered actions use stable action-ID ordering. ALPM filename\nordering applies to real ALPM transactions, not to this separate finalization graph.\n\nBaseline correctness regenerates every applicable aggregate from the complete\ncomposition, including removals, rather than pretending a layer merge is a pacman\nupgrade transaction. Incremental skipping is a future optimization requiring\ncomplete input fingerprints and equivalent output validation.\n\nGenerated outputs have composition-generator provenance, distinct from effective\npackage ownership. If an output replaces a package-provided cache, declare that\nrelationship and preserve truthful package database records. The exact database\nrepresentation is part of the still-open package metadata contract.\n\nThe output contract must describe `/etc` and `/var` caches explicitly; generating\na file in staging alone does not establish correct OSTree configuration merging or\nruntime cache invalidation. Features with unresolved required output placement\ncannot claim implementation readiness.\n\n## 6. Isolation, failure and boot boundaries\n\nExecute against a disposable writable staging root, without writable hardlink\naliasing to shared OSTree objects. A root-directory option or chroot alone is not\nthe isolation boundary. Do not expose the host service manager, live ESP or writable\nhost state. Finalizers may write only their declared outputs and temporary workspace.\n\nRecord action inputs, tool versions, commands, exit status, logs and output hashes.\nRequired failure, timeout, missing output or failed validation prevents publication\nand activation. Preserve the previous deployment. In the Host Extension workflow,\napply the RFC-0004 fallback policy instead of publishing a broken local image.\n\nUse an explicit target kernel, never `uname -r`. Generic release initramfs must not\ndepend on the builder's devices, `/proc/cmdline`, credentials or disk identifiers.\nHardware autodetection requires a separate explicitly host-specific deployment\nprofile. Distinguish ALPM hooks, mkinitcpio build hooks, initramfs runtime hooks and\nmkinitcpio post hooks. Post hooks must also be classified: implicit signing or ESP\ninstallation is not allowed outside the selected artifact/deployment policy.\n\nRuntime initialization must be retryable and preserve existing machine state.\nUnder D-048, Purpose services, service-start scripts and layer runtime checks are\nmanifest-declared and run after deployment in the appropriate target lifecycle.\nBooted-target service activation is distinct from offline deployment preparation.\nBuild checks/finalizers still execute before publication under D-027. D-047 defines\nrequired boot checks and prohibits automatic reboot; see RFC-0007 §6.2.\nDropping a layer does not authorize deleting its users or persistent application\ndata. Persistent-state migrations require their own forward/rollback contract.\n\n## 7. Acceptance criteria\n\n- Two independently built layers contributing schemas, desktop entries or modules\n produce aggregate outputs covering both after composition.\n- Removing a contributor removes stale entries from regenerated image-owned caches.\n- Package hooks cannot start host services or modify host `/boot`, ESP or `/var`.\n- A required PostTransaction hook failure blocks layer publication even if pacman\n otherwise completes; a finalizer failure blocks image publication.\n- Kernel artifacts use the selected image kernel rather than the build-host kernel.\n- Unknown executable hooks require classification; all deferred hooks have an\n explicit replacement or lifecycle mapping.\n- Generated ownership and package metadata remain coherent after an overlay override.\n- Input commits and repository objects remain unchanged by finalizer writes.\n- Repeated finalization has equivalent semantic output; nondeterminism is reported.\n- Boot tests verify runtime account/directory setup and preservation of machine\n configuration and data across update and rollback.\n\n## 8. Remaining implementation contracts\n\nD-028 and D-029 now define the accepted account lifecycle and deletion policy in\n[RFC-0006](RFC-0006-system-accounts.md). Use standard Arch/systemd provisioning,\npreserve existing IDs and reconcile on every boot; system/service account deletion\nis prohibited in Archipelago workflows. A custom global UID/GID registry is not\nselected. D-032/D-036 select native deployment-local account state and the\nsingle-user MVP scope; universal account synchronization is not required.\nInitial provisioning, non-root payload ownership and recovery details remain open.\n\n- Snapshot-specific hook inventory, scriptlet adaptations and adapter command lines.\n- Package index and coherent pacman database assembly before finalization.\n- OSTree `/etc` defaults, linker/trust caches and local override reconciliation.\n- Stable UID/GID assignment across independent builds and persistent host accounts.\n- Boot artifact layout, initramfs hook set, signing and installer integration.\n- Manifest schema for generators, generated file ownership and runtime initialization.\n\nSee also [open questions](../spec/open-questions.md).\n\n## 9. References\n\nThese describe tool behavior, not a pinned Archipelago package snapshot:\n\n- [ALPM hooks](https://man.archlinux.org/man/alpm-hooks.5.en)\n- [mkinitcpio](https://man.archlinux.org/man/mkinitcpio.8.en)\n- [systemd-sysusers](https://man.archlinux.org/man/systemd-sysusers.8.en)\n- [systemd-tmpfiles](https://man.archlinux.org/man/systemd-tmpfiles.8.en)\n",
"sha256": "fd47b5f727ba2dcb3ba59fca26f030d85c475200fd6fa687b909f80e4971a278",
"decisions": [
"D-027",
"D-028",
"D-029",
"D-032",
"D-036",
"D-047",
"D-048",
"D-058",
"D-059",
"D-061"
]
},
{
"id": "RFC-0006",
"title": "System Account Provisioning and Reconciliation",
"status": "Accepted",
"status_detail": "Accepted — architectural contract under D-061; explicit implementation questions remain open",
"date": "2026-11-04",
"version": "0.0",
"scope": "Layer account declarations, machine identity persistence and account lifecycle",
"path": "rfc/RFC-0006-system-accounts.md",
"markdown": "# RFC-0006: System Account Provisioning and Reconciliation\n\n- **Status:** Accepted — architectural contract under D-061; explicit implementation questions remain open\n- **Accepted:** 2026-11-04\n- **Version:** 0.0\n- **Date:** 2026-11-03\n- **Scope:** Layer account declarations, machine identity persistence and account lifecycle\n\n## 1. Accepted baseline\n\nUse Arch Linux package declarations and standard systemd mechanisms for system\naccount provisioning. Do not introduce an alternative user database, relocate the\nstandard account files or impose a global Archipelago UID/GID allocation scheme.\nPreserve explicit upstream assignments and dynamic allocation semantics.\n\nLayers supply declarations, while the installed machine owns account state:\n\n- `/usr/lib/sysusers.d/*.conf`: system users, groups and membership declarations.\n- `/usr/lib/tmpfiles.d/*.conf`: directory creation, permissions and ownership.\n- Service units: `User=`, `Group=`, `StateDirectory=` and related standard settings.\n- `/etc/passwd`, `/etc/group`, `/etc/shadow`, `/etc/gshadow`: machine account state.\n\nAccount databases generated in independent layer build environments must not be\nmerged into the machine account database. Temporary build accounts are not an\nauthoritative source of installed-host identity.\n\nImmutable payload ownership must be validated. Root ownership is an expected\ncommon case, not an assertion that every upstream package contains only root-owned\nfiles. Non-root ownership requires a resolvable target identity; dynamically\nallocated staging IDs must not silently become unrelated host identities.\n\n## 2. Boot and update lifecycle\n\nReconcile on the first boot and on each subsequent boot, including booting an\nupdated or rolled-back deployment:\n\n1. Make the target deployment's effective configuration and preserved account\n state available.\n2. Run standard `systemd-sysusers` provisioning for missing system accounts and\n groups, preserving existing identity and UID/GID assignments.\n3. Prepare mutable directories through the appropriate tmpfiles/service lifecycle.\n4. Start dependent services after their required provisioning succeeds.\n\nUse standard systemd ordering and dependency mechanisms. Do not create a second\nimplementation of sysusers or duplicate `StateDirectory=` handling with generated\ntmpfiles rules when the unit already manages the directory.\n\nReconciliation is additive, not an exact-state deletion loop:\n\n| Change | Required behavior |\n|---|---|\n| New account/group declaration | Provision if absent using standard sysusers semantics |\n| Existing system identity | Preserve its UID/GID and existing machine state |\n| Group membership declaration | Apply standard sysusers semantics; do not invent wholesale membership replacement |\n| Layer or declaration removed | Retain the account/group and persistent data |\n| Conflicting requested identity or UID/GID | Diagnose; do not silently renumber an existing account |\n| Ownership migration required | Use an explicit migration contract, not implicit recursive chown |\n\nRespect standard configuration precedence, including administrator overrides.\nValidate the effective declarations, not a concatenation of every configuration\nfile. Composition validation must identify conflicting account declarations and\nexplicit UID/GID allocations. Runtime validation additionally considers existing\nmachine accounts that were unavailable to the image builder.\n\nProvisioning must be retryable. Failures must be visible and must prevent dependent\nservices from running with an unresolved or incorrect identity. They must not\ntrigger account deletion or overwrite unrelated account state.\n\n## 3. Account deletion policy\n\nArchipelago-managed account deletion is permitted only for human/user accounts,\non explicit user request. Service and system accounts must not be deleted through\nArchipelago account-management, update, rollback, rebase, purpose-switch or cleanup\nworkflows. This includes accounts whose originating layer has been removed.\n\nDo not provide a force-delete exception for system/service accounts. Retain their\nidentity assignments and system groups; neither a missing declaration nor an\napparently unused account authorizes deletion or identity recycling.\n\nD-060 clarifies that this prohibition concerns persistent system/service account\nrecords. Standard systemd `DynamicUser=` allocation and release are normal service\nlifecycle, not Archipelago deletion of persistent accounts. Preserve that upstream\nbehavior without implementing a custom transient-identity lifecycle. This does not\nauthorize deletion of persistent account records or application data. Ambiguous\nhuman-versus-system identities remain ineligible for Archipelago account deletion.\n\nDeleting a human account does not implicitly authorize deletion of its home,\nother persistent data or shared groups. Data cleanup requires separate explicit\nintent and must not affect system/service identities.\n\nThe distinction between human and service/system accounts needs a precise\nclassification contract. A UID threshold alone is insufficient: upstream or\nadministrator-created service accounts may not fit a single numeric range.\nAmbiguous identities must not be treated as eligible for deletion. The concrete\nclassification and provenance format remain open.\n\nThis policy defines supported Archipelago operations. It does not claim that a\nprivileged administrator is technically unable to modify Linux account files\ndirectly; enforcing such a restriction through a replacement account subsystem\nis not part of this contract.\n\n## 4. Deployment transitions and persistent identity\n\nThe initial proposal required all system identities to survive every deployment\ntransition. D-032 refines that requirement: adopt native OSTree per-deployment\nconfiguration semantics without assuming a global identity synchronization layer.\nAccount provisioning preserves identities present in the effective configuration;\nit cannot recover records absent from an older deployment's `/etc`.\n\nThe initial UX targets a generic single-user PC (D-036). Provision the primary\nhuman user in the initial deployment as part of installation/onboarding, before\ncreating subsequent normal rollback targets. Normal forward configuration\ninheritance preserves that account. This is a provisioning and workflow contract,\nnot a guarantee that arbitrary historical deployments contain every current user.\n\nAn additional user created after an older deployment was prepared may be absent\nwhen that deployment is booted. This is an accepted MVP edge case, not a requirement\nfor global account synchronization. Shared `/var/home` retains the user's data.\nManual recovery recreates the account with its original UID/GID and existing home;\nit must not replace the home or reassign it to a different identity. Credentials\nand supplementary group membership may also need to be restored or reset. Check\nfor conflicting UID/GID assignments before recreating an account.\n\nChanged credentials and explicit human-account deletions likewise do not\nautomatically propagate to older deployments under native OSTree semantics.\n\nThe implementation must explicitly document account behavior when preparing or\nselecting deployments. Distinguish a new deployment of an older commit with current\nconfiguration from directly booting a previously prepared deployment. Validate\nprimary-user continuity and document the accepted later-account recovery scenario;\ndo not promise stronger guarantees than the default merge provides. See RFC-0007 §5.\n\nStandard account paths remain in `/etc`. No choice of additional identity ledger,\nstorage relocation or reconciliation implementation is made here. Any required\nArchipelago metadata must be minimal and justified by deployment continuity or\nclassification requirements, rather than replacing upstream account management.\n\nD-036 removes universal latest-account/credential continuity as an MVP blocker.\nExact initial provisioning, recovery instructions and interrupted-transition tests\nremain to be specified within the native OSTree model.\n\n### 4.1 Deferred first-run provisioning (D-064)\n\nInstallation may defer primary-user creation to onboarding in the first booted\ndeployment. Complete it before preparing subsequent normal rollback targets (D-036).\nCore provides a terminal CLI setup flow; GNOME/KDE Purpose variants should reuse\nnative initial-setup tools where feasible. A new-user wizard runs before the first\nordinary user login; later per-user welcome/customization is a distinct lifecycle.\n\nUse standard account mechanisms and deployment-local `/etc`. GUI and CLI integration\nmust preserve existing identities and allow interrupted provisioning to be retried.\nAdding a desktop Purpose to an already provisioned Core must preserve its primary user.\nExact frontend selection, completion evidence, resume protocol, setup-session privileges\nand systemd ordering remain implementation contracts. A shared `/var` completion flag\nalone cannot prove that the booted deployment's `/etc` contains the expected account.\n\n## 5. Acceptance criteria\n\n- First boot creates declared service identities before dependent services start.\n- Repeated boots preserve assigned IDs and existing persistent data ownership.\n- An update adding a service account provisions it without renumbering existing accounts.\n- Removing a layer or reverting Purpose retains its system accounts and groups.\n- Archipelago rejects deletion of service/system accounts, including orphaned ones.\n- Standard `DynamicUser=` services allocate and release transient identities through\n systemd without Archipelago deleting persistent system-account records (D-060).\n- Explicit deletion of a human account does not implicitly delete its data.\n- Conflicting declarations/assignments are diagnosed without silent renumbering.\n- Independent build account databases do not become merged host account state.\n- Update and both rollback paths are tested for account visibility, human login,\n credentials and shared-data ownership against the explicitly chosen transition\n policy; unconditional identity continuity is not assumed after D-032.\n- Interrupted provisioning can be retried without duplicate identities or data loss.\n- Deferred first-run onboarding creates a usable primary user before subsequent\n deployments; completed setup is not repeated on ordinary reboot or Purpose addition.\n\n## 6. Open implementation questions\n\n- Classification and provenance of human versus persistent service/system accounts,\n including pre-existing and administrator-created accounts; D-060 preserves the\n standard lifecycle of transient `DynamicUser=` identities.\n- Preservation of account state and credentials across OSTree deployment transitions.\n- Validation and reporting of conflicts between image declarations and local state.\n- Explicit migration procedures when upstream changes account names or fixed IDs.\n- Exact systemd dependency integration and recovery diagnostics.\n\nSee [open questions](../spec/open-questions.md) and\n[RFC-0005](RFC-0005-hooks-and-finalization.md).\n",
"sha256": "9c9cbcd806a740afb4147bc383505dd09d6a91adc8afea8dbefdacff6b2b711c",
"decisions": [
"D-032",
"D-036",
"D-060",
"D-061",
"D-064"
]
},
{
"id": "RFC-0007",
"title": "OSTree Platform and Arch Package Integration",
"status": "Accepted",
"status_detail": "Accepted — architectural contract under D-061; explicit implementation questions remain open",
"date": "2026-11-04",
"version": "0.0",
"scope": "Filesystem layout, package database lifecycle, boot and deployment baseline",
"path": "rfc/RFC-0007-ostree-platform-integration.md",
"markdown": "# RFC-0007: OSTree Platform and Arch Package Integration\n\n- **Status:** Accepted — architectural contract under D-061; explicit implementation questions remain open\n- **Accepted:** 2026-11-04\n- **Version:** 0.0\n- **Date:** 2026-11-03\n- **Scope:** Filesystem layout, package database lifecycle, boot and deployment baseline\n\n## 1. Standard platform baseline\n\nUse the OSTree package supplied by Arch Linux, pinned as part of the common package\nsnapshot (D-023), rather than independently tracking an upstream development build.\nAt review time, Arch Extra x86_64 supplies `ostree 2026.6-1`. This observation is not\na permanent version freeze: subsequent snapshot updates select their Arch version.\nRecord package version/checksum and validate required build features.\n\nUse native OSTree objects, tree union primitives, transport, deployments and\nconfiguration handling. Archipelago adds package semantics and lifecycle policy.\nAccepting upstream mechanisms does not mean enabling every optional feature.\ncomposefs, runtime integrity modes and signing policy still require explicit choices.\n\n## 2. Filesystem layout\n\nAdopt the Silverblue-style persistent-data layout with one `archipelago` stateroot\nacross Purpose changes and normal rebases:\n\n| Runtime path | Persistent backing |\n|---|---|\n| `/home` | `/var/home` |\n| `/root` | `/var/roothome` |\n| `/srv` | `/var/srv` |\n| `/opt` | `/var/opt` |\n| `/usr/local` | `/var/usrlocal` |\n| `/mnt` | `/var/mnt` |\n\nExpose these paths via symlinks. A separate home filesystem is mounted at\n`/var/home`. Provision required target directories through standard systemd\nmechanisms. `/usr` remains image-owned; `/var` is shared within the stateroot.\n\n“Persistent data in `/var`” does not relocate machine configuration: `/etc` remains\nthe standard per-deployment writable configuration, with image defaults in\n`/usr/etc` and native OSTree merge behavior. `/run` and `/tmp` remain temporary;\nthe exact `/tmp` backing/mount profile is not frozen by this decision. `/boot`, ESP,\nphysical `/sysroot` and repository storage retain their OSTree-specific roles.\n\nSelecting `/opt -> /var/opt` does not make package payloads there image-updatable.\nPackages that install binaries under `/opt` need an explicit adaptation policy;\ncopying them to persistent storage once cannot meet managed update/rollback\nsemantics. The symlink decision is accepted; such package handling is still open.\n\n## 3. Installed package database and host-facing pacman\n\nKeep the authoritative installed-package database in each image at a non-default\nlocation, preserving the pacman/libalpm database format. Ordinary live-host pacman\nmutation is disabled; supported host package operations go through Archipelago.\nStandard pacman remains available in controlled build/staging environments.\n\nThe exact disabling mechanism is open: moving the database alone is not a way to\ndisable pacman. Do not falsify package ownership or silently remove a package-owned\nbinary. Decide explicit packaging/entrypoint behavior and read-only inspection UX.\n\nProposed paths, not frozen interfaces:\n\n```text\n/usr/lib/archipelago/package-db/ # immutable image database\n/var/lib/archipelago/host-extensions/generations/<id>/ # persistent local history\n package-db/ # base + extension result\n inputs/ # lock and package references\n result/ # base/result commit identities\n```\n\nSeparate authoritative installed-package state from repository sync metadata,\ndownload caches and logs. Every resulting local image must retain database state\nmatching its own payload, regardless of later changes to the persistent workspace.\n\n### 3.1 Documented pacman controls\n\nUse explicit configuration and command-line arguments:\n\n- `--dbpath` / `-b`, or `DBPath` in pacman.conf: database location.\n- `--config`: explicit configuration file.\n- `--root` / `RootDir`: installation root; explicitly supplied database/cache/log\n paths are not automatically prefixed by this root.\n- `--sysroot`: mounted guest root semantics, including prefixing configuration\n directories. This differs from `--root` and must be tested in the chosen adapter.\n- `--cachedir`, `--hookdir`, `--gpgdir`, `--logfile`: explicit auxiliary paths.\n\nThe reviewed pacman manuals do not document a generic database-location environment\nvariable. Do not invent or rely on `PACMAN_DBPATH` or similar variables. Root/path\nselection is not a sandbox: transactions still execute inside an isolated environment.\n\n## 4. Persistent Host Extension database\n\nThe accepted intent is to retain a writable copy of the base package database in\npersistent storage, record changes from host-scope package installation there, and\nretain it as input/history for local composition. The resulting database describes\nthe full base plus extensions, not only the locally added packages.\n\nThe following generation lifecycle is accepted by D-037:\n\n1. Identify the exact base image commit, database identity and package snapshot.\n2. Create an isolated staging root and a working database copy corresponding to it.\n3. Apply the declared Host Extension package set through pacman/libalpm; capture\n dependency resolution, package inputs and modified database.\n4. Finalize/validate the tree and commit its matching installed-package database.\n5. Retain the local generation in `/var` with its base/result identities and inputs.\n6. On a different base, start from that new base's database and reapply the declared\n extension set. Do not patch an unrelated old installed-package database in place.\n\nPeriodic maintenance, especially during major updates, can refresh caches or prune\nexplicitly eligible history. It cannot be the only correctness trigger: every base\ntransition must verify database/payload identity before reusing a working copy.\nReuse is possible when compatibility and equivalence are established; a stale copy\nmust never silently describe a newer filesystem. This reconciles the proposed local\ndatabase lifecycle with RFC-0004's already accepted best-effort update policy.\n\nPrevious generation records remain available on failure and rollback. The current\nbooted image, pending image and writable workspace are distinct states, not one\nglobal mutable database.\n\nD-037 extends the initial local-file interface: users may request package names\nfrom the base's pinned repositories or supply local package files retained by\nchecksum. Keep explicit requests separate from resolved dependencies. On base\nupdates, named requests resolve against the new snapshot and local file inputs are\nrevalidated. Resolve dependencies from the base snapshot, not live/latest Arch.\nRemoving an extension recomposes from the base and remaining intent while preserving\npersistent data. D-038 accepts explicit whole-package replacement intent, separate\nfrom additions; detailed request schema remains open. See RFC-0004 §4.\n\n## 5. Account behavior and rollback\n\nAccept native OSTree per-deployment `/etc` semantics. This refines D-028: no custom\nglobal account synchronization is assumed merely to preserve every service identity\nin every historical deployment. The prohibition on Archipelago deleting service\naccounts remains an account-management policy (D-029).\n\nD-036 scopes the initial UX to a generic single-user PC. The primary user is\nprovisioned in the initial deployment and inherited through normal forward\nconfiguration handling. Rolling back to a deployment predating an additional user\nmay omit that account; this is an accepted edge case with manual recovery using\nthe original UID/GID and retained home. Shared `/var/home` preserves data, not\nnecessarily current credentials or supplementary group membership.\n\nUniversal synchronization of current accounts into all old deployments is not an\nMVP requirement. Distinguish creating a new deployment from an older commit with\ncurrent configuration from booting an existing old deployment. Test initial-user\ncontinuity and document later-user recovery under these native semantics.\n\n## 6. Boot and activation\n\nD-065 selects an experimental x86_64 UEFI VM installation profile with GPT,\nFAT32 ESP and ext4 root, systemd-boot, no encryption or Secure Boot. A separate\n`/boot` may be added if required by integration. Validate the complete live-ISO\ninstallation and disk boot before claiming this profile works; the experimental\nchoice does not freeze all partition/artifact contracts or satisfy public release gates.\n\nThe initial bootloader is systemd-boot (UEFI). GRUB 2 is not a required initial\nbackend. Native OSTree deployment and BLS mechanisms should be reused, with actual\nsystemd-boot boot-entry discovery/selection tested rather than assumed.\n\nArch's current OSTree package already supplies:\n\n- `/usr/lib/initcpio/install/ostree`\n- `/etc/ostree-mkinitcpio.conf`\n- `ostree-prepare-root` and its systemd unit\n\nStart by reviewing and testing this packaged integration. Do not write a duplicate\nmkinitcpio hook based solely on upstream documentation emphasizing dracut.\n\nProposed image artifact locations follow OSTree recommendations:\n`/usr/lib/modules/<kver>/vmlinuz` and\n`/usr/lib/modules/<kver>/initramfs.img`. Exact initramfs configuration, ESP/XBOOTLDR\nlayout, systemd-boot installation/update and Secure Boot remain open.\n\nUse staged deployments as the normal update path with explicit retention policy.\nD-046 defines the retention baseline below. Pin/unpin UX and shutdown-finalization\nfailure reporting remain to be specified. D-049 excludes health-check-triggered\nautomatic rollback: provide diagnostics and an explicit user command instead.\nPersistent-data schema migrations remain separate from OS rollback.\n\nD-077 requires every successful deployment-creating operation to automatically\nselect the new deployment as the next-boot default, including installation,\nupdate/rebase, Purpose changes, Managed Overlays and Host Extensions. No additional\nactivation command is required. For staged deployments, native successful\nfinalization materializes the boot entry; preparation does not reboot or change\nthe running root. Failure preserves the previous boot selection. Explicit rollback\nselects its requested previous deployment; D-049 still forbids health-check-driven\nautomatic rollback. Merely building an image/layer commit does not select a boot\nentry. Verify the actual systemd-boot choice, including stale saved/one-shot\noverrides, rather than assuming OSTree deployment order is sufficient.\n\n### 6.1 Deployment retention and cleanup (D-046)\n\nPreserve at least:\n\n- The currently booted deployment.\n- The previous deployment selected for rollback, when one exists.\n- A prepared pending deployment, when one exists.\n- Every explicitly pinned deployment, using native OSTree pinning.\n\nThese are protected roles, not a requirement to manufacture historical deployments\non a fresh installation. Preparing an update must preserve the booted deployment\nand the existing rollback option. Older unpinned deployments become eligible for\nautomatic cleanup only after a successful transition, preserving the required set.\n\nA successful transition requires system readiness and completion of required\nArchipelago checks. Selecting a boot entry, reaching early boot or merely scheduling\nan update is not sufficient. D-047/D-048 define the lifecycle below; the exact\nmanifest schema and success-record persistence remain open.\nUntil success is established, do not retire the protected recovery deployment.\nThis cleanup gate does not itself select an automatic rollback mechanism.\n\nOn insufficient disk space, first reclaim eligible caches and old unpinned\ndeployments without violating these retention rules. If insufficient space remains,\nstop preparation with actionable diagnostics rather than deleting protected state\nor forcing activation. Cache eligibility must exclude retained Host Extension inputs.\n\nUser data, local Host Extension package files and their history are outside automatic\ndeployment cleanup and require a separate explicit cleanup request. Use native\nOSTree object collection after computing retained deployments and refs; keep roots\nneeded to preserve protected local generations and their recoverable image/database\nstate. Do not delete repository objects through an independent filesystem sweep.\n\n### 6.2 Manifest-driven runtime readiness (D-047/D-048)\n\nCore declares minimum required checks: the expected deployment is booted, required\nfilesystems are available and base initialization has completed. The concrete\nPurpose declares its additional service/readiness requirements. Do not infer global\nfailure from any optional service failure or an undeclared desktop assumption.\n\nD-051 defines the public-release integration suite in RFC-0003 §12.1: Core boot,\nlocal login, Host Extension installation and Managed Overlay application, plus\nPurpose service functionality in a clean environment. These release tests do not\nreplace inherited coverage: D-052 requires all Core gates to pass on the complete\nCore + Purpose candidate as well as the Purpose-specific service checks. They do not\ninstall test packages or apply fixture overlays on every end-user boot. Runtime\nreadiness checks observe the real target deployment's declared requirements.\nPurpose activation follows standard unit semantics; not every working service is\nnecessarily a continuously running process. User-corrupted data is outside the\nclean-environment guarantee without exempting distribution defects or authorizing\nautomatic data reset.\n\nPurpose services, scripts that start services and layer runtime checks must be\ndescribed in manifests. Execute them after deployment in the target lifecycle,\nusing systemd units with explicit ordering, bounded execution time and diagnostics.\nService activation and boot readiness checks belong to the target booted deployment;\npreparing a new deployment must not start its services on the old running system.\nOffline deployment preparation may install declared configuration but must not be\nconfused with runtime activation.\n\nRecord success against the specific deployment and current boot only after its\nrequired checks pass. An older success record must not substitute for checking a\nnew transition. Required failure preserves recovery state, exposes diagnostics and\nblocks cleanup that depends on successful activation.\n\nThere is no automatic reboot in MVP. Selecting the rollback deployment as the\ndefault for the next boot is separate from rebooting or changing the running root.\nD-049 requires an explicit user rollback command. Failed required checks must not\nchange the default boot entry, switch the running deployment or reboot. Report\nactionable diagnostics and recommend rollback with a command identifying the\navailable recovery target. The user makes the final decision. An explicit rollback\nselects the recovery deployment for the next boot through native OSTree mechanisms;\nit does not implicitly reboot. Exact CLI syntax remains to be specified.\n\nBuild validation and global artifact generation remain pre-publication operations\nunder D-027. The post-deployment rule applies to runtime activation and checks,\nnot to dependency/ABI/conflict validation or finalization needed to create a valid\nimage. Manifest declarations must distinguish these phases.\n\n## 7. What can be reused from Fedora Atomic\n\nReuse the architectural principles: isolated offline composition, a complete\ndeployable image, base plus explicit local changes, regenerated aggregates,\nimmutable per-image package metadata and standard mutable-state separation.\n\nDo not claim an identical implementation. rpm-ostree imports individual RPMs as\nOSTree commits and documents running post/posttrans scripts during composition.\nOur D-027 currently places package scripts in layer builds and uses explicit finalizers.\nCopying RPM script execution semantics verbatim would require reconsidering that\ndecision and adapting it to ALPM; it is not an automatic consequence of reusing\nFedora's principles. Core/Purpose/Managed Overlay categories remain Archipelago's model.\n\n## 8. Sources\n\n- [Fedora Silverblue technical information, documentation source](https://raw.githubusercontent.com/fedora-silverblue/silverblue-docs/master/modules/ROOT/pages/technical-information.adoc)\n- [Arch OSTree package](https://archlinux.org/packages/extra/x86_64/ostree/)\n- [Arch OSTree file list](https://archlinux.org/packages/extra/x86_64/ostree/files/)\n- [pacman manual](https://man.archlinux.org/man/pacman.8.en)\n- [pacman.conf manual](https://man.archlinux.org/man/pacman.conf.5.en)\n- [rpm-ostree architecture](https://coreos.github.io/rpm-ostree/architecture-core/)\n- [OSTree deployments](https://ostreedev.github.io/ostree/deployment/)\n- [OSTree `/var` handling](https://ostreedev.github.io/ostree/var/)\n",
"sha256": "e1c9dbee9bd5a978f8ca2930aaf0d710202e375ce8eab221f43e9eb083791e30",
"decisions": [
"D-023",
"D-027",
"D-028",
"D-029",
"D-036",
"D-037",
"D-038",
"D-046",
"D-047",
"D-048",
"D-049",
"D-051",
"D-052",
"D-061",
"D-065",
"D-077"
]
},
{
"id": "RFC-0008",
"title": "Manifest, Lock and Artifact Contracts",
"status": "Accepted",
"status_detail": "Accepted — D-066, 2026-11-04; scope and remaining details below",
"date": "2026-11-04",
"version": "0.1",
"scope": "Accepted manifest/lock/artifact semantics; no implementation or migration is implied",
"path": "rfc/RFC-0008-manifests-locks-and-artifacts.md",
"markdown": "# RFC-0008: Manifest, Lock and Artifact Contracts\n\n- **Status:** Accepted — D-066, 2026-11-04; scope and remaining details below\n- **Version:** 0.1\n- **Date:** 2026-11-04\n- **Scope:** Accepted manifest/lock/artifact semantics; no implementation or migration is implied\n- **Depends on:** RFC-0001–0007, D-023–D-026, D-038–D-044, D-058/D-059\n\n## 1. Goal and boundary\n\nSpecify interoperable inputs for independent layer builds, composition, registries,\nupdates and installation. Existing YAML examples and prototype on-disk files are\nnot this API. The `archipelago/v1` name is reserved by this contract, not released.\nD-066 accepts strict YAML/JSON intent manifests, separate LayerLock/CompositionLock,\nSHA-256 canonical JSON identities independent of transport, indexed per-package\npayload in layer commits, and effective ALPM records with retained originals and\nexplicit transformation provenance. Concrete schemas and adapters remain to be\nvalidated; RFC-0009–0011 are not approved by this decision.\nThe Layer YAML/JSON schema was subsequently frozen by D-070; see\n[normative schema and validation rules](../schemas/README.md). Composition/lock\nschemas and adapters still need implementation before a producer can claim support.\n\n## 2. Serialization and identity\n\nThe [Layer YAML freeze review](../spec/layer-yaml-freeze.md) records incremental\napproval of concrete schema blocks; the envelope/package, runtime, actions, files,\noverrides, compatibility, package-replacement and kernel-binding blocks were\nagreed on 2026-11-04. The final validation block and complete Layer v1 freeze were\napproved the same day (D-070); the review records all agreed sections.\n\n- Source manifests: UTF-8 YAML 1.2 JSON-compatible subset, or JSON. Reject duplicate\n keys, aliases/merge keys, custom tags, non-string map keys, floats, unknown fields\n and path traversal. Integers are limited to the interoperable JSON integer range.\n- Generated locks/descriptors/indexes: JSON. Canonical identity uses RFC 8785 JCS\n after explicit defaults below are expanded; object-key order is insignificant,\n array order remains significant. A default change requires a schema version change.\n- Common envelope: `apiVersion`, `kind`, `metadata`, `spec`. `metadata.name` is a\n logical ID (`[a-z0-9][a-z0-9._-]*` components separated by `/`, max 128 bytes);\n optional `metadata.version` is SemVer for authored layers, not an Arch package version.\n `Layer` requires that version; other kinds may omit it.\n- Content identity: `sha256:<64 lowercase hex>`. Native OSTree commit checksums stay\n bare 64-hex values in explicitly named `commit` fields. Do not interchange the two.\n- Artifact digest is external to the hashed document: no self-digest, signatures,\n download URLs, observed build times or job IDs inside its identity-bearing body.\n Deterministic provenance inputs belong inside; execution observations and signatures\n are separately bound attestations. URLs are transport bindings, never identities.\n- Arrays that represent sets (package names, required IDs) must be unique and sorted\n lexicographically in generated documents. Composition order, repository priority,\n argv and action order are ordered lists and must never be sorted implicitly.\n- Missing optional lists default to `[]`, optional maps to `{}`, Purpose to `null`.\n Required scalar fields have no implicit defaults. Explicit null is allowed only\n where specified. Unsupported versions are errors, not best-effort parsing.\n\n## 3. Layer manifest (`kind: Layer`)\n\n| `spec` field | Contract |\n|---|---|\n| `type` | Required: `core`, `purpose` or `overlay` |\n| `architecture` | Required single target architecture; initially `x86_64` |\n| `purpose` | Required `{role, variant}` only for Purpose; role `desktop/server/iot`; forbidden otherwise |\n| `packages.runtime` | Unique package requirement objects `{name, constraint?}`; Arch/libalpm version semantics |\n| `packages.build` | Build-only requirements; must not leak into runtime by incidental installation |\n| `packages.replacements` | `{target, replacement, expected_owner, reason}`; never inferred from pacman `replaces` |\n| `compatibility` | `core`/`purpose` allowed-ID lists, `requires`/`conflicts` overlay IDs, `before/after` IDs, optional exact `kernel` identity |\n| `files` | Source-tree file entries `{source, path, mode, owner, group}`; no shell interpolation or host-absolute source paths |\n| `overrides` | Explicit operations described below; no global overwrite permission |\n| `actions` | Declared build/finalize/deploy/runtime actions described below |\n| `runtime` | `sysusers`, `tmpfiles`, `units`, `presets`, `boot_checks`, `functional_checks` referencing packaged files/actions |\n\nPackage groups, unconstrained AUR URLs and implicit source builds are not package\nnames. Source-built packages have separate pinned recipes in the SourceSet and\nmust enter the selected snapshot before layer resolution. The layer source does\nnot pin a lower layer commit. A layer build resolves against an explicit snapshot;\nthe resulting layer artifact and LayerLock record that exact snapshot.\n`constraint` is one libalpm comparison (`=`, `>=`, `<=`, `>` or `<` followed by an\nArch version); absent means any version in the selected snapshot. Requirements from\ndifferent layers are intersected, not overwritten. Empty compatibility allowlists\nmean no additional ID restriction; missing required overlays still fail explicitly.\n\n`compatibility` is a constraint, not permission to select dependencies silently.\nAbsent exact kernel constraints mean “no kernel-bound payload”, not “any ABI is safe”.\nKernel-bound inputs identify package checksum, release, architecture and ABI digest.\nProviders/virtual package choices are resolved by libalpm and recorded in the lock.\nOptional dependencies are installed only when explicitly requested.\n\nCompatibility field applicability is strict: `core` is allowed on Purpose/Overlay,\n`purpose` only on Overlay, `requires`/`conflicts` on Purpose/Overlay, and\n`before`/`after` only on Overlay. Reject these fields on other types. Lists default\nto empty and reject duplicates. A nonempty Purpose allowlist requires a matching\npresent Purpose. Requirements/conflicts reference Overlay IDs; ordering constraints\napply to present overlays, with `requires` used separately to require presence.\nMissing dependencies, conflicts and cycles fail without silently changing order.\nCore/Purpose versions are not pinned here; CompositionLock binds exact commits.\n`compatibility.kernel` is optional and permits one exact binding per layer. When\npresent, all of `package.{name,version,architecture,archive_sha256}`, `release`, and\n`abi.{adapter,digest}` are required. Archive and ABI digests use `sha256:<64 lowercase\nhex>`. Release identifies the kernel's `/usr/lib/modules/` directory. A versioned\nABI adapter defines the hashed inputs; its code identity is locked. Validate these\nvalues against pinned artifacts; any package/architecture/release/ABI mismatch\nblocks composition. The concrete ABI algorithm still requires specification and\nvalidation before use; the example name `linux-module-abi/v1` is not an implemented\ncapability. Detected modules without a binding are errors. Core supplying the kernel\ndoes not thereby depend on a lower kernel. DKMS sources are distinct from prebuilt\nmodules: finalization binds their build to the selected kernel and validates results.\n\n`packages.replacements` defaults to empty, is allowed on Purpose/Overlay and is\nforbidden on Core. Each entry requires `target`, `replacement`, `expected_owner`\n(effective owning layer ID) and `reason`. The replacement must be explicitly listed\nin runtime requirements. A missing target or owner mismatch fails. Whole-package\nreplacement requires dependency, file-conflict and ABI validation of the complete\nresult; it is distinct from file overrides and never inferred from pacman `replaces`.\n\n### Files and overrides\n\n`path` is an absolute canonical runtime path; `/bin`, `/sbin`, `/lib`, `/lib64`\naliases are normalized using the locked Arch filesystem profile, before conflict\nchecks. Sources are regular files, explicit directories or symlink objects; symlink\ntargets are not traversed while applying operations. `mode` is an octal string.\n`owner/group` reference root or declared system identities; the lock records numeric\nownership and its resolution evidence. No new global UID/GID registry is introduced.\nUnresolved/dynamic ownership of immutable payload blocks the relevant feature.\n\nFile entry `type` defaults to `file` and permits `file/directory/symlink`. A file\nrequires `source`, a symlink requires literal `target`, a directory has neither.\nAll entries require `path`, `mode`, `owner`, `group`; conflicting source/target\nfields are invalid. Source bytes are part of SourceSet and are hashed in the lock.\n`files` defaults to an empty list. Sources are relative to the locked source tree;\nparent traversal and escape through symlinks are forbidden. Directory declarations\nnever imply recursive copying: each contributed object is explicit. Symlink mode\nis `\"0777\"` under Linux semantics and never changes target permissions. Declaring\na file does not itself authorize overwriting another owner's object.\n\nEach override contains `operation`, an explicit finite `paths` list,\n`expected_owner: {layer, package?}`, `reason`, and optional `expected_sha256`.\n`expected_sha256`, when present, is a map from a member of `paths` to its digest.\nThe list and reason are nonempty; layer is required. Package is required for package\nobjects and absent for layer-authored objects. Check ownership against the composition\nindex immediately before the operation; mismatches fail. `expected_sha256` uses\n`sha256:<64 lowercase hex>` over ordinary-file bytes only; reject directory/symlink\nentries. Overrides default to an empty list and share a format across Purpose and\nManaged Overlays.\nOperations: `replace-file`, `replace-symlink`, `set-metadata`, `change-type`,\n`delete-path`. Type changes/deletions enumerate affected children; no implicit\nrecursion, glob expansion or whole-package removal disguised as file deletion.\nPermissions and actual effects are retained independently in provenance.\nReplace/change-type operations reference matching new entries in `files`;\nset-metadata carries a `metadata` map; delete-path supplies no replacement content.\nThe metadata map is nonempty and permits only `mode`, `owner`, `group`; editing\nxattrs/ACLs/capabilities requires a separate schema extension. Overrides affect only\nthe new image, never delete persistent state or bypass `/etc`, boot and ESP contracts.\nRecord their effects in diff/provenance and effective package records.\n\n`/etc` entries become vendor defaults in `/usr/etc`; installed configuration uses\nnative OSTree merge. `/boot`/ESP entries must go through a locked boot adapter.\nPersistent and pseudo-filesystem payload is forbidden without a named, versioned\nadapter: `/var`, `/home`, `/root`, `/srv`, `/opt`, `/usr/local`, `/mnt`, `/run`,\n`/tmp`, `/dev`, `/proc`, `/sys`. Declarations of sysusers/tmpfiles are normal `/usr`\npayload. This proposal does not silently settle the still-open `/opt` adapter.\n\n### Actions\n\nAn action declares `id`, `phase`, `adapter`, `argv`, `inputs`, `outputs`, `after`,\n`timeout_seconds`, `required`, `network`. Phases are exactly the four RFC-0005 phases.\n`required` defaults true; timeout is an explicit positive integer and network is\nexplicitly `none` or `allowed`. Finalizers require `network: none`.\n`argv`, `inputs`, `outputs` and `after` default to empty lists; adapters validate\nresource types, allowed values and sufficient inputs. Shell programs are versioned source artifacts invoked by explicit\nargv, not interpolated YAML strings. Adapter digest, executable inputs and graph\norder are locked. Undeclared overlapping outputs, cycles or unclassified package\nhooks fail validation. ALPM hooks keep native trigger semantics; inventory maps\neach checksum/action to a phase or a justified inapplicable result.\nAction IDs are unique within a layer; `after` references local IDs. Composed\nidentity is the pair of layer ID and action ID. Cross-layer system ordering is\ndefined by the finalizer adapter DAG. Missing references and incompatible phases\nare errors. Phase selects execution context, not automatic invocation: workflows\nor runtime references determine when an action runs. Required failures block the\noperation; boot failures produce diagnostics without automatic rollback/reboot.\nOfficial profiles cannot downgrade essential checks to optional. Package actions\nare inventoried through PackageActionPolicy and need not be manually duplicated\nin the layer's actions list.\nThe minimum Core/KDE/GNOME closure and PackageActionPolicy are proposed in\n[RFC-0011](RFC-0011-package-actions-compatibility.md); locks bind that policy digest.\nPolicy scope uses a separately hashed package-resolution set, not a reverse\nreference to the enclosing lock, avoiding a content-identity cycle.\n\nRuntime `sysusers/tmpfiles/presets` are lists of packaged absolute `/usr` paths;\n`units` entries are `{name, activation}` with activation `enable`, `socket`, or\n`manual`. Socket activation names the socket unit. Defaults apply initially and\nrespect subsequent administrator changes. Conflicting unit declarations and presets\nare validation errors. There is no separate `display_manager` field: Purpose\ndeclares its DM unit and its activation adapter manages `display-manager.service`.\nA DM change requires an explicit plan accounting for administrator selection.\n\nChecks are action-ID lists with timeout and required/optional behavior. Boot checks\nrun in the installed target boot lifecycle. Functional checks run in isolated\nacceptance environments, never as routine user-boot mutations. Purpose inherits\nall Core checks and may add its own. Check execution context must preserve this\ndistinction even when an action exercises target runtime behavior.\n\nAn optional `provisioner` is a named, versioned adapter reference. Core supplies\nterminal firstboot on tty1/ttyS0; Purpose overrides the adapter when declared and\notherwise inherits Core's. Onboarding completes before subsequent normal deployments\nand is not repeated on updates. Secrets and machine-specific account databases\ncannot appear in the manifest. Runtime lists default to empty; official validation\nprofiles enforce mandatory declaration completeness.\n\n## 4. Composition manifest (`kind: Composition`)\n\nRequired fields: `architecture`, `snapshot`, `core`, `boot_profile`,\n`validation_profile`. Optional: `purpose: null`, ordered `overlays: []`,\n`installer_profiles: []`.\n\n- A selector is exactly one of `{ref: logical-ref}` or `{commit: checksum}`.\n Resolve authenticates the catalog and records the selected immutable artifact.\n- `snapshot` selects one immutable descriptor ID or one discovery ref. All selected\n layer artifacts must have that ID. Missing layers require an explicit build step,\n not a hidden build/download-from-latest during compose.\n- Exactly one Core, zero/one Purpose and the listed overlays. Resolve rejects wrong\n types, duplicates, missing requirements, cycles and invalid order without reordering.\n- Channel/publication is a release concern (RFC-0010), not a magic build input.\n Adding an arbitrary overlay does not establish official support.\n\n## 5. SourceSet, Snapshot and locks\n\n`SourceSet` records each repository's logical ID, exact Git commit, subdirectory and\nsource-tree digest, plus toolchain/recipe/adapter inputs. Public builds reject dirty\ntrees; private experiments may use an explicitly hashed local tree. No secrets are\nsource inputs. Git remotes and physical checkout paths are replaceable transport.\n\n`Snapshot` has `architecture`, ordered `repositories`, and a package catalog digest.\nEach repository records its ID, database digest/size, optional files DB digest,\npackage-index digest and signing-policy ID. Catalog entries include repository,\nname, Arch version, architecture, filename, size, archive SHA-256 and signature\nidentity. The snapshot ID is the digest of this canonical descriptor, including\nordered repository identities. Monthly labels are discovery aliases only.\n\nTwo lock kinds avoid a circular dependency between layer creation and composition:\n\n| Lock | Required exact inputs |\n|---|---|\n| `LayerLock` | Layer manifest digest, SourceSet digest, snapshot ID, architecture, complete runtime/build dependency resolutions and providers, archive identities, builder OCI digest, bootstrap/toolchain/adapters/action graph and deterministic build parameters |\n| `CompositionLock` | Composition manifest digest, snapshot ID, architecture, ordered layer descriptors/commits, effective package-owner plan, explicit replacements/overrides, boot/finalizer/validation inputs and installer profile identities |\n\nFor each package retain explicit-request versus dependency reason. Package IDs are\ndigests of `{name, version, architecture, archive_sha256}`. Package identities do not\nwaive snapshot equality. Lock verification checks the complete referenced graph,\nincluding packages, sources and adapters, rather than just filenames.\n\nOnly `resolve`/explicit update creates a changed lock. Build/compose requires a\nmatching manifest and lock and fails if any locked input is absent or inconsistent.\nChanging URLs with identical verified content does not require a new semantic lock.\n\n## 6. Layer artifact and package database\n\nProposed layer tree (ordinary OSTree objects, not a custom object store):\n\n```text\npayload/packages/<package-id>/root/... # indexed package contribution\npayload/files/root/... # layer-authored contribution\nmetadata/manifest.json\nmetadata/lock.json\nmetadata/packages.json\nmetadata/files.json\nmetadata/actions.json\nmetadata/provenance.json\n```\n\nSeparate package trees preserve original contributions when paths collide or a\nlayer-authored override replaces one. OSTree deduplicates identical objects.\n`packages.json` retains original ALPM records and archive identity, declared\nrequirements, package files and adapters applied during isolated layer build.\n`files.json` maps every payload object to source path, canonical target, type,\nhash/link target, mode, numeric ownership, xattrs/ACLs/capabilities and origin.\nUnindexed objects, escaping paths and missing indexed objects fail validation.\nGenerated shared caches are final-composition outputs, not authoritative package trees.\n\nComposition selects each package once from layer commits, assigns effective layer\nownership by D-025, applies overrides and builds one image tree. It never reruns\npacman installation to obtain managed layer payload. Original package ALPM metadata\nis retained as evidence. The image's ALPM local DB is assembled deterministically\nfrom selected package records and the effective tree, with explicit install reasons,\nruntime `/etc` paths and epoch mtimes for immutable OSTree files.\n\nEvery adjusted record must have a transformation record containing original and\neffective identities and its responsible layer/adapter. Package ownership and\neffective content ownership are distinct: a file override does not pretend the\noriginal archive supplied the new bytes. `archipelago verify --original-packages`\nreports these deviations; effective-tree verification checks declared results.\n`pacman -Q/-Qo/-Qkk`, backups, generated outputs and non-root ownership require\nintegration fixtures before this DB adapter is declared conformant.\n\nImage runtime metadata is a selected subset under `/usr/lib/archipelago/`; layer\n`metadata/` is never copied wholesale. An external Image descriptor binds commit,\nmanifest/lock/source/snapshot identities, effective ownership, finalizer results and\nrequired validation profile. Signatures/observed test runs are external attestations.\n\n## 7. Compatibility, alternatives and acceptance\n\nExisting illustrative `schema: archipelago.layer/v1` examples remain historical.\nExplicit import produces a draft manifest plus diagnostics; no silent reinterpretation.\nUnknown future fields/versions fail closed; compatible producer additions require\na documented version negotiation, not silently ignored semantics.\n\nAlternatives considered: YAML-only hashes (format-sensitive); one lock for all build\nstages (circular layer identities); flattened-only package payload (loses colliding\ncontributions); reinstalling packages during composition (violates D-026).\n\nImplementation acceptance requires examples for Core/Purpose/overlay, both lock stages, replacement\nand runtime declarations; canonicalization vectors; invalid-input matrix; same\nsnapshot with conflicting packages; dependency-owner reassignment on overlay removal;\nALPM/effective-tree fixtures; schema migration diagnostics. Implementation then must\npass them. Full reproducibility is a separate release gate, not implied by locks.\n\nThe effective/original ALPM-record model is accepted by D-066 and the Layer schema\nis frozen by D-070. The concrete DB adapter, canonical source identity details,\naccount/boot/cache adapters and remaining Composition/lock/artifact schemas still\nrequire review and validation. Follow-up questions remain open until acceptance.\n",
"sha256": "3d8bf35499063ca8a54eba32c33330bc0be0573af67be73d41f1691c00af09b0",
"decisions": [
"D-023",
"D-025",
"D-026",
"D-038",
"D-044",
"D-058",
"D-059",
"D-066",
"D-070"
]
},
{
"id": "RFC-0009",
"title": "Unified CLI and Operation Lifecycle",
"status": "Accepted",
"status_detail": "Accepted — D-067, 2026-11-04",
"date": "2026-11-04",
"version": "0.1",
"scope": "Complete command coverage and behavior; not a claim of implementation",
"path": "rfc/RFC-0009-cli-contract.md",
"markdown": "# RFC-0009: Unified CLI and Operation Lifecycle\n\n- **Status:** Accepted — D-067, 2026-11-04\n- **Version:** 0.1\n- **Date:** 2026-11-04\n- **Scope:** Complete command coverage and behavior; not a claim of implementation\n\n## 1. One binary, three contexts\n\nD-093 refines executable packaging: `archipelago` is the unified CLI and\n`archipelagod` the canonical system-service entrypoint sharing its Rust engine.\nAll installed-host management groups route through typed D-Bus contracts;\nHost Extensions, Managed Overlays and PackageKit adaptation are specified in\n[RFC-0013](RFC-0013-host-management-and-packagekit.md). Future host methods are\ncapability-gated until specified/implemented; no generic shell RPC or direct\nroot fallback. Local help/version/authoring and build/live/offline workflows retain\ntheir context-appropriate direct execution. Service routing does not imply remote builds.\n\nD-067 accepts the unified command coverage, checked plan/apply lifecycle, shared\nresults/errors and durable operation records, explicit desired/pending/booted state,\ncapability reporting and initial operation without a mandatory daemon (the latter\nis refined for installed systems by D-092/RFC-0012). Delivery is\nincremental. This decision does not approve the infrastructure or package-action\npolicies proposed separately in RFC-0010/D-068 and RFC-0011/D-069.\n\n`archipelago` is the Rust entrypoint for build host, installed system and live\ninstaller. Context is detected and reported, then checked per operation. An explicit\n`--sysroot` is supported only by commands with a documented offline target contract;\nit is not permission to run a live-host operation on an arbitrary directory.\nD-092 selects an on-demand system D-Bus service for installed-system control:\n[RFC-0012](RFC-0012-system-service-and-dbus.md). GUI and installed-system CLI share\nits transaction/authentication contract without sudo/pkexec. Build/live/offline\ncontexts retain direct execution and common locks. Existing tools remain backends.\n\n`archipelago capabilities --json` must report implemented commands, schema versions,\nadapters, architectures and contexts. A command specified here but unavailable in a\nbinary returns `E_UNSUPPORTED`, never success from a placeholder handler.\n\n## 2. Command coverage\n\nThe names below define the CLI contract; groups without arguments show help.\nEvery mutating operation supports inspectable results and stable error codes.\n\n| Group | Required commands | Context / responsibility |\n|---|---|---|\n| Global | `version`, `capabilities`, `doctor` | All; versions, capabilities and non-mutating diagnostics |\n| Manifests | `manifest init/validate/fmt/schema` | Source authoring and strict validation; fmt preserves semantics |\n| Pinning | `resolve layer/composition`, `lock verify/diff` | Explicitly create locks, verify the complete input graph |\n| Package actions | `hooks inventory/explain/validate/coverage/test` | Shared policy and mandatory Core/KDE/GNOME coverage (RFC-0011) |\n| Snapshots | `snapshot capture/verify/show/list` | Capture controlled repositories, verify immutable identity |\n| Builds | `build environment/package/layer/iso` | Locked bootstrap/toolchain/package/layer/installer outputs |\n| Composition | `compose plan/build/verify/diff` | Complete image from exact layer commits and a CompositionLock |\n| Pipelines | `pipeline plan/run/status/logs/retry/cancel` | Persisted build DAG; scheduling is external cron |\n| Registry | `registry list/show/pull/verify/export/import` | Native OSTree plus descriptors/packages; offline bundles preserve identities |\n| Releases | `release assemble/verify/publish/promote/withdraw` | Candidates, validation, signed publication and same-commit promotion |\n| Portal | `portal generate` | Static download catalog from verified release metadata |\n| Host status | `status`, `verify`, `diff` | Booted/pending/desired state, origin, checks and actual local modifications |\n| Updates | `update check/plan/apply` | Select complete candidate, reapply full extension set, stage |\n| Rebase | `rebase plan/apply` | Explicit change of managed image track/base with compatibility validation |\n| Purpose | `purpose list/show/set/clear` | Zero/one concrete Purpose; clear returns to Core-only through recomposition |\n| Overlays | `overlay list/show/add/remove/order` | Explicit ordered managed set; no implicit dependency insertion |\n| Extensions | `extension enable/add/remove/list/status/history/restore` | Persistent explicit requests, dependencies, generations and retained local files |\n| Replacements | `extension override set/reset/list` | Separate whole-package replacement intent; add never implies replacement |\n| Deployments | `deployment list/show/pin/unpin/cancel/prune`, `rollback` | Native OSTree selection/retention; rollback selects next boot, no reboot |\n| Installation | `install plan/apply/status/resume` | Exact target disk/partitions, input image and durable installation journal |\n| Onboarding | `firstboot`, `provision status/resume` | Installed target; CLI on tty1/ttyS0 or declared native Purpose adapter |\n| Accounts | `user list/add/remove` | Standard tools; removal only for explicitly classified human accounts |\n\n`boot-sync` remains an internal lifecycle entrypoint, not a second deployment API.\nWorkload managers (Flatpak/containers/etc.) require separate contracts: completeness\nof this OS CLI does not silently choose a workload subsystem or daemon.\n\n### Representative syntax\n\n```text\narchipelago resolve layer layer.yaml --snapshot sha256:... --output layer.lock.json\narchipelago build layer --manifest layer.yaml --lock layer.lock.json --output DIR\narchipelago resolve composition composition.yaml --output composition.lock.json\narchipelago compose build --manifest composition.yaml --lock composition.lock.json --output DIR\narchipelago build iso --profile installer.yaml --lock installer.lock.json --output DIR\narchipelago extension add nano mc\narchipelago extension add --file ./custom.pkg.tar.zst\narchipelago extension override set TARGET --with-package REPLACEMENT\narchipelago update plan --channel testing\narchipelago update apply --plan sha256:...\narchipelago install plan --disk /dev/disk/by-id/... --release sha256:...\narchipelago install apply --plan sha256:... --erase\narchipelago rollback --deployment CHECKSUM.SERIAL\n```\n\nNames, file inputs, refs, channels, package overrides and deployment pins are distinct\narguments. No overloaded “pin” silently means both input locking and GC retention.\nPrototype `overlay apply test-marker` and positional `build iso WORK BOOTSTRAP` get\nexplicit compatibility diagnostics/aliases, not an undocumented semantic change.\n\n## 3. Shared transaction contract\n\nOperations follow `select → resolve → plan → execute → validate → commit → publish/stage`.\nPlans bind source/manifest/lock IDs, current booted/pending identities, selected\nsnapshot, desired changes, required adapters and expected effects. A plan ID is a\ncontent digest. Apply rechecks these preconditions under the mutation lock; changed\nstate requires a new plan. Human-friendly one-step add/set commands may compute and\napply that same internal plan; they must not bypass validation or change semantics.\n\nPlanning may fetch verified metadata and populate a download cache, but cannot mutate\ndeployments or target disks. `--offline` forbids fetching and reports absent inputs.\nRequired privileges are checked before mutation. Explicit destructive intent applies\nto the identified resource (`--erase` for a disk); `--yes` only answers routine prompts,\nnever grants implicit package overrides, data deletion or fallback activation.\n\nPersist an operation ID, phase, exact inputs, log references and terminal result.\nCLI commands may wait synchronously for the service's asynchronous transaction;\ndurable records and deployment reconciliation remain required under RFC-0012.\nConcurrent mutations of one sysroot fail with `E_BUSY`; independent builds may run\nwithin configured limits. SIGINT/cancel stops before the next safe boundary, preserves\ndiagnostics/inputs and never reports activation if only composition succeeded.\nAfter a crash, resume checks actual state and completed phases. Installation resume\nmust not reformat a partition already containing the installed target implicitly.\n\n## 4. Desired, pending and booted state\n\n- Status distinguishes all three; includes managed base, commit/serial, snapshot,\n Purpose, ordered overlays, requested/resolved extensions and support provenance.\n- Repeated extension add accumulates requests against the owned staged candidate,\n otherwise the booted deployment. Duplicate requests are no-ops. An unrelated or\n finalized pending operation must be explicitly reconciled, never discarded silently.\n- Each generation is recomposed from its managed base and full requested set;\n dependencies remain separate. Remove/override reset uses the same rule.\n- After rollback, operations start from the selected deployment's intent; a global\n “latest generation” must not silently resurrect newer requests.\n- Preparing any change leaves current `/usr` unchanged. No command here implicitly\n reboots. Stage replacement happens only after validation; failed reapplication\n preserves previous pending/booted/rollback state and retained local inputs.\n- Update of an official image selects one authenticated release/image. Custom\n composition update resolves a new complete CompositionLock. Neither mixes layers\n from different snapshots. Host Extensions are reapplied afterward, atomically.\n- Fallback to an unmodified managed base requires explicit user selection.\n `extension restore GENERATION` validates the recorded base and exact inputs; it\n does not reinterpret a historical package DB as matching a different base.\n- Deployment prune respects booted, rollback, pending, pinned and success-gated\n retention. Extension inputs/history and persistent data require separate cleanup.\n\n## 5. Output, errors and secrets\n\nDefault output is human-readable. `--json` writes one final JSON result to stdout;\nprogress/logging uses stderr. `--events=jsonl` instead emits a documented event\nstream ending in one terminal result. Never intermix raw child stdout with JSON.\n\nResult envelope: `apiVersion: archipelago.cli/v1`, `operation_id`, `operation`,\n`state`, `changed`, `data`, `warnings`, `error`. Error includes stable `code`,\nmessage, phase, implicated artifact/path and diagnostic reference. No password,\ntoken/private-key content or secret-bearing argv appears in results/logs.\n\n| Exit | Meaning |\n|---|---|\n| 0 | Requested operation completed; may be an idempotent no-op or staged, not booted |\n| 2 | Invalid syntax/schema/input (`E_INPUT`) |\n| 3 | Unsupported capability/context/adapter (`E_UNSUPPORTED`) |\n| 4 | Authentication, signature or integrity failure (`E_TRUST`) |\n| 5 | Dependency/conflict/precondition violation (`E_CONFLICT`) |\n| 6 | Concurrent operation (`E_BUSY`) |\n| 7 | Artifact unavailable/network/storage failure (`E_UNAVAILABLE`) |\n| 8 | Build/check/transaction failure (`E_EXECUTION`) |\n| 130 | Cancelled; result records the last completed durable phase |\n\nCredentials come from protected interactive input, configured secret files/FDs or\nDocker secret mounts. CLI inspection is non-root where data permissions allow it;\ndisk/deployment/account mutation requires a privileged executor. D-092 permits\nunprivileged installed-system clients through action-specific Polkit authorization;\nthe caller need not run the CLI as root. Authorization errors share exit category 4\nwith trust failures, distinguished by stable error codes. Logs remain accessible only at the\nintended scope. System-account deletion stays forbidden under D-029/D-060.\n\n## 6. Delivery and verification\n\nCurrent code is an experimental subset: ISO builder/install/firstboot/status,\ntest-marker overlay, package self-check and evolving Host Extensions. It lacks most\ncommands above. Approval establishes required coverage, not present functionality.\n\nImplement in dependency order: schemas/identity → lock/registry verification →\nlayer build/composition → host plan/stage/update → net install → release/pipeline/\nportal workflows. Publish a capability matrix per binary build. Shared errors and\nJSON envelopes precede automation that consumes them.\n\nAcceptance: every advertised command has context/privilege/error tests; invalid\ninputs never partially mutate state; lock/plan drift is detected; SIGINT/restart and\nconcurrent operations are exercised; repeated add before/after boot and rollback\npreserve correct intent; failure keeps previous deployment/boot choice; net install\nand updates use the same release lock. CLI coverage is checked separately from\nbackend implementation and public release readiness.\n",
"sha256": "2bcd2b4ece6828be84c41c58d6bef34ad2b480cb4e75ca11d010e891ea11cff5",
"decisions": [
"D-029",
"D-060",
"D-067",
"D-068",
"D-069",
"D-092",
"D-093"
]
},
{
"id": "RFC-0010",
"title": "Docker Build Pipeline and HTTP Distribution",
"status": "Accepted",
"status_detail": "Accepted — D-068, 2026-11-04",
"date": "2026-11-04",
"version": "0.1",
"scope": "First infrastructure phase; topology, domains and credentials supplied later",
"path": "rfc/RFC-0010-docker-build-and-distribution.md",
"markdown": "# RFC-0010: Docker Build Pipeline and HTTP Distribution\n\n- **Status:** Accepted — D-068, 2026-11-04\n- **Version:** 0.1\n- **Date:** 2026-11-04\n- **Scope:** First infrastructure phase; topology, domains and credentials supplied later\n- **Depends on:** Accepted RFC-0008/0009; D-043, D-045–D-052, D-063, D-066/D-067\n\n## 1. First deliverable\n\nD-071 supplies the first [deployment binding](../spec/terra-infrastructure.md):\nterra, source registries in git.fasoley.net/Archipelago, mirror integration plus\nstandalone files, and https://mirror.nw-sys.ru/archipelago/ for homepage/ISO/OSTree.\nIt also requests registry-backed CLI updates followed by PackageKit and desktop\nfrontend integration. These bindings do not waive release or trust requirements.\n\nD-068 accepts Docker Compose with host cron and separate build/validation/publication\nroles; monthly immutable combined snapshots and daily pinned candidate builds;\nHTTP/native OSTree distribution; complete artifact publication before atomic signed\nchannel updates; shared release identities for updates, net install and the portal;\npurpose-separated OpenPGP keys and same-image promotion. Core x86_64 is the first\npublication target after its release gates; KDE/GNOME require independent acceptance.\nDeployment addresses, server bindings, keys, exact schedules/limits and verified\nworker isolation remain follow-up work. Acceptance does not establish implementation\nor approve the separate RFC-0011/D-069 package-action proposal.\n\nDocker Compose manages the initial build/distribution services. A cron-triggered\npipeline captures exact inputs, builds layers/images/ISO variants, validates them\nand publishes eligible releases to an HTTP artifact registry and download portal.\nThe same registry serves installed-system updates and online installation.\n\nDocker packages infrastructure processes; OS layers/images remain native OSTree\nartifacts, not Docker images. OCI image registries for builder containers are an\nindependent transport, pinned by digest. Kubernetes and a bespoke job daemon are not\nrequired. Public release gates remain unchanged; until proven, artifacts are private\nstaging even if the pipeline and portal are functional.\n\n## 2. Components and boundaries\n\n| Component | Responsibility and writable state |\n|---|---|\n| Scheduler | Host cron invokes a versioned Compose/CLI entrypoint; durable schedule/run records |\n| Build worker | Per-job Docker execution environment, Arch staging/nspawn, locked toolchain, scratch workspace/cache |\n| Validation worker | QEMU/KVM boot/install/update tests, isolated VM disks and retained evidence |\n| Publisher | Separate one-shot job with signing/publish credentials; immutable objects and atomic release pointers |\n| HTTP registry | Read-only serving of package snapshots, native OSTree archive repositories, descriptors and releases |\n| Portal | Generated static variant/download pages from authenticated release catalog |\n| Snapshot adapter | Host-controlled ZFS capture/export of mirror data; no ZFS administration exposed to clients |\n\nInitial parallelism is one build/validation job per worker; increase only through\nresource configuration. Workspaces, caches, jobs and published storage use dedicated\nvolumes. Download/registry/portal containers get no Docker socket, devices or build\nwrite access. Cron uses the host Docker CLI; build jobs do not need Docker-in-Docker.\n\nDocker does not replace nspawn isolation or supply a systemd/cgroup setup magically.\nThe worker profile must provide private mount propagation, delegated cgroup v2,\nrequired mount/loop capabilities and an explicit disposable Arch staging boundary.\nKVM is passed only to validation workers. Exact device/capability/SELinux profile\nmust be tested on the selected deployment host before rollout. If nested nspawn\ncannot meet that boundary, use a dedicated VM worker; do not silently run package\ntransactions on the infrastructure host. This is an explicit deployment gate.\n\n## 3. Pipeline profile and scheduling\n\n**D-090 supersedes the historical daily/monthly timing below.** The accepted schedule\nis the 15th and 30th of each month at 00:00 UTC, snapshot capture first and then\nCore/Purpose builds, ISO checks and signed publication. Operational fixes ship\npromptly; urgent CVE repository refreshes require explicit user instruction. The\nold daily trigger is disabled immediately. Replacement activation follows the\ncurrent desktop/CLI/image task and the storage/snapshot integration. See\n[release snapshots](../spec/release-snapshots.md).\n\nD-085 requests completion and daily activation of the deployed cycle at 00:00 UTC\n(03:00 MSK), with durable self-reported progress and failures. The current private\nadapter uses a host systemd timer/service for the daily trigger and bounded jobs,\nwith the same coordinator for manual execution; see the infrastructure repository's\n`deploy/RELEASE-CYCLE.md`. This deployment choice does not freeze the proposed\nPipelineProfile schema below or certify full release gates. Experimental published\nartifacts are labelled hardware-test; D-079 remains limited to its original pair.\n\nA proposed `PipelineProfile` contains logical `id`, SourceSet selector, snapshot\npolicy, enabled variant/architecture matrix, builder/validator OCI digests, build and\nvalidation profile IDs, resource/time limits, retention policy, publication target,\nand schedule `{cron, timezone, overlap, misfire}`. Physical URLs/paths/secret names\nare deployment bindings, not hard-coded artifact identities.\n\nProposed defaults for approval: UTC; daily candidate builds; monthly snapshot\ncapture; overlap `skip-and-record`; misfire `run-once-latest`; automatic publication\nonly to private staging initially. Exact cron expressions are configuration and\nmust be supplied before deployment. A cron tick never implicitly promotes stable.\n\nHost cron launches `docker compose run --rm worker archipelago pipeline run ...`.\nA durable per-profile lock prevents overlap across manual/retry/cron invocation.\nEach tick records scheduled time, actual start, SourceSet/lock IDs and final state.\nRetries get a new attempt ID and reuse the same immutable inputs unless the operator\nexplicitly requests a new resolve. Network retries are bounded; failed runs leave\nthe prior release pointer intact. Missed ticks are not replayed as an unbounded queue.\n\nRun state machine:\n\n```text\nqueued → resolving → building-packages → sealing-snapshot → building-layers\n → composing → building-installer → validating → candidate-ready\n → publishing → published\nany active phase → failed | cancelled\n```\n\nNo timestamp/job ID is allowed to perturb deterministic artifact payload. Wall-clock\nlogs and evidence are separate from reproducible identity. A pipeline run may refer\nto an already sealed snapshot and skip package capture/build/seal stages explicitly.\n\n## 4. Snapshot and pinning service\n\n**D-090 replaces D-073's capture deferral after the current task.** Move terra's\nArchipelago infrastructure to `tank`, mirror contents in a dedicated ZFS dataset;\nuse native snapshots and read-only date-time views at\n`/archipelago/arch-repo-snapshot/<UTC-date-time>/`. Keep at most three repository\nsnapshots, with consistency validation and reference-aware retirement. Build and\ninstalled Host Extension inputs remain bound to the selected snapshot; the entire\nisolated bootstrap is upgraded from it before Core. The older monthly/deferred\nsequencing below is historical where superseded.\n\nD-073 defers capture and bulk mirror copying during experimental development;\nuse the live mirror with exact per-run input evidence and no silent substitution.\nThe release snapshot service below remains required before public release.\nD-072 limits it to three retained monthly snapshots; reference-aware retirement\nmust precede a fourth capture, otherwise stop. See [terra binding](../spec/terra-infrastructure.md).\n\nMonthly package capture follows D-063. Freeze the mirror only after synchronization\nfinishes; capture repositories as one controlled transaction, then verify every\ndatabase-referenced package/checksum/signature exists in the read-only view. ZFS\nsnapshot atomicity alone does not prove repository semantic consistency.\n\nTo avoid bootstrap cycles:\n\n1. Pin upstream repositories and package-build toolchain/source inputs.\n2. Build the Archipelago package repository revision from those inputs.\n3. Seal the combined ordered Arch + Archipelago Snapshot (RFC-0008).\n4. Resolve layer locks against that single snapshot, then build layers.\n5. Resolve CompositionLocks from the resulting exact layer commits.\n\nNever append packages to a sealed snapshot; create a new ID/revision. A monthly\nhuman label may discover an ID, but clients persist the immutable ID. Exact archives,\nDBs, signatures and catalog remain retrievable for every retained release and input\nlock. A mirror/snapshot link must not resolve to mutable rolling package files.\n\nPinning is a graph of SourceSet, Snapshot, LayerLock, layer artifact, CompositionLock,\nimage and installer identities. The registry stores these immutable descriptors;\nthe resolver creates locks, not a server that silently rewrites client pins.\n“Latest” and channel aliases are discovery only. Missing locked artifacts are hard\nerrors; no fallback to newer packages. Retention marks the complete graph.\n\n## 5. HTTP registry contract\n\nLogical namespaces (base URLs will be supplied as deployment bindings):\n\n```text\n/v1/blobs/sha256/<digest> # canonical immutable documents/evidence\n/v1/snapshots/<id>/... # descriptor, databases, indexes, packages\n/v1/layers/<artifact-id>/descriptor.json\n/v1/images/<artifact-id>/descriptor.json\n/v1/installers/<artifact-id>/... # ISO, checksum, signature, descriptor\n/v1/releases/<release-id>/manifest.json\n/v1/channels/<arch>/<variant>/<channel>.json\n/ostree/layers/... # native archive-mode OSTree repository\n/ostree/images/... # native archive-mode OSTree repository\n```\n\nHTTP(S) GET/HEAD is sufficient for public consumers; Range/resume, Content-Length,\nETag and conditional reads are required for large artifacts. Immutable objects may\nbe cached permanently; mutable discovery pointers require revalidation. Digests and\nsignatures, not ETags, establish identity. Interrupted downloads use temporary files\nand are exposed to consumers only after verification. Layer/image transport stays\ncompatible with ordinary OSTree pull/summary/ref verification.\n\nPublication is via the controlled publisher, not anonymous HTTP writes. Private\nstaging is a separately access-controlled namespace/origin; hiding links on the\nportal is insufficient. It must not leak through public OSTree summaries or refs.\nPublic production endpoints use HTTPS; HTTP may be used behind the configured proxy\nor in explicit private tests without replacing artifact verification.\n\n## 6. Trust and publication transaction\n\nD-079 selects `stable/core` and `stable/gnome`. For cycle `20261105T164634Z` only,\nexplicit user approval permits promotion under a recorded exception to incomplete\nD-050–D-052 gates. Reuse the same commits/ISO bytes and D-078 signing key; expose\nthe exception and limitations in release metadata, retain legacy hardware-test\naliases for installed clients, and bind authorization to exact artifact identities.\nThis is not evidence of full reproducibility or permission for future unchecked\nreleases. General production trust/rotation/replay contracts remain open.\n\nD-078 accepts a temporary hardware-test binding: a separate OpenPGP key held only\non terra signs OSTree commits and summaries. Clients require verification of both;\nthe public key ships in new ISO binaries/images. Earlier images require an explicit\nbootstrap or replacement installer. This does not freeze the general release wire\nformat, key rotation or testing/stable trust policy described below.\n\nProposed initial trust profile: Arch package signatures retain pacman verification;\nArchipelago OSTree commits and canonical metadata use detached OpenPGP signatures\nwith purpose-separated keys. Public-key fingerprints/policy arrive through a trusted\ninstaller/configuration root, not from the same unsigned download being checked.\nThe existing experimental per-build pacman key is not this production key policy.\nPublisher credentials and private keys are unavailable to package-build jobs.\n\nSigned channel documents contain channel/variant/architecture, monotonically\nincreasing sequence, release ID and expiry. Clients reject stale/replayed discovery\nmetadata relative to accepted sequence and trusted time; explicit historical release\nselection/rollback remains possible without silently downgrading channel trust.\nKey rotation uses an authenticated policy update and overlap; exact key custody,\nbackup and deployment credentials are supplied before infrastructure rollout.\n\nPublication per `(architecture, variant, channel)`:\n\n1. Upload objects, packages, locks, attestations, ISO and signed immutable release.\n2. Verify the complete closure through the consumer HTTP path.\n3. Under a publication lock, compare expected channel sequence and commit one new\n signed channel document atomically. Never overwrite an immutable artifact ID.\n4. Refresh native OSTree discovery refs/summary and portal catalog from that release.\n\nThere is no cross-file HTTP atomicity. The signed channel document is the client\ntransaction boundary and references exact commits; clients do not combine a mutable\nOSTree ref from one generation with a manifest from another. Native discovery can\ntemporarily lag; exact locked objects must already exist. Resume/retry reconciles\nderived views without rebuilding artifacts or advancing sequence twice.\n\nTesting → stable promotion reuses the same verified image/installer identities and\nattestations; it does not rebuild. D-050 requires full reproducibility and all\nmandatory checks for both public channels. Failed gates never move their pointers.\nRFC-0011 adds complete package-action coverage of the locked Core/KDE/GNOME\nminimum sets. Publisher checks policy/lock-bound coverage and functional attestations;\ncron cannot bypass this gate or treat unknown scriptlets as harmless warnings.\nWithdraw removes discovery eligibility with an audited catalog update; retained\nartifacts remain available for existing locks and recovery.\n\n## 7. Updates, net install and ISO portal\n\nInstalled official systems discover a signed channel release, verify its snapshot,\nimage/lock and compatibility, pull the exact image, reapply all local extensions,\nvalidate and stage. Custom compositions obtain exact layer artifacts and resolve a\nwhole compatible CompositionLock before compose. A layer registry is not an excuse\nto merge independently “latest” layers during host update.\n\nNet install means an installer boots locally, discovers/selects a verified release\nand fetches its exact image closure over HTTP. PXE/iPXE is a separate future boot\ntransport, not a prerequisite. Before destructive disk apply, the plan binds disk\nidentity, verified release/lock, required artifacts and storage/provisioning profiles.\nPrefetch the installation closure before erase by default; inability to fetch or\nverify must not erase the target. Interrupted writes use installer journal/resume.\nOffline ISO bundles bind the same release/image identities; they are not a separate\nunversioned source of packages.\n\nPortal entries come only from eligible release metadata and contain variant,\nPurpose (or Core-only), architecture, channel, version/date, ISO type (offline/net),\nsize, SHA-256, signature, release ID, installation instructions and validation scope.\nLinks target immutable artifacts. A `latest.iso` alias may redirect but the page\nexposes the exact identity. Planned/failed variants have no fake download button.\n\nPhase-one enabled variant is the demonstrated Core x86_64 profile. The matrix can\nenable concrete GNOME/KDE/Server/IoT variants only after their own manifests and\ninherited D-051/D-052 checks pass. The exact first additional variants are an approval\nquestion, not an assertion of current implementation. Publication is atomic per\nvariant/channel; failure of one variant does not mislabel another as validated.\n\n## 8. Operations, retention and acceptance\n\nPersist run state, logs, lock graph, publication journal and validation evidence.\nExpose last successful run per track, failures, durations, disk pressure, snapshot\nage, channel sequence and missing-object checks. Portal rendering failure must not\ncorrupt registry content. Registry backup includes metadata, OSTree refs/objects,\nsnapshots and trust policy; signing-secret backup has a separate controlled process.\n\nServer GC marks all channel/current releases, explicitly retained historical\nreleases, active jobs, published locks and backup/recovery roots. Sweep only after\na configured grace interval and publication locking; preview the closure first.\nDo not delete a retained snapshot's package files because a rolling mirror removed\nthem. Initial default: no automatic deletion of published release closures.\nClient deployment/history retention remains governed separately by D-046.\n\nBefore acceptance: demonstrate cron/manual deduplication, crash/retry at every\npublication step, missing/tampered inputs, complete immutable HTTP closure,\nsame-commit promotion, offline and net installation, update plus extension failure\npreservation, authenticated private staging, reproducibility evidence, portal link\nconsistency and restore from backup. Docker worker isolation and resource limits\nmust be proven on the target host, not inferred from a Compose file.\n\nPending deployment inputs: domains/base URLs, hosts/volumes/ZFS dataset, cron times,\nenabled variants, worker isolation profile and quotas, TLS/auth mechanism, trusted\nkey fingerprints/custody, source remotes and backup/retention destinations. They are\nbindings to this contract; changes to semantic trust/publication rules need review.\n",
"sha256": "9c74efc8a61f3860f2a5dbf31189cbc091c45d8ba921477ba6411a85114d3a76",
"decisions": [
"D-043",
"D-045",
"D-046",
"D-050",
"D-051",
"D-052",
"D-063",
"D-066",
"D-067",
"D-068",
"D-069",
"D-071",
"D-072",
"D-073",
"D-078",
"D-079",
"D-085",
"D-090"
]
},
{
"id": "RFC-0011",
"title": "Minimum Package-Action Compatibility",
"status": "Accepted",
"status_detail": "Accepted — D-069, 2026-11-04",
"date": "2026-11-04",
"version": "0.1",
"scope": "Core/KDE/GNOME scriptlet and ALPM-hook coverage; CLI contract",
"path": "rfc/RFC-0011-package-actions-compatibility.md",
"markdown": "# RFC-0011: Minimum Package-Action Compatibility\n\n- **Status:** Accepted — D-069, 2026-11-04\n- **Version:** 0.1\n- **Date:** 2026-11-04\n- **Scope:** Core/KDE/GNOME scriptlet and ALPM-hook coverage; CLI contract\n- **Depends on:** RFC-0003–0010; D-027, D-058/D-059, D-066–D-068\n\n## 1. Required compatibility floor\n\nD-069 accepts this minimum scope, shared policy/CLI and execution-result contract,\nreadiness gates and the linked phased implementation plan. Exact KDE/GNOME manifests\nand supported snapshot transitions require separate agreement before claiming full\ncoverage. Acceptance does not establish implementation or desktop readiness.\n\nThe user requests support, at minimum, for actions from Arch `base`, `linux` and\nthe package sets implementing KDE and GNOME Purpose variants. This is a product\nobligation, not a best-effort allowlist.\n\nFor every supported snapshot/architecture, mandatory coverage includes:\n\n1. `base`, `linux`, their complete runtime dependency closure, and all additional\n Core integration packages, including `archipelago`.\n2. Complete runtime closure of `purpose/desktop/kde` together with Core: selected\n display manager, onboarding, session and essential integrations.\n3. Equivalent closure of `purpose/desktop/gnome` together with Core.\n4. Build-only dependencies and their actions in the relevant isolated build contexts;\n these must not leak into runtime payload.\n\nPackages with no actions are explicitly recorded. Missing inspection cannot count\nas coverage. Initial architecture is x86_64; others require independent inventories\nand evidence. Core-only does not acquire desktop runtime dependencies.\n\nExact desktop package sets and onboarding adapters are reviewed versioned manifests,\nnot mutable repository groups. Group expansion, if used during authoring, is recorded\nagainst a snapshot and becomes explicit locked names/provider choices. Supporting\nKDE/GNOME does not imply every optional Arch application. Essential desktop/setup\ndependencies cannot be omitted merely to hide an unsupported action.\n\n## 2. Inventory\n\nInspect both distinct mechanisms:\n\n- `.INSTALL` functions: pre/post install, pre/post upgrade, pre/post remove, including\n invoked helpers, version conditions and other executable inputs.\n- ALPM hooks from the transaction root and incoming packages: shadowing/overrides,\n filename order, Depends, NeedsTargets, AbortOnFail, targets and pre/post timing.\n\nUse native libalpm transaction semantics. A new hook can affect old files; inspecting\nonly incoming archives is insufficient. Generic shell analysis cannot prove all\nbehavior. Classification is reviewed and bound to exact source/helper identities,\narguments, conditions and expected effects. One function can contain actions in\nseveral lifecycles. Hash equality alone does not prove compatibility with a changed\nhelper, transaction or environment.\n\n## 3. PackageActionPolicy\n\nProposed `kind: PackageActionPolicy`, `apiVersion: archipelago/v1`, uses RFC-0008\ncanonicalization. LayerLock and CompositionLock bind its digest.\n\n| Field | Meaning |\n|---|---|\n| `scope` | Snapshot, architecture, profile manifest and resolved package-set digest |\n| `sources` | Package archive, path/checksum, helper/executable identities |\n| `actions[].id` | Logical action ID with explicit source/function/branch |\n| `actions[].triggers` | Operations, version predicates and native hook conditions/targets |\n| `actions[].classification` | `build-local`, `finalize`, `deploy`, `runtime`, justified `inapplicable` |\n| `actions[].adapter` | Name/version, code and configuration digests; omitted only for inapplicable actions |\n| `actions[].inputs/outputs` | Paths/resources and generated ownership; no implicit live-host outputs |\n| `actions[].after` | Dependency graph and deterministic ordering |\n| `actions[].network` | Explicit permission; finalization always `none` |\n| `actions[].timeout_seconds` | Bounded execution and defined failure outcome |\n| `actions[].required` | Mandatory when required by the selected feature; cannot be downgraded to pass a gate |\n| `actions[].evidence` | Test definitions, expected effects, failures and retry behavior |\n| `no_actions` | Inspected packages without scripts/hooks |\n\nInapplicable requires a precise predicate and reason, e.g. a historical migration\nunreachable for locked old/new versions. “Works in our VM” is not a classification.\nObserved runs are separate attestations bound to policy/input/result IDs; log paths\nand timestamps do not perturb the policy's semantic identity.\n\nAvoid an identity cycle: resolve the package set first and hash its package/provider\nrecords independently of action policy. Policy scope binds that set, not the full\nLayerLock that will contain the policy digest. Construct the final lock afterward;\nexecution attestations bind the completed lock and policy together.\n\n## 4. Execution\n\nPreserve native transaction/trigger semantics for valid staging actions. Package\nscripts execute only in isolation. Deferred actions have explicit replacement\nlifecycles and completion evidence.\n\n- Override only the exact reviewed ALPM hook and record its replacement.\n- Mixed-phase scriptlets need reviewed package adaptations or execution adapters;\n blanket `systemctl`/`useradd`/`ldconfig` no-op wrappers are not adapters.\n- Managed recomposition selects payload and runs finalizers; it does not replay\n every scriptlet as a pacman upgrade (D-026/D-027).\n- Host Extensions use the same policy engine on base plus requested packages.\n Unknown actions outside the floor fail with diagnostics and preserve state;\n extending support adds policy and tests, not an ignore-unknown flag.\n- Service start/restart never affects the builder or current deployment while\n preparing another one. Preserve units and target sysusers/tmpfiles/defaults.\n- Preserve existing target identities and administrator enablement; temporary\n staging accounts are not shipped as merged machine account state.\n- Required `/var` or `/opt` seed/migration behavior needs an explicit adapter and\n update/rollback proof; discarding payload and reporting success is prohibited.\n\nFollow RFC-0005 ordering/placement for linker, schemas, GIO/loaders, MIME, icons,\ntrust, locales, hwdb and target-kernel depmod/initramfs. Mutable font caches,\naccounts and machine identities belong to target lifecycle. DKMS is mandatory if\nselected by a supported manifest, not for every external DKMS package in Arch.\nDisplay manager, session and native onboarding must actually function.\n\nRequired errors, timeouts, missing outputs and unexplained effects fail the\ncandidate even if pacman exits zero. Log regexes are diagnostics, not the complete\ncontract: instrument reviewed adapters and retain a result ledger while preserving\nlibalpm semantics.\n\n## 5. CLI\n\nAll commands are under `archipelago`:\n\n| Command | Result / boundary |\n|---|---|\n| `hooks inventory --lock LOCK --output INVENTORY` | Inspect verified inputs without script execution; enumerate actions and no-action packages |\n| `hooks explain ACTION --inventory INVENTORY` | Source, trigger, phase, adapter, constraints and evidence |\n| `hooks validate --inventory INVENTORY --policy POLICY` | Validate identities, mappings, graph and outputs |\n| `hooks coverage --lock LOCK --policy POLICY --json` | Coverage by package/profile/transaction scenario, with blocking action IDs |\n| `hooks test --policy POLICY --case CASE --output DIR` | Isolated bounded tests and attestations; never live `/usr` |\n\nPolicy authoring is explicit versioned review. There is no auto-approve shortcut.\nManifest validation, resolve, layer build, compose, update, extension add and release\nverification consume one contract, not independent allowlists.\n\nStates: `covered`, `inapplicable`, `unclassified`, `stale`, `missing`. Source/helper/\ntrigger-context changes invalidate affected evidence. Reuse is explicit and only\nwhere inputs and declared context match; unchanged package names are insufficient.\n\nReport profile/lock/policy IDs, counts, blocked IDs, missing adapters and affected\noutputs. RFC-0009 error envelopes identify package/function/hook, snapshot and\nrequired adapter work; disabling checks is not the normal installation remedy.\n\n## 6. Required scenarios and gate\n\nFor every Core/KDE/GNOME candidate:\n\n1. Fresh isolated install/build and complete composition finalization.\n2. Supported old → new snapshots, including version-gated upgrade branches.\n3. Recomposition after layer/extension changes: removed inputs disappear from\n aggregates without deleting persistent user/service data.\n4. Removal scriptlets only where a workflow actually performs native removal;\n otherwise explicitly inapplicable. Overlay removal remains recomposition.\n5. Runtime accounts/directories, defaults/services, local login, desktop session,\n display manager and declared first-user onboarding.\n6. Injected PostTransaction failure with pacman exit zero, wrong helper digest,\n timeout, missing output and attempted live-host effect.\n7. Repeated runtime initialization and update/rollback preservation of IDs, data\n and administrator configuration within D-036's scope.\n\nGate: **zero unclassified/stale/missing mandatory actions**, plus passing required\nfunctional evidence. A percentage alone cannot pass. This supplements D-051/D-052\nand reproducibility, replacing neither. Failed private runs may retain diagnostics\nbut are not usable/public testing candidates. Other public variants still obey D-050.\n\n## 7. Implementation and approval\n\nThe minimum closures, policy/CLI contract, gates and\n[implementation plan](../spec/package-actions-plan.md) are accepted by D-069.\nExact initial KDE/GNOME manifests and the supported transition matrix remain to be\nagreed. Package-specific persistence, defaults and identity adaptations need reviewed\nsemantics and tests. Acceptance does not claim implemented desktop compatibility.\n",
"sha256": "e9b5ed3619eb48f03c31a3ce028ab3925e44dff21cecec8e8334244aa348f4d6",
"decisions": [
"D-026",
"D-027",
"D-036",
"D-050",
"D-051",
"D-052",
"D-058",
"D-059",
"D-066",
"D-068",
"D-069"
]
},
{
"id": "RFC-0012",
"title": "Installed-System Service and D-Bus Transactions",
"status": "Accepted",
"status_detail": "Accepted — D-092, explicit user approval 2026-11-07",
"date": "2026-11-07",
"version": "1.1 contract; implementation pending (D-093 additive host interfaces)",
"scope": "Installed-system control, update transactions, authorization and clients",
"path": "rfc/RFC-0012-system-service-and-dbus.md",
"markdown": "# RFC-0012: Installed-System Service and D-Bus Transactions\n\n- **Status:** Accepted — D-092, explicit user approval 2026-11-07\n- **Version:** 1.1 contract; implementation pending (D-093 additive host interfaces)\n- **Scope:** Installed-system control, update transactions, authorization and clients\n- **Amends:** RFC-0001 §5.8; RFC-0009's initial no-daemon requirement for installed systems\n\n## 1. Decision and boundary\n\nD-093 extends this contract through\n[RFC-0013](RFC-0013-host-management-and-packagekit.md): named `archipelagod`,\ninstalled-host CLI routing, Host Extensions/Managed Overlays and a PackageKit\nbackend. Existing major-1 manager/transaction signatures remain stable; Stage and\nDownload authorize each stored plan's kind/actions, not a blanket update privilege.\n\nGNOME Software, Discover and the installed-system CLI use one system D-Bus service\nfor OS update control. Clients run as the invoking user. The service performs\nprivileged operations using the existing Archipelago transaction engine and OSTree.\nPolkit authorizes individual operations; neither `sudo` nor spawning `pkexec` is\npart of the normal client protocol. Passwordless permission is a policy decision,\nnot an inherent consequence of using D-Bus. The service is itself userspace code;\nthe privileged system writer does not become an unprivileged process.\n\nKeep one primary Rust CLI and shared engine. D-093 names the service entrypoint\n`archipelagod`; `archipelago daemon` may remain an alias to that same mode.\nBuild-host and installer/offline operations retain direct execution\nwhere their existing contracts require it. A root maintenance path may use the\nsame engine offline, but it must acquire the same sysroot lock and never race the\nservice. An unavailable service is not permission for clients to fall back to\n`sudo`, `pkexec` or an independent writer.\n\nThis RFC accepts the architecture and v1 interface below. It does not assert that\nthe present binary implements them. D-092 does not reopen snapshot, trust, package,\nHost Extension, boot or release-admission policy. Existing release exceptions and\nthe running D-091 SDDM update pipeline are independent of this implementation.\n\n## 2. Responsibilities and activation\n\n| Component | Responsibility |\n|---|---|\n| systemd / system D-Bus | Activate and supervise the service, own its cgroup |\n| Archipelago service | Caller authorization, bounded requests, cache, transaction objects, journal and shared engine |\n| Archipelago engine | Checked plan, complete extension reapplication, composition/validation/staging |\n| OSTree | Objects, signature verification, transport and deployments |\n| Polkit / logind | Action authorization and authenticated local-session identity |\n| GUI / CLI | Presentation, explicit user intent, subscribing/reconnecting, displaying errors |\n\nThe service runs as root in a system unit `archipelagod.service`, `Type=dbus`,\nwith `BusName=org.archipelago.System1`; D-Bus activation invokes that unit. Do not\nrequire a separately enabled always-running daemon or a service per GUI. It may\nexit when idle with no accepted operation or outstanding request; active work must\nnot be lost to an idle timeout. Unit limits must accommodate valid long downloads\nand composition; per-operation deadlines belong to the engine, not a D-Bus call.\nRead/status requests remain responsive during workers' network and disk activity.\n\nThe same service contract applies to installed Core, GNOME and KDE. Provisioning\nmust complete before update mutations. Build/live contexts return an explicit\nunsupported-context error. Direct installer/build commands remain usable without\nthe system service. Native Flatpak and fwupd backends remain independent.\n\n## 3. Public D-Bus surface\n\nUse the **system bus**, well-known name `org.archipelago.System1`, manager object\n`/org/archipelago/System1`, interface `org.archipelago.System1.Manager`.\nTransaction interface: `org.archipelago.System1.Transaction`, objects beneath\n`/org/archipelago/System1/transactions/op_<32 lowercase hex digits>`.\nOperation IDs are random stable identifiers, distinct from content-addressed plan\nIDs. A transaction path remains stable across service restarts while retained.\n\nStandard `Introspectable`, `Properties` and `ObjectManager` are provided. The manager\nis the ObjectManager root. ObjectManager enumerates the manager and active\ntransactions; retained terminal transactions can be instantiated through\n`GetTransaction`. Signals are notifications, not the authoritative history.\n\n### 3.1 Manager methods\n\nNotation lists D-Bus signatures; argument names are normative. `options` is `a{sv}`.\n\n| Method | In | Out | Meaning |\n|---|---|---|---|\n| `GetCapabilities` | — | `a{sv}` | Interface versions, supported operations/features, effective limits |\n| `GetStatus` | — | `a{sv}` | Cached/reconciled booted, pending, desired, update and active-operation state; no network |\n| `Refresh` | `a{sv} options` | `o transaction` | Check configured signed image track, coalescing compatible refreshes |\n| `GetUpdateDetails` | `s target, a{sv} options` | `o transaction` | Obtain/cache verified package diff for that exact target |\n| `PrepareUpdate` | `s target, a{sv} options` | `o transaction` | Create immutable checked plan for explicit target and current intent |\n| `Download` | `s plan_id, a{sv} options` | `o transaction` | Fetch and verify inputs; do not stage/select a deployment |\n| `Stage` | `s plan_id, a{sv} options` | `o transaction` | Revalidate plan, fetch missing inputs, compose/validate/stage |\n| `GetTransaction` | `s operation_id` | `o transaction` | Reattach to active or retained result |\n| `ListTransactions` | `s cursor, u limit` | `aa{sv} records, s next_cursor` | Bounded, newest-first public journal summaries |\n| `ValidatePending` | `s deployment_id` | `a{sv} result` | Verify exact pending identity before GUI's explicit restart flow |\n\nAll long methods return after admission/journaling, before completion. Permission\nchecks may cause an interactive Polkit exchange only when explicitly allowed by\nthe caller. Network, download and compose do not run while holding an unanswered\nD-Bus method call. Successful method return means **accepted**, not completed.\nClients subscribe to properties, read the current snapshot after attaching, and\ncheck terminal status to cover completion before subscription.\n\n`Refresh` never creates a deployment or downloads a complete OS payload.\n`GetUpdateDetails` may fetch the signed target's package inventory and required\ntree metadata; that optional work must not delay showing basic update availability.\n`PrepareUpdate` produces a plan, not deployment mutation. `Stage` may combine\ndownload and installation so a GUI does not have to orchestrate engine internals.\n\n### 3.2 Options and admission\n\nAccepted option keys (unlisted keys/type mismatches are `InvalidArgument`):\n\n- `request_id: s`: required for `Download` and `Stage`, optional elsewhere; opaque\n client-generated UUID. Bind deduplication to authenticated UID, method and\n canonical inputs. Identical retry returns the original transaction, conflicting\n reuse is rejected. Include the request ID in public transaction metadata.\n- `interactive: b`: default false; authorizes asking Polkit to interact, never\n grants permission itself. Also honor the D-Bus interactive-authorization flag:\n both must allow interaction before prompting.\n- `offline: b`: default false, applicable to refresh/details/prepare/download/stage;\n no network, explicit missing-input result rather than an implicit online retry.\n- `force: b`: refresh only, default false; bypass freshness age but not concurrent\n deduplication, rate limits or trust checks.\n\nNo arbitrary command, URL, root path, repository key, environment variable or\nunchecked client-supplied plan body is accepted. Targets must be SHA-256 commit\nidentities verified for the currently configured track; plan IDs select immutable\nservice-owned plans. A changed remote tip never silently retargets an accepted\noperation. D-093/RFC-0013 adds typed extension/overlay/broker interfaces and verified\nlocal-file FD import. Future rebase/Purpose/account methods require their own\ncontracts and capabilities; v1 does not route them through a generic `Execute`.\n\nDeduplication records for download/stage must survive restart and be retained at\nleast as long as their transaction. Publish their expiry in the result; after\nexpiry clients reconcile deployments before issuing a new request ID. D-Bus\ndelivery does not promise exactly-once execution by itself.\n\n### 3.3 Manager status schema\n\n`GetCapabilities` returns `api_major: u` (=1), `api_minor: u`, `operations: as`,\n`features: as`, and `limits: a{sv}`. Unsupported methods/features are never\nadvertised. Clients require their minimum feature set before enabling actions.\n\n`GetStatus` returns:\n\n- `revision: t`: monotonic durable status generation, for resynchronization;\n- `booted`, `pending`, `desired`: `a{sv}` each; absent deployment is an empty map;\n- `update: a{sv}`: `state: s` (`unknown`, `current`, `available`), `target: s`,\n `checked_at_usec: t`, `stale: b`, `details_state: s`\n (`unknown`, `fetching`, `ready`, `error`) and `last_error: a{sv}`;\n- `active_transactions: ao`, `reconciling: b`.\n\nDeployment dictionaries include `deployment_id: s`, `checksum: s`,\n`managed_base: s`, `purpose: s`, `snapshot_id: s`, `support: a{sv}`;\npending includes `operation_id: s` and `reboot_required: b`.\nDeployment ID includes stateroot/commit/serial identity; a checksum alone is not\nassumed unique when multiple deployments of one commit exist. `desired` refers\nto accepted intent and its generation, not an assertion that it is booted.\nSupport distinguishes the actual booted and pending compositions under D-088.\nUnknown/unavailable fields are omitted, not fabricated from a different deployment.\n\nManager `StatusRevision: t` is a read-only property. Its `PropertiesChanged`\nnotification tells clients to obtain a new consistent `GetStatus` snapshot.\nReturning a cached status never waits for a mirror. Local reconciliation may set\n`reconciling=true`; mutation remains unavailable until authoritative state is known.\n\n### 3.4 Transaction interface\n\nRead-only properties:\n\n| Property | Type | Meaning |\n|---|---|---|\n| `Id`, `RequestId`, `Kind`, `State`, `Phase` | `s` each | Stable identity and machine-readable operation state |\n| `Revision` | `t` | Increasing durable transaction generation |\n| `CreatedAtUsec`, `UpdatedAtUsec`, `RetainedUntilUsec` | `t` each | UTC timestamps; 0 retention deadline while active/protected |\n| `PlanId`, `Target` | `s` each | Empty until resolved, then immutable |\n| `Progress` | `a{sv}` | Stage-local progress, bytes and optional total/rate |\n| `CanCancel`, `CancelRequested` | `b` each | Actual cancellation boundary state |\n| `Result`, `Error` | `a{sv}` each | Durable terminal result or sanitized structured failure |\n\nMethods: `Cancel(a{sv} options) -> b accepted`, `GetSnapshot() -> a{sv}` and\n`GetLog(s cursor, u limit, a{sv} options) -> as lines, s next_cursor`.\nCancel and GetLog accept only `interactive: b`. Log access is separately authorized; public progress does not\ninclude privileged raw logs. GetSnapshot atomically returns all properties.\nUse `PropertiesChanged` and `Finished(s state, a{sv} result, a{sv} error)` signals.\n`Finished` is advisory and may be missed; terminal snapshots remain authoritative.\n\n`Progress` keys: `message: s`, `unit: s`, `completed: t`, optional `total: t`,\n`bytes_per_second: t`, `percent: u`. Omit unknown quantities. `percent` is 0–100\nwithin the named phase, not a fictional overall percentage. Structured phases and\nerror codes are stable; user-facing messages can be localized by the client.\n\n### 3.5 Results, bounds and representative flow\n\nTerminal `Result` contains `outcome: s`, `changed: b`, `operation_id: s`,\n`completed_at_usec: t`, `effects: a{sv}`, `warnings: as`. Include `target: s`\nwhen selected, `plan_id: s` when created/used, and `deployment: a{sv}` only when\nthe corresponding deployment actually exists. Planned results include a sanitized\n`plan: a{sv}` with base/target/track/snapshot and intent generation; service-owned\nfull plans remain immutable. `downloaded` means all inputs promised by that plan\nare verified locally, not merely that the base OSTree pull succeeded. Plans that\ncannot provide this guarantee must return Unsupported, not a misleading ready flag.\nDetails results include `package_changes: aa{sv}` with `name: s`, `kind: s`\n(`added`, `removed`, `changed`), optional `old_version: s`/`new_version: s`, and\n`scope: s` (`managed-base`). It must not masquerade as the final effective extension\ndiff. Report known side effects in `effects` even for failed/interrupted results.\n\nTimestamps are UTC microseconds since Unix epoch; elapsed deadlines use a monotonic\nclock. IDs/checksums are validated before journal/path access. Cursors are opaque,\nservice-generated and bound to the requested resource; limits must be nonzero and\nwithin advertised bounds. Enforce message, page, queue, log and cached-input size\nlimits before allocation/work; no unbounded queue for repeatedly authorized calls.\nCapability limits include `refresh_max_age_usec`, `refresh_deadline_usec`,\n`details_deadline_usec`, `network_idle_timeout_usec`, `max_page_entries`,\n`max_log_lines`, `max_queued_refreshes`, `terminal_retention_usec`. Publish effective\nvalues, validate configuration and keep read-only response handling independent\nof worker deadlines. Exact tuned defaults require measurement in implementation.\n\nTypical GUI flow (illustrative sequencing, normative method semantics above):\n\n1. Read capabilities and status, render cached data immediately, subscribe to changes.\n2. Call Refresh, attach to returned transaction, reread its snapshot. On available,\n display the exact target and optionally request its details independently.\n3. On update intent, PrepareUpdate(target); obtain the resulting plan ID.\n4. Optionally Download(plan) for GNOME's download-only UX. Stage(plan) on install\n intent, using a fresh client request ID persisted before the call.\n5. Reattach after a bus disconnect using operation/request identity; do not repeat\n with a new request ID merely because the reply was lost.\n6. On staged result display pending identity and restart requirement. ValidatePending\n before the user's explicit restart action; desktop/logind performs the reboot.\n\nBefore an operation ID is received, retry the same idempotent request to discover\nits transaction. A daemon restart invalidates old object proxies, not the durable\noperation/request identity. Do not rely solely on receiving Finished once.\n\n## 4. Authorization policy\n\nDetermine UID and session from the authenticated D-Bus sender, Polkit and logind;\nnever trust caller-provided UID, group or session strings. Authorization is checked\nbefore accepting each operation, and binds the exact plan/target to that caller.\nThe initial administrator definition is membership in `wheel`. Root system\nautomation is permitted explicitly and records its origin; do not simulate a GUI\nuser or grant all system bus peers root-equivalent access.\n\n| Operation / action ID suffix (`org.archipelago.system.`) | Default policy |\n|---|---|\n| Public status/capabilities/transaction summaries | Readable without a password by system-bus clients; sanitize private data |\n| `refresh` (refresh, details, prepare) | Active local session: yes, no password; root automation: yes; others denied |\n| `download` | Active local session: yes, no password; root automation: yes; bounded service-owned verified inputs only |\n| `stage-update` | Active local `wheel` user: yes, no password for current-track update; other callers require administrator authorization |\n| `cancel` | Initiating UID in an active local session, or root: yes; another caller requires administrator authorization |\n| `read-logs` | Root or active local administrator: yes; others require administrator authorization |\n| Extension/local-package/override/overlay actions | Separate administrator authorization under RFC-0013; never implicitly granted by `stage-update` |\n| Future rebase/Purpose/rollback/cleanup actions | Separate administrator authorization; not implicitly granted by `stage-update` |\n\n`stage-update` only preserves the configured trusted track, Purpose and complete\nexisting extension intent. It cannot change repositories/keys, permit downgrades,\ndrop extensions or bypass signature checks. Reapplication of existing local\nextensions preserves their exact retained inputs and support provenance; no new\nlocal file request is accepted under the update authorization.\n\nNoninteractive unauthorized calls return a structured authorization error without\nopening a dialog. Explicit interactive calls may use the normal session/terminal\nPolkit agent. Headless clients without an agent receive an actionable error;\n`sudo` is not silently attempted. Authorization expiration does not interrupt an\nalready admitted job. A new operation requires a new decision. Reconnecting for\npublic status does not require renewed authentication.\n\nReboot is not a daemon method: GUI/CLI explicitly requests it through normal\ndesktop/logind policy after checking the pending deployment identity. Validating\npending does not reserve it forever; re-read on relevant state changes and keep\nthe user-visible target accurate. No automatic reboot or automatic rollback.\n\n## 5. Transaction lifecycle and concurrency\n\nStates: `queued`, `running`, `cancelling`, `reconciling`, `succeeded`, `failed`,\n`cancelled`, `interrupted`. The last four are terminal; `interrupted` means the\ndaemon cannot safely infer completion and requires an explicit new request after\nreconciliation. Preserve the last durable phase and actual effects.\n\nPhases: `admission`, `metadata`, `details`, `planning`, `downloading`,\n`composing`, `finalizing`, `validating`, `staging`, `reconciling`, `finished`.\nEach operation uses only applicable phases. A success result identifies its\noutcome: `current`, `available`, `details-ready`, `planned`, `downloaded`,\n`staged`, or `no-change`; staged success never means booted success.\n\nOne deployment mutation per sysroot owns the existing cross-process mutation lock\nthrough all state-dependent checks and commit/stage. Direct maintenance shares it.\nConflicting Stage requests fail `Busy` with the public active operation ID rather\nthan silently queueing intent that may become stale. A same-request retry attaches.\nCompatible refreshes with the same track, trust configuration and base/intent\ngeneration share work; repeated clicks must not create extra downloads/prompts.\nRefresh racing mutation returns cached status and attaches to/defer-coalesces one\nrefresh transaction; it cannot overwrite pending/applying with an older result.\nDeferred read-only refresh is allowed; arbitrary mutations are not auto-queued.\n\nCache entries bind target, trust profile, base/intent generation and relevant\nsnapshot. Results from an obsolete generation cannot replace newer status.\nConfigured bounded freshness/rate/size limits are reported in capabilities.\nFast availability uses the signed summary and required commit metadata; package\ndiff is separate and cached by immutable identities. Preserve the last successful\nresult with `stale=true` and a new error when network refresh fails. `unknown`\ndoes not mean up to date. Distinguish `NoTrack`, `NoNetwork`, timeout and trust failure.\n\nClosing a GUI or losing the bus connection does not cancel accepted work. Cancel\nis explicit and cooperative at safe boundaries. `CanCancel=false` during atomic\npublication/staging/finalization windows. A late cancel returns false/TooLate and\nthe real outcome; it never claims rollback of a completed deployment. For shared\nrefreshes, only the initiating authorized caller can cancel work without separate\nadministrator authorization; another client's local UI cancellation merely detaches.\nCancelling download may retain verified cache objects. Cancelling before stage\npreserves previous deployments/boot selection; cancellation does not delete inputs.\n\n## 6. Plans, trust and activation\n\nReuse RFC-0009 plan validation: bind exact target, configured track/trust identity,\nbooted/pending deployment identities, snapshot, desired extension generation and\nrequired finalization inputs. Revalidate under the lock before mutation. Drift\nreturns `PlanStale`; never create a replacement plan or retarget without informing\nthe client and obtaining a new explicit request. A current target may return\n`no-change` only after checking the full effective state, not just base checksum.\n\nPreserve signed summaries/commits, downgrade prevention, D-056 atomic full-set\nextension reapplication, D-088 support labels and explicit fallback selection.\nKeep `/usr` immutable on the running system. D-077 still selects a successfully\nprepared deployment for the next boot; no extra activation command is introduced.\nNative OSTree shutdown finalization and failure handling remain authoritative.\nFailure before commit preserves previous pending/default state. If failure occurs\nafter a side effect, reconcile and expose that actual effect rather than claiming\nthat nothing changed. Retention continues to protect booted/rollback/pending/pinned.\n\n## 7. Durability, restart and logs\n\nMaintain a root-owned persistent operation journal and immutable plan store under\n`/var/lib/archipelago`; exact on-disk schema is versioned independently of D-Bus.\nReuse/migrate existing operation records rather than introducing competing truth.\nBefore returning an accepted transaction, durably record identity, authenticated\ninitiator, request binding, exact inputs and initial state. Before critical side\neffects, record phase/intent; persist results with atomic replacement and required\nfsync ordering. Atomic rename alone is not a crash-durability proof.\n\nOn startup, acquire ownership, inspect OSTree, boot selection and surviving owned\nworkers, and reconcile incomplete journal entries before allowing mutations.\nDo not restart arbitrary commands or repeat staging merely because the last record\nsays running. A proven completed stage becomes succeeded/staged; safely incomplete\nwork becomes interrupted with retained inputs; ambiguous state blocks mutations\nand reports diagnostic action. Downloads may be continued only through verified\ncache semantics and recorded inputs. The UI can reattach to the same operation ID.\n\nSystemd supervises workers; a daemon crash cannot leave an untracked independent\nwriter. Either workers die safely with its cgroup or ownership is explicitly\nrecovered before another writer starts. Rollback to an older OS must not destroy\na newer journal schema: retain it and report unsupported state if unreadable.\nOn-disk compatibility/migration fixtures are required before service rollout.\n\nDo not log passwords, private keys, credentials or secret-bearing URLs/argv.\nPublic errors contain a diagnostic reference, not privileged raw stderr.\nRaw logs use protected journal/file access and bounded/paged retrieval. Active\noperations and results referenced by pending deployments/plans are protected from\nGC. Completed record retention is explicit and advertised; GC must not delete\nextension inputs/history or protected OSTree refs as a side effect.\n\n## 8. Errors, compatibility and client behavior\n\nD-Bus error prefix: `org.archipelago.System1.Error.`. Stable suffixes:\n`InvalidArgument`, `Unsupported`, `NotAuthorized`, `AuthenticationRequired`,\n`Busy`, `PlanStale`, `NoTrack`, `NoNetwork`, `Timeout`, `TrustFailed`,\n`Unavailable`, `NoSpace`, `TooLate`, `NotFound`, `Interrupted`, `ExecutionFailed`.\nMethod admission errors use these names. Accepted-operation failures use the same\ncode in the transaction `Error` map: `code: s`, `message: s`, `phase: s`,\n`retryable: b`, `diagnostic_id: s`, optional `active_operation_id: s`.\nGUI must distinguish user cancellation, missing authorization, absent track,\nstale plan, busy writer and network failure. Do not translate all into “no updates”.\n\nMap to RFC-0009 CLI categories: invalid input=2, unsupported=3, authorization/trust=4,\nplan/precondition=5, busy=6, network/storage/timeout=7, interrupted/execution=8,\nexplicit cancelled=130. Additional stable codes may refine the category, not change\nits meaning. Default output is readable; JSON and JSONL retain RFC-0009 separation.\nCLI Ctrl-C requests cancellation when permitted; if refused it reports the active\noperation ID and does not falsely return a cancelled result. Detach is distinct.\n\nVersion 1 supports additive optional fields/methods; breaking signature/state\nchanges require a new major interface. Unknown response fields are ignored;\nunknown requests fail. Never infer implementation from a version number alone.\nShip introspection XML, schema descriptions and client bindings from one source;\nGDBus/QtDBus clients share the same contract. Rust D-Bus library selection is an\nimplementation choice, not a dependency mandated by this RFC.\n\nMigrate GNOME and KDE to native asynchronous D-Bus calls and event subscriptions.\nReconnect on service name-owner change and obtain fresh snapshots. GNOME's\ndownload-only path remains Download; apply stages; pending restart stays explicit.\nDiscover uses the same transactions and shows OS as a nonremovable resource.\nTimer refresh uses the service's same admission/cache path. During rollout, any\nlegacy helper needed for compatibility must forward into this service, not retain\nan independent writer. Remove helper/policy once both GUI clients are migrated.\nLegacy `status.json` may be a read-only compatibility projection, never a second\ntransaction authority. Old clients cannot silently bypass capabilities or policy.\n\n## 9. Acceptance and rollout\n\nVerify through the normal installed-VM pipeline before declaring completion:\n\n1. Unprivileged status and local active-session refresh work without a password;\n authorized current-track stage works for active local wheel; other caller/session\n combinations follow the matrix and noninteractive checks never open prompts.\n2. Concurrent GUI/CLI/timer refresh joins one operation; mutations cannot overlap.\n3. A real older-to-newer signed image update completes in both GUI integrations;\n new GUI and CLI attach to an existing transaction and show its real phases.\n4. Close/reopen GUI during download/stage; restart the daemon at safe and critical\n boundaries; reconcile without duplicate staging or false success.\n5. Exercise network loss, missing track, signature failure, no space, stale plan,\n cancellation before/at the atomic boundary and journal-version incompatibility.\n6. Preserve full Host Extension set or fail atomically; keep booted/pending/support\n accurate, next-boot selection correct and user data unchanged through reboot.\n7. No GUI launches sudo/pkexec; no long blocking D-Bus/UI call; public status remains\n responsive while workers run. Bound and report network deadlines separately.\n\nRecord actual identities, timings and failure evidence. A fresh-install check alone\ndoes not establish update acceptance. D-092 grants implementation scope, not new\nrelease exceptions or a waiver of open reproducibility/Managed Overlay gates.\n\n## 10. Upstream review and remaining implementation choices\n\nReviewed on 2026-11-07 (moving upstream sources, not pinned build inputs):\n\n- [rpm-ostree D-Bus XML](https://github.com/coreos/rpm-ostree/blob/main/src/daemon/org.projectatomic.rpmostree1.xml):\n Sysroot/OS state, cached update, transaction start/cancel and progress signals.\n- [rpm-ostree Polkit actions](https://github.com/coreos/rpm-ostree/blob/main/src/daemon/org.projectatomic.rpmostree1.policy):\n distinct actions; distribution rules can refine upstream authentication defaults.\n- [GNOME plugin](https://github.com/GNOME/gnome-software/blob/main/plugins/rpm-ostree/gs-plugin-rpm-ostree.c):\n system-bus proxies, registered clients, transaction progress and worker context.\n- [Discover backend](https://github.com/KDE/discover/blob/master/libdiscover/backends/RpmOstreeBackend/RpmOstreeBackend.cpp):\n activation, deployment properties and attachment to external transactions.\n\nAdopt the service/authorization/transaction model, not RPM package semantics or\nrpm-ostree's exact API. Our v1 transaction objects stay on the system bus rather\nthan reproducing its separate peer-to-peer transaction connection. Copying code\nrequires normal license review; this contract requires no upstream code copying.\n\nStill to implement/select: Rust bus binding and pinned dependency; journal schema\nand downgrade-compatible migration; worker ownership details; measured deadlines,\ncache/rate/log-retention limits; exact systemd sandbox compatible with staging;\ngenerated XML/bindings and meaningful pipeline scenarios. These choices cannot\nweaken the authorization, durability, cancellation or deployment invariants above.\n",
"sha256": "80d38e1f4903a09f2aa6e3d0fed38fc7d17f4c83f09ed4b0fd807ca6e52e37d8",
"decisions": [
"D-056",
"D-077",
"D-088",
"D-091",
"D-092",
"D-093"
]
},
{
"id": "RFC-0013",
"title": "archipelagod, Host Extensions, Managed Overlays and PackageKit",
"status": "Accepted",
"status_detail": "Accepted — D-093, explicit user approval 2026-11-07",
"date": "2026-11-07",
"version": "1.0 contract; implementation pending",
"scope": "Installed-host D-Bus control and PackageKit Host Extension adapter",
"path": "rfc/RFC-0013-host-management-and-packagekit.md",
"markdown": "# RFC-0013: archipelagod, Host Extensions, Managed Overlays and PackageKit\n\n- **Status:** Accepted — D-093, explicit user approval 2026-11-07\n- **Version:** 1.0 contract; implementation pending\n- **Scope:** Installed-host D-Bus control and PackageKit Host Extension adapter\n- **Extends:** RFC-0012 / D-092; refines RFC-0001, RFC-0002, RFC-0004 and RFC-0009\n\n## 1. Accepted direction\n\n`archipelagod` is the installed-system authority for Archipelago operations.\nThe `archipelago` CLI, native OS-update plugins, PackageKit adapter and future\nhost-management UIs are clients of its typed system D-Bus interfaces. The daemon\nowns checked plans, execution, cache, durable transactions, locks and reconciliation.\nIt delegates storage/deployment to OSTree and package execution to the existing\nisolated composition engine. No frontend invokes live-host pacman or gains an\nindependent deployment writer.\n\nHost Extensions can be installed/removed through **PackageKit**, whose Archipelago\nbackend calls archipelagod over D-Bus. Managed Overlays use a separate typed D-Bus\ninterface, also used by the CLI; they are not represented as fake packages.\nOS image updates remain in the native GNOME Software/Discover Archipelago plugins.\nFlatpak/fwupd continue to use their own backends.\n\nThis is an accepted implementation contract, not a claim that a daemon, PackageKit\nbackend or general overlay engine is already implemented. Frozen API semantics\ncannot be advertised until their engine and acceptance paths actually work.\n\n## 2. Executable, service and CLI scope\n\nCanonical service entrypoint: `/usr/bin/archipelagod`; systemd unit:\n`archipelagod.service`, `Type=dbus`, `BusName=org.archipelago.System1`.\nKeep the D-092 bus name, object paths and existing method signatures stable.\nThe old planned `archipelago-daemon.service` may be an alias, never a second unit\nstarting another daemon. `archipelago daemon` may remain a compatibility/internal\nalias to the same service mode. D-Bus activation targets the canonical unit.\n\n`archipelago` remains the unified user CLI. `archipelagod` is a service entrypoint\nfrom the same Rust workspace/shared modules, not a forked package/composition\nimplementation. Packaging may use a thin second executable target or an alias\nwith explicit service-mode dispatch; neither duplicates business logic. D-093\nrefines the earlier single-executable packaging assumption to allow this named\ndaemon while retaining a single CLI and one transaction engine.\n\n**All installed-host management commands** route through the daemon: status/diff,\nupdates, extensions/overrides/history, overlays, Purpose/rebase, deployments and\nhost accounts when their methods are implemented. Local `help`, binary `version`,\nmanifest editing and offline validation need no RPC. Builder, registry publishing,\nlive installation and explicitly offline maintenance remain direct contexts under\ntheir existing privilege/lock contracts. This does not turn D-Bus into a remote\nbuilder protocol. Installed-host root invocation uses the same daemon and locks;\nit is not an implicit direct-mode escape hatch.\n\nUnavailable host methods return Unsupported. No generic `Execute(argv)` or shell\nRPC is introduced to pretend that the entire CLI is implemented. Additional\nPurpose/account/rebase method schemas require an explicit additive contract before\nadvertisement; their routing through archipelagod is settled here.\n\n## 3. Shared plans and transaction model\n\nUse RFC-0012's Manager and Transaction, durable operation IDs, request-ID retries,\nGetSnapshot, progress, error names, cancellation boundaries and restart recovery.\nAdditive capabilities: `host-extensions-v1`, `managed-overlays-v1`,\n`local-package-import-v1`, `packagekit-broker-v1`. Report each only when implemented.\nThe Manager minor version increases; major remains 1.\n\nExtend immutable plans with `kind`, `required_actions`, authenticated initiator,\nexact managed base/layer commits, shared snapshot, booted/pending identities,\ndesired-state generation, requested-vs-resolved packages, package/source checksums,\noverlay order, bounded replacement permissions and expected support transition.\nExpose an inspectable sanitized diff and all removals/replacements before staging.\n\nAdditive transaction kinds are `extension-enable`, `package-import`,\n`extension-change`, `extension-restore`, `overlay-change`, `package-catalog-refresh`\nand `overlay-catalog-refresh`. Planning success retains RFC-0012's `planned`\noutcome with plan ID; import success uses `imported` with `input_id: s`,\n`checksum: s`, `size_bytes: t` and sanitized package identity; catalog refresh uses\n`catalog-ready` with context/revision. These outcomes do not claim staged effects.\nPayload-changing Stage results use the existing `staged`/`no-change` outcomes and\nexact deployment identity. An enable/disable-only plan records the feature policy\nas `configured`, with `changed: b`, without fabricating a new deployment or changing\nbooted support status. Advertise additive kinds/outcomes with the corresponding v1.1 features\nso older clients do not misinterpret an unfamiliar result as an OS update.\n\n`Manager.Download` and `Manager.Stage` accept supported **service-owned plan kinds**,\nnot just OS-update plans. Their signatures stay unchanged. Authorization is derived\nfrom stored plan contents and required actions; the method name `Stage` never\nimplies passwordless `stage-update` for arbitrary plans. Reject client-supplied\naction names or attempts to relabel an extension/overlay plan as an OS update.\nRequire request IDs and retain the RFC-0012 deduplication/reconciliation guarantees.\n\nPlanning is side-effect-free with respect to desired state/deployments. Importing\nlocal bytes may persist a bounded protected input, but does not enable/apply it.\nSuccessful payload staging commits the new generation and selects it for next boot\nunder D-077; a feature-policy-only change does not change boot selection.\nFailures keep the previous generation, pending deployment and boot selection\nunless a real committed effect is reconciled and explicitly reported. Never remove\npersistent application/user data or historical extension inputs as part of removal.\n\nNew requests can accumulate against an Archipelago-owned pending generation under\nRFC-0009; all clients must select the same explicit context and expected generation.\nAn unrelated pending deployment cannot be silently replaced. Query responses carry\n`context_id: s`, an opaque service-generated binding of selected base/snapshot and\neffective intent generation. Every Prepare call below requires it; drift is PlanStale.\nThe frontend displays whether changes target the booted base or an existing pending\ngeneration. Replanning after drift requires a new review/request, not silent retarget.\n\n## 4. Host Extension interface\n\nObject `/org/archipelago/System1/HostExtensions`, interface\n`org.archipelago.System1.HostExtensions`. Expose through ObjectManager.\nRead-only `Revision: t`; emit PropertiesChanged when effective/requested state changes.\n\n| Method | Inputs | Outputs |\n|---|---|---|\n| `GetState` | — | `a{sv} state` |\n| `Search` | `s query, as filters, s cursor, u limit` | `aa{sv} packages, s next_cursor, s context_id` |\n| `Resolve` | `as names, s context_id` | `aa{sv} packages` |\n| `GetPackage` | `s package_id, s context_id` | `a{sv} package` |\n| `GetHistory` | `s cursor, u limit` | `aa{sv} generations, s next_cursor` |\n| `PrepareEnable` | `b enabled, s context_id, a{sv} options` | `o transaction` |\n| `ImportPackage` | `h fd, a{sv} options` | `o transaction` |\n| `PrepareChange` | `aa{sv} requests, s context_id, a{sv} options` | `o transaction` |\n| `PrepareRestore` | `s generation_id, s context_id, a{sv} options` | `o transaction` |\n\nOptions use RFC-0012 `interactive`, `offline`, `request_id` where applicable;\nImportPackage also requires a request ID. Enable/disable, request changes, overrides\nand restore each yield a plan consumed through Manager.Stage. Disable fails while\nrequests remain; it is not a hidden remove-all. Read methods are bounded and use\nthe local base-bound catalog. Missing catalog yields Unavailable; a separate\n`RefreshCatalog(a{sv} options) -> o transaction` fetches/verifies the selected base's\nsnapshot catalogs with the same bounded/coalesced read-only lifecycle.\n\n### 4.1 Package state and identity\n\nGetState provides `context_id`, `enabled: b`, `booted`, `pending`, `desired` maps,\nand separately `requested: aa{sv}` and `resolved: aa{sv}`. Each includes selected\nbase/snapshot and support provenance. No global mutable package DB is authoritative\nfor all deployments. Queries distinguish `managed`, `extension-explicit`,\n`extension-dependency` and `available` ownership/state. Managed packages can be\ninspected but cannot be removed through Host Extension package removal.\n\nPackage descriptors contain `package_id: s` (opaque), `name: s`, `version: s`,\n`architecture: s`, `source: s` (`repository`, `local`, `unknown`), `repository: s`\nwhen applicable, `snapshot_id: s`, `checksum: s`, `owner: s`,\n`booted: b`, `pending: b`, `explicit: b`, and a sanitized summary.\nPackage IDs bind exact identity, source and context; filenames/names alone do not.\nUnknown legacy provenance remains unknown. Repository additions preserve supported\nstatus only on a verified supported composition and retain D-088's `customed`\nannotation; local files/overrides/custom overlays do not acquire that guarantee.\n\n### 4.2 Requested mutations\n\nPrepareChange accepts a bounded array of discriminated request maps:\n\n- `op=add-repository`, `package_id: s` from the selected snapshot catalog;\n- `op=add-local`, `input_id: s` from a successful ImportPackage;\n- `op=remove`, `request_id: s` identifying an explicit extension request;\n- `op=override-repository`, `package_id: s`, `replaces: s`, `reason: s`;\n- `op=override-local`, `input_id: s`, `replaces: s`, `reason: s`;\n- `op=reset-override`, `request_id: s` identifying the override being reset.\n\n`request_id` inside these request maps identifies durable extension intent, not the\noptions' transaction retry token. Unknown discriminants/keys fail validation.\nUnsupported search filters fail explicitly. The v1 filter vocabulary is `installed`,\n`available`, `managed`, `extension-explicit`, `extension-dependency`, `repository`,\n`local`; `installed` refers to booted state. Contradictory state/source filters are\nInvalidArgument. Search cursors bind catalog/context and filter/query identity;\ndo not continue a page stream against a different snapshot after a base change.\nDependencies are resolved by the daemon from the selected base snapshot. An addition\nthat needs replacement reports Conflict; it cannot silently become an override.\nBase packages are not removable; reset-override restores the selected managed base's\npackage. Removing a dependency still required by surviving requests fails with the\ndependents identified; removing an explicit request rebuilds the remaining closure.\nAll changes in one request are atomic and expose exact consequences in the plan.\n\nSnapshot retirement/unavailability is an explicit error, not fallback to the live\nArch mirror. Update recomposes from the new base DB with all retained requests,\nnever from stale mutated package DB state. Restore revalidates the recorded inputs\nand base; it does not reinterpret old identities as packages from a newer snapshot.\n\n### 4.3 Local package FD import\n\nClients open the file and pass a Unix FD; the daemon does not open arbitrary caller\npaths. Accept only bounded regular-file content, copy into a root-owned retained\ninput, hash the **copied bytes**, parse package identity and apply normal trust/input\nvalidation before issuing `input_id`. An FD is not immutable: concurrent source\nmodification must not permit a validated/different-byte TOCTOU. Retained bytes,\nchecksum and parsed identity are what planning/execution use. Ignore the supplied\nfilename as authority; do not execute scriptlets while inspecting/importing.\n\nEnforce import quota/size and request ownership, do not expose private paths in\npublic responses, and remove only unreferenced transient partial copies on failure.\nCommitted local inputs/history retain their existing explicit-cleanup policy.\nImport never changes the source classification to repository even if name/version\nmatch. Required local signature/unsigned-input handling follows the configured\ntrust contract; PackageKit cannot weaken it by a transaction flag.\n\n## 5. Managed Overlay interface\n\nObject `/org/archipelago/System1/ManagedOverlays`, interface\n`org.archipelago.System1.ManagedOverlays`, read-only `Revision: t` and normal\nObjectManager/PropertiesChanged integration.\n\n| Method | Inputs | Outputs |\n|---|---|---|\n| `GetState` | — | `a{sv} state` |\n| `ListAvailable` | `s query, s cursor, u limit` | `aa{sv} overlays, s next_cursor, s context_id` |\n| `GetOverlay` | `s overlay_id, s commit` | `a{sv} overlay` |\n| `RefreshCatalog` | `a{sv} options` | `o transaction` |\n| `PrepareSet` | `aa{sv} selection, s context_id, a{sv} options` | `o transaction` |\n\nSelection is the **complete ordered desired list**, not an ambiguous delta. Each\nelement has `overlay_id: s` (configured registry identity) and `commit: s` (verified\nexact layer commit). No arbitrary URL or client-provided trust key. CLI add/remove/\norder fetches state, edits that list and calls PrepareSet with the original context.\nConcurrent list edits fail PlanStale rather than losing the other caller's change.\nDuplicates are invalid. Empty selection explicitly removes all overlays through\nrecomposition. Adding/updating/removing/reordering all produce inspectable plans.\n\nState and descriptors expose Core/Purpose identities, snapshot/architecture,\nbooted/pending/desired order, required overlays, before/after constraints,\nincompatibilities, packages and bounded file-operation permissions/provenance.\nMetadata must be trusted and verified against the actual layer commit; finding a\nname in a catalog is not sufficient authorization to execute arbitrary content.\n\nPreserve D-023/D-025/D-039/D-040/D-054: common snapshot, deterministic package owner,\nno implicit dependency insertion or list reordering, no later-position overwrite\nprivilege, expected owners and bounded operations/reasons, symlinks as objects,\nno blanket `replace_lower_layer_files`, no disguised lower-package deletion.\nMissing dependencies, cycles, incompatibility and snapshot mismatch fail before\npayload composition. Removal rebuilds the remaining composition and reassigns\nstill-needed dependencies without mutating original layer commits or persistent data.\nHost Extensions are reapplied afterward in full under D-056. Failure cannot silently\ndrop an overlay/extension or activate a clean fallback. Custom combinations do not\nbecome officially supported because their constituent overlays are signed.\n\nGeneral overlay composition is required before advertising managed-overlays-v1.\nThe existing test-marker prototype is not an implementation of this interface.\nLayer serialization and general release-gate evidence remain their own contracts.\n\n## 6. PackageKit integration and role matrix\n\nArchitecture:\n\n```text\nGNOME Software / Discover PackageKit frontend\n -> org.freedesktop.PackageKit (system bus, packagekitd)\n -> Archipelago PackageKit backend\n -> org.archipelago.System1 (system bus, archipelagod)\n -> common plans / isolated package execution / OSTree deployment\n\nNative OS plugin and archipelago CLI -> org.archipelago.System1 directly\n```\n\nImplement a real PackageKit backend against the pinned PackageKit ABI, not a\nreplacement masquerading as the standard PackageKit D-Bus service. It translates\nPackageKit package transactions to Host Extension queries/plans/transactions.\nThe stock ALPM backend must not be selected on an Archipelago installed host.\nNo PackageKit-specific pacman database, alternate resolver or separate state writer.\n\n| PackageKit role | Archipelago mapping / boundary |\n|---|---|\n| SearchNames / Resolve / GetDetails / GetPackages | Base-bound catalog and booted package state; ownership clearly identified |\n| RefreshCache | HostExtensions.RefreshCatalog; force does not change snapshot |\n| InstallPackages | PrepareChange add-repository for exact package IDs, then authorized Stage |\n| InstallFiles | Protected local file handoff -> ImportPackage -> PrepareChange add-local -> Stage |\n| RemovePackages | Remove explicit extension intent and recompose surviving closure |\n| Simulation flag | Return the actual daemon plan/diff; no intent/deployment mutation |\n| Download-only flag | Manager.Download of exact plan; never Stage |\n| GetUpdates | No independent package updates from a fixed base snapshot; OS updates belong to the native OS plugin |\n| UpdatePackages / UpgradeSystem / repository mutation / repair | Unsupported in this backend unless a future explicit contract adds them |\n\nAdvertise only implemented, semantically faithful roles, filters and transaction\nflags. Unsupported flags are rejected, never silently ignored. PackageKit `only\ntrusted` must be honored; absence of that flag is not permission to bypass daemon\ntrust policy. Preserve untrusted/local provenance. Version selection cannot escape\nthe base snapshot. OS-update refresh and PackageKit catalog refresh share cache/\nconcurrency coordination but remain different result kinds.\n\nPackageKit package IDs keep its `name;version;arch;data` syntax. `data` is a backend\nopaque identifier bound to snapshot/repository/source/context, not an accepted\nfilesystem path or URL. Validate each ID by resolving it against daemon-owned\ncatalog state; stale/forged IDs fail, never silently resolve to a new version.\nExact encoding is a versioned backend implementation detail and must be tested\nagainst PackageKit parsing; frontend state must not depend on parsing it.\n\nRemovePackages cannot remove Core/Purpose/overlay-owned packages or dependencies\nstill needed by surviving intent. `allow_deps=false` rejects a plan requiring extra\nremovals; `allow_deps=true` permits only consequences the daemon plan exposes, not\npermission to remove managed packages or silently drop additional explicit requests.\nExplicitly requested dependents require explicit request selection. `autoremove`\ncannot preserve unrequested orphan dependencies or trigger independent live cleanup:\nthe recomposition contract determines the surviving closure. If a flag combination\nrequires different semantics, reject it before effects rather than approximating it.\n\nHost Extension enablement remains explicit. PackageKit Install may proceed only\nwhen enabled, or after a frontend explicitly obtains consent and stages a separate\nenable plan. A generic InstallPackages call does not silently enable the feature.\nFrontend integration must make this usable rather than exposing an unexplained\nfailure loop. Existing support/provenance disclosures remain accurate under D-088.\n\n### 6.1 Staged installation semantics\n\nPackageKit completion means that its requested deployment transaction successfully\n**staged**, not that the booted `/usr` changed. Emit its system restart requirement,\nnormal terminal result and real phase progress; do not emit a false live-installed\nstate. Package queries report actual booted installed state; pending additions/\nremovals are separately exposed through archipelagod and shown by the adapted\nfrontends as “after restart”. Repeated requests attach/no-op against matching\npending intent instead of creating duplicate requests or reverting pending state.\n\nPackageKit frontend integration must reconcile optimistic UI state with the daemon's\nbooted/pending split. A stock plugin that cannot show this honestly is not sufficient\nacceptance evidence. The client must not launch a newly staged executable as though\nit exists in the current deployment. Removal does not remove current running files.\nReboot remains explicit; one OS pending deployment represents all staged changes.\n\nNo per-package update entries duplicate the native OS image update. Application\nownership chooses the backend: native packages/Host Extensions use PackageKit,\nOS resource uses native Archipelago, Flatpak uses Flatpak. Presenting the same app\nfrom different legitimate sources is allowed if source labels are clear.\nNative application metadata must map to the actual package IDs in the base-bound\ncatalog; an AppStream name or rolling-repository recommendation cannot select an\nunavailable package version. AppStream availability and PackageKit plugin loading\nare separate integration checks, not consequences of providing the daemon methods.\n\n### 6.2 Authorization and caller delegation\n\nPackageKit is a privileged broker, but the originating user's authorization must\nnot disappear when its backend calls archipelagod as root. Record original caller,\nPackageKit transaction ID and Archipelago operation ID together. Ordinary clients\ncannot submit a fabricated UID or bypass policy by claiming to be PackageKit.\n\nAdd broker interface `org.archipelago.System1.PackageKitBroker` on\n`/org/archipelago/System1/PackageKitBroker`:\n\n- `CreateContext(s packagekit_transaction, s original_sender) -> s context_token`;\n- `ImportPackage(s context_token, h fd, a{sv} options) -> o transaction`;\n- `PrepareChange(s context_token, aa{sv} requests, s context_id, a{sv} options) -> o transaction`;\n- `Download(s context_token, s plan_id, a{sv} options) -> o transaction`;\n- `Stage(s context_token, s plan_id, a{sv} options) -> o transaction`;\n- `Cancel(s context_token, s operation_id, a{sv} options) -> b accepted`.\n\nRestrict this interface to the authenticated owner of `org.freedesktop.PackageKit`\nwith the expected service credentials; bind token to that unique bus connection,\nthe PackageKit transaction and verified original unique sender/session. PackageKit\nbackend/core glue must derive the original sender from its actual transaction,\nnot a client hint or unvalidated UID field. If the pinned backend API does not expose\nenough information, implement reviewed glue or keep mutation roles unavailable.\nDo not silently treat such requests as trusted root automation.\n\narchipelagod remains final authorization authority and checks the original subject\nagainst its action policy. PackageKit's own checks are additional, not a bypass.\nAlign shipped PackageKit and Archipelago policies to avoid duplicate prompts while\npreserving identical effective authorization to direct CLI calls. Document the\nexact verified handoff; never temporarily grant all wheel users arbitrary backend\nroot execution. A passed PackageKit password check alone is not a universal daemon\nauthorization token. Existing Polkit retention may avoid repeated prompts for the\nsame action; do not invent reusable root bearer credentials.\n\nTokens are opaque, memory-only, scope-bound and expire with broker connection;\naccepted durable operations continue after PackageKit/GUI disconnect. Audit records\nsurvive; tokens do not. After broker restart, recovery uses transaction/operation\ncorrelation and explicit authorization, not replaying orphaned tokens or blindly\nreissuing InstallPackages. Broker request deduplication uses original UID plus a\nbroker transaction namespace, method and exact inputs, and remains distinct from\nunrelated direct-client retry IDs.\n\nPackageKit cancellation maps to cooperative Transaction.Cancel. If atomic staging\nhas begun, report cancellation unavailable/too late and the real terminal result.\nClosing the PackageKit client is not permission to kill a daemon transaction.\nMap Busy/PlanStale/trust/no-track/no-space/authorization failures to the closest\nPackageKit error with an operation diagnostic reference; do not report success\nmerely because a backend RPC returned an accepted object path.\n\n## 7. Extended authorization matrix\n\nUse the `org.archipelago.system.` action prefix and RFC-0012 interaction rules.\nReads are sanitized/passwordless; catalog refresh and repository-only planning\nare allowed to active local sessions and root automation with bounded resources.\nLocal import/private history or other sensitive inspection requires authorization.\n\n| Action | Operations | Default mutation policy |\n|---|---|---|\n| `extension-enable` | Enable/disable feature | Administrator authorization |\n| `extension-change` | Add/remove repository-name requests | Administrator authorization |\n| `extension-local` | Import/add local package inputs | Administrator authorization |\n| `extension-override` | Explicit whole-package replacement/reset | Administrator authorization |\n| `extension-restore` | Restore retained generation | Administrator authorization |\n| `overlay-change` | Add/update/remove/reorder managed overlays | Administrator authorization |\n\nFor these actions active local users may request `auth_admin_keep`; inactive/remote\ninteractive callers require `auth_admin`; noninteractive unauthorized calls fail.\nAuthenticated root automation retains explicit audited permission. When a plan\nrequires several actions, authorize all of them before mutation. Merely being active\nlocal wheel is not a passwordless extension/overlay grant: D-092's passwordless\nexception applies only to the existing trusted-track **OS update** operation.\nLocal import/planning that requires sensitive inputs uses the matching action.\n\nNo backend can use Manager.Download to bypass local-input/private-plan authorization.\nPlan ownership/access and required actions are checked for Download and Stage,\nincluding broker calls. General history queries expose sanitized provenance only;\nprotected local file locations and raw logs require the separate read authorization.\n\n## 8. Packaging and migration\n\nShip archipelagod, bus activation/policy, Polkit actions and CLI bindings in Core.\nDesktop Purposes add PackageKit, the **Archipelago** backend, and working native\nPackageKit frontend integration alongside native OS/Flatpak/fwupd backends.\nThe daemon remains authoritative even when PackageKit is absent on Core/Server/IoT.\n\nCurrent source constraints to remove deliberately:\n\n- GNOME native OS plugin declares a global PackageKit conflict; narrow ownership\n to the OS resource so native Host Extension applications can coexist.\n- Stock GNOME Software package lacks the needed PackageKit plugin in the reviewed\n snapshot; build/package a matching plugin or supported adaptation, validate ABI.\n- Discover launcher currently selects only Archipelago/Flatpak/fwupd; add the tested\n PackageKit backend with native-package ownership and staged-state integration.\n- Both desktop finalizers currently mask packagekit.service; remove those masks\n only in images carrying the replacement Archipelago PackageKit backend and policy.\n Never unmask stock ALPM as a transitional shortcut.\n\nPackageKit and native clients share daemon capabilities/status; no dual writers\nduring migration. Same-version private package signatures/ABI constraints remain\npart of normal build input validation. Removing compatibility helpers must not\nbreak an installed client during an in-progress operation. Preserve root-owned\njournal migration and rollback compatibility from RFC-0012.\n\n## 9. Acceptance in the normal pipeline\n\nExtend existing installed-VM acceptance, not a separate unchecked release path:\n\n1. CLI and PackageKit install the same repository package from the selected base\n snapshot with equivalent plan/provenance/support; verify staged then booted state.\n2. Two native package frontends, CLI and OS updater cannot create overlapping writers;\n stale package/context IDs fail; repeated PackageKit requests do not duplicate intent.\n3. Local package FD import retains exact copied checksum, applies configured trust,\n records unsupported provenance and survives update/rollback; reject path/FD races.\n4. Remove explicit extension, reject removal of managed package/required dependency,\n preserve persistent data, and reapply the complete remaining set on OS update.\n5. PackageKit simulation/download-only never stage. Unsupported flags/roles fail\n before effects. Restart requirement and current/pending application state are honest.\n6. Validate original-subject delegation, spoofed broker/sender rejection, no duplicate\n authorization prompts, reconnect/cancel/crash and no privilege-policy widening.\n7. CLI/D-Bus add/remove/reorder a real Managed Overlay; validate common snapshot,\n ordering/missing dependencies/conflicts/permissions and reapplication of extensions.\n8. GUI displays one OS update, native packages via PackageKit, Flatpaks via Flatpak;\n GNOME/Discover PackageKit plugins load and no ALPM backend touches live `/usr`.\n9. Disabled capabilities/unsupported future CLI methods fail explicitly rather than\n invoking old direct paths. Daemon aliases cannot start a second writer.\n\nArchive exact versions, source revisions, PackageKit role/flag matrix, D-Bus policy,\noriginal-subject evidence (without secrets), plans and deployment identities.\nThese scenarios do not claim general reproducibility or all overlay release gates.\n\n## 10. Remaining implementation details\n\nArchitecture/routing, action policies, method semantics and backend boundaries are\naccepted by D-093. Still implementation work: pinned PackageKit ABI and sender\nhandoff API, role/flag mapping constants, generated introspection/bindings, package\nID encoding, journal migration, overlay engine coverage, trusted catalog format,\nfrontend pending-state presentation and measured operational limits. General trust\npolicy for local unsigned artifacts and future host-operation schemas remain in\ntheir own contracts. Do not infer approval to weaken trust or invent absent methods.\n\nUpstream integration reference (reviewed 2026-11-07, not a frozen build input):\n[PackageKit backend API](https://github.com/PackageKit/PackageKit/blob/main/src/pk-backend.h).\nUse the actual pinned release's API/transaction semantics during implementation.\n",
"sha256": "de4703522ca100c097834eb23c5d1166f2322d83e0b35c0f23522a868f0d6083",
"decisions": [
"D-023",
"D-025",
"D-039",
"D-040",
"D-054",
"D-056",
"D-077",
"D-088",
"D-092",
"D-093"
]
}
]
}