11 KiB
Layer YAML v1 schema freeze review
Status: Frozen by explicit user approval, 2026-11-04. Implements RFC-0008/D-066.
The normative structural schema is ../schemas/layer-v1.schema.json; semantic
requirements below remain mandatory even where JSON Schema cannot express them.
Agreed: envelope and package requirements
The user explicitly approved this block on 2026-11-04:
- One
kind: Layer,apiVersion: archipelago/v1for Core and Purpose. - Required
metadata.name(stable logical ID),metadata.version(SemVer),spec.typeand onespec.architectureper manifest. spec.typeiscoreorpurposefor this review; the accepted overlay type remains part of RFC-0008 and is not removed by this scoped agreement.- Purpose requires
spec.purpose: {role, variant}; Core forbids it. Roles:desktop,server,iot; variants includegnomeandkde. compatibility.coreconstrains permitted Core logical IDs; omission imposes no additional Core-ID restriction.packages.runtimeandpackages.buildcontain requirement objects withnameand optionalconstraint: one native libalpm comparison. Purpose declares its own requirements; shared dependencies do not create duplicate payload ownership.- Groups are expanded to explicit package names before use as manifest requirements. Exact versions, providers, checksums and dependency closures belong in LayerLock.
- Snapshot selection occurs during resolve; mirror URLs and lower-layer commits are not fields in this manifest block.
- Reject unknown fields, duplicate keys, anchors/aliases and implicit type coercion.
Illustrative package lists do not approve complete Core/KDE/GNOME package sets.
Agreed: runtime declarations
The user explicitly approved this block on 2026-11-04:
runtime.sysusers,tmpfilesandpresetsare optional lists of packaged absolute/usrpaths, defaulting to empty. Native systemd mechanisms run in the target lifecycle; preserve existing identities and persistent data. Secrets and machine account databases do not belong in manifests.runtime.unitsis an optional list of{name, activation}.enablerequests initial enablement,socketrequests initial enablement of the named.socket, andmanualrequests no automatic enablement. These are initial defaults; administrator enablement survives updates. Conflicting presets/unit declarations are validation errors.- No separate
display_managerfield. Purpose declares the DM unit; its activation adapter handlesdisplay-manager.service. DM changes require an explicit plan accounting for the administrator's existing selection. - Optional
runtime.provisionernames a versioned adapter. Core supplies terminal firstboot on tty1/ttyS0. A Purpose declaration replaces Core's provisioner; omission inherits Core's. Onboarding finishes before subsequent normal deployments and does not restart on updates. Example adapter names do not prove implementation. - Optional
boot_checksandfunctional_checksare action-ID lists, defaulting to empty. Boot checks run with timeouts in the installed target's boot lifecycle. Functional checks run only in isolated acceptance environments, not on every user boot. Purpose inherits all Core checks and may add its own. - Official validation profiles enforce completeness of mandatory declarations even though these lists are syntactically optional.
Agreed: actions
The user explicitly approved this block on 2026-11-04:
- Required fields: locally unique
id,phase, versionedadapter, positive integertimeout_seconds, explicitnetwork(noneorallowed). - Phases:
build-local,finalize,deploy,runtime. Finalization requiresnetwork: none. Exact adapter identities are locked. argv,inputs,outputs,afterdefault to empty lists;requireddefaults to true. No implicit shell interpolation. Adapters validate resource types, allowed values and sufficient inputs.- Phase selects execution context, not an automatic invocation. Workflows or runtime references select invocation points. Functional checks can exercise runtime behavior inside acceptance VMs without becoming boot checks.
afterreferences local action IDs. Composed identity is the pair of layer ID and action ID. Cross-layer system ordering belongs to the finalizer adapter DAG, including depmod before mkinitcpio.- Cycles, missing references, incompatible phases and undeclared conflicting outputs are errors. Required failures block the operation; boot failures report diagnostics without automatic rollback/reboot. Official validation profiles cannot have essential checks downgraded to optional.
- Package hooks/scriptlets are inventoried through PackageActionPolicy rather than requiring every action to be manually repeated in the Layer manifest.
Final validation agreement
The user approved the final block and froze Layer v1 on 2026-11-04:
- One UTF-8 YAML document, no unknown fields, duplicate keys, anchors/aliases, merge keys, custom tags, interpolation or implicit type coercion. Null does not substitute for omission. Optional lists/maps use agreed empty defaults.
- Action IDs and Purpose variants match
[a-z0-9][a-z0-9._-]*, at most 128 characters. - Reject duplicate package requirements, action IDs, unit names and normalized file paths. Resolve all action/source/adapter references; unknown adapters are unsupported capabilities, not no-ops.
- Validate separately: structural schema; resolve/build dependencies, identities, ownership and actions; complete composition conflicts, replacements, effective package DB, kernel/ABI and finalization. Syntax validity is not readiness.
- Changes to fields or semantics require separate approval and schema versioning. Exact desktop sets and adapter implementations remain separate work.
Agreed: file contributions
The user explicitly approved this block on 2026-11-04:
spec.filesdefaults to an empty list. Each entry hastype(fileby default,directoryorsymlink) and requiredpath,mode,owner,group.- Files require
sourceand forbidtarget; symlinks require literaltargetand forbidsource; directories have neither. Directory entries never imply recursive copying: every contributed object is explicit. sourceis relative to the locked source tree. Parent traversal and escape through symlinks are forbidden.modeis an octal string. Symlink mode is"0777"under Linux semantics; applying it never changes target permissions.- Owners/groups are root or declared system identities; numeric resolution is locked and unresolved immutable-payload ownership blocks the build.
/etccontributions become/usr/etcvendor defaults with native installed OSTree merge. Persistent-state contributions need explicit adapters; tmpfiles normally creates target directories./bootand ESP use the boot adapter.- Symlinks are objects and are not followed when applying files or overrides. A file declaration does not grant overwrite permission: conflicts require explicit bounded overrides with expected ownership and reason.
Agreed: overrides
The user explicitly approved this block on 2026-11-04:
spec.overridesdefaults to empty and uses the same format for Purpose and Managed Overlays. Each entry requiresoperation, a nonempty finitepathslist,expected_owner.layerand a nonemptyreason. No glob or implicit recursion.- Operations:
replace-file,replace-symlink,set-metadata,change-type,delete-path. Replacement/type-change paths require matching newfilesobjects. Deletion has no replacement; metadata changes affect only declared fields. expected_owner.packageis required for package objects and absent for layer-authored objects. Check ownership against the composition index immediately before the operation; a mismatch is an error.set-metadatarequires a nonemptymetadatamap containing onlymode,owner,group. xattrs/ACL/capability editing needs a separate schema extension.- Directory deletion enumerates affected children explicitly. Bulk file deletion
cannot substitute for package removal. Overrides affect the new image, never
delete persistent state and never bypass
/etc, boot or ESP contracts. - Preserve changes in diff/provenance and effective package records.
- Optional
expected_sha256maps affected paths tosha256:<64 lowercase hex>digests of ordinary-file bytes. Keys must belong topaths. Reject this check for symlinks and directories until their identity semantics are separately defined.
Agreed: compatibility and package replacements
The user explicitly approved this block on 2026-11-04:
compatibility.coreis allowed for Purpose/Overlay;purposefor Overlay only;requires/conflictsfor Purpose/Overlay;before/afterfor Overlay only. Reject these fields on other layer types. Lists default to empty; duplicates are forbidden. A nonempty Purpose allowlist requires a matching present Purpose.requires/conflictsreference Overlay IDs. Required overlays must already be present, never auto-added.before/afterconstrain present overlays; require presence separately throughrequires. Missing dependencies, conflicts and cycles fail; composition order is never automatically repaired.- Core/Purpose versions are not pinned here: CompositionLock records exact commits,
while package/ABI compatibility is checked separately. Concrete
compatibility.kernelstructure remains pending. packages.replacementsdefaults to empty and is allowed for Purpose/Overlay, forbidden for Core. Each entry requirestarget,replacement,expected_owner(effective owning layer ID), andreason.- Replacement must also be an explicit runtime requirement. Target absence or
owner mismatch fails. Replace the whole package and validate dependencies,
file conflicts and ABI of the complete result. Native pacman
replacesdoes not authorize this operation. Package replacement and file overrides are distinct.
Agreed: kernel binding
The user explicitly approved this block on 2026-11-04:
compatibility:
kernel:
package:
name: linux
version: "<exact Arch version>"
architecture: x86_64
archive_sha256: "sha256:<64 lowercase hex>"
release: "<exact uname -r>"
abi:
adapter: linux-module-abi/v1
digest: "sha256:<64 lowercase hex>"
- Optional
kernelpermits one binding per layer. If present, every shown field is required. Package identity is exact; release identifies/usr/lib/modules/. - A versioned adapter defines ABI inputs and computes the digest; its exact code identity is locked. Validate all declared values against pinned artifacts. Package/architecture/release/ABI mismatch blocks composition.
- Absence means no declared kernel-bound payload, not compatibility with every kernel. Detected modules without binding are errors. Ordinary Purpose layers need no binding. Core supplying the kernel is not a dependency on a lower kernel.
- DKMS sources are distinct from prebuilt modules: finalization binds their build to the selected kernel and validates the resulting modules.
- The ABI-reference structure is agreed; the concrete
linux-module-abi/v1algorithm still requires specification and validation before use. The example adapter name does not establish implementation.