Check the Cockpit updater contract in frozen-source evidence
This commit is contained in:
parent
4d9cefd3c2
commit
c0ba4401e7
2 changed files with 39 additions and 1 deletions
35
STATUS.md
35
STATUS.md
|
|
@ -2,6 +2,41 @@
|
|||
|
||||
Updated 2026-11-16. Architectural acceptance is separate from implementation.
|
||||
|
||||
## Stale OSTree objects, quoted code name, Cockpit updater (2026-11-16)
|
||||
|
||||
Installed hosts were running out of space because nothing ever collected unreachable
|
||||
OSTree objects. The legacy update path only called `ostree admin cleanup`, which
|
||||
removes old deployments but not their objects, and plain `ostree prune` keeps every
|
||||
commit that still exists in the repository. `system/src/gc.rs` now provides
|
||||
`archipelago cleanup plan` (read-only inventory of deployments, protected commits,
|
||||
keep refs, unreferenced composition refs and repository size) and
|
||||
`archipelago cleanup apply` (guarded collection). Apply refuses in the live
|
||||
environment, without a booted deployment, and while a pending/staged deployment
|
||||
exists; it takes the shared host mutation lock, runs `ostree admin cleanup`, mirrors
|
||||
every retained deployment into `archipelago/keep/<checksum>` refs, drops `service/*`
|
||||
composition refs no retained deployment names, verifies every protected commit, runs
|
||||
`ostree prune --refs-only`, re-reads each protected deployment and records the result
|
||||
in `/var/lib/archipelago/cleanup/`. `archipelago-ostree-gc.timer` runs it 30 minutes
|
||||
after boot and weekly. "Prune keeps every existing commit" and "--refs-only collects
|
||||
them" were verified against the OSTree prune implementation before choosing this
|
||||
shape. Rust tests cover the guards and ref accounting; real-host pruning remains a
|
||||
user-verified scenario.
|
||||
|
||||
`defaults/os-release` now quotes the code name everywhere
|
||||
(`VERSION="Tesseract"`, `VERSION_ID="Tesseract"`, `VERSION_CODENAME="tesseract"`) and
|
||||
the Core package build asserts the exact lines, so no edition drifts.
|
||||
|
||||
Container Runner now ships a Cockpit update page
|
||||
(`/usr/share/cockpit/archipelago-updates/`) that is a typed
|
||||
`org.archipelago.System1` D-Bus client: status, refresh, plan inspection,
|
||||
download and stage, with transaction progress and an explicit "reboot manually"
|
||||
result. It uses no PackageKit, pacman, shell commands or a second deployment writer.
|
||||
`builder/tests/cockpit_updater.py` enforces that contract and is part of the
|
||||
frozen-source checks; loading the page in a real Cockpit session remains manual.
|
||||
|
||||
Plymouth/visual branding with the Archipelago logo is still to do: the theme is
|
||||
currently `spinner` and the build asserts that theme.
|
||||
|
||||
## Host Extension local packages: import path and image database (2026-11-16)
|
||||
|
||||
D-115. `archipelago extension add ./package.pkg.tar.zst` (and the explicit
|
||||
|
|
|
|||
|
|
@ -342,6 +342,7 @@ cp {shlex.quote(config['worker_source_root'])}/target/release/archipelagod {remo
|
|||
docker run --rm --network=none --mount type=bind,src={remote_root}/source/src,dst=/build/src,readonly --mount type=bind,src={shlex.quote(config['worker_source_root'])}/target,dst=/build/target --mount type=bind,src={shlex.quote(config['worker_root'])}/cache/cargo,dst=/usr/local/cargo/registry {shlex.quote(config['worker_tools_image'])} cargo test --manifest-path /build/src/cli/Cargo.toml --offline --locked --release -p archipelago -p archipelago-system -p archipelago-contracts -p archipelago-composer -p archipelago-builder -p archipelago-installer -p archipelago-registry > {remote_root}/service-contract-checks.log 2>&1
|
||||
python3 {remote_root}/source/src/infrastructure/tests/control_portal.py > {remote_root}/control-portal-checks.log 2>&1
|
||||
python3 {remote_root}/source/src/system/tests/local_package_import.py > {remote_root}/local-package-checks.log 2>&1
|
||||
python3 {remote_root}/source/src/builder/tests/cockpit_updater.py > {remote_root}/cockpit-checks.log 2>&1
|
||||
sha256sum {remote_root}/archipelago > {remote_root}/inputs.sha256
|
||||
sha256sum {remote_root}/archipelagod >> {remote_root}/inputs.sha256
|
||||
sha256sum {remote_root}/source.tar >> {remote_root}/inputs.sha256
|
||||
|
|
@ -357,6 +358,7 @@ find {remote_root}/probes -type f -name '*.py' -exec sha256sum {{}} + >> {remote
|
|||
call(['rsync', '-a', f'{worker}:{remote_root}/service-contract-checks.log', str(run / 'service-contract-checks.log')])
|
||||
call(['rsync', '-a', f'{worker}:{remote_root}/control-portal-checks.log', str(run / 'control-portal-checks.log')])
|
||||
call(['rsync', '-a', f'{worker}:{remote_root}/local-package-checks.log', str(run / 'local-package-checks.log')])
|
||||
call(['rsync', '-a', f'{worker}:{remote_root}/cockpit-checks.log', str(run / 'cockpit-checks.log')])
|
||||
# D-098 amendment (2026-11-10): Flatpak seeds change only with the monthly
|
||||
# ISO. Three-day OSTree cycles reuse the last verified seed instead of
|
||||
# spending hours on a refresh whose result is only shipped in ISO media.
|
||||
|
|
@ -503,7 +505,8 @@ rm -rf {builds['core']}/iso-work {builds['core']}/profile {builds['core']}/extra
|
|||
atomic(evidence, dict(policy='D-098', passed=True, source=str(run / 'source.tar'),
|
||||
source_sha256=digest(run / 'source.tar'),
|
||||
checks=[dict(path=str(run / name), sha256=digest(run / name)) for name in
|
||||
('service-contract-checks.log', 'control-portal-checks.log', 'local-package-checks.log')]))
|
||||
('service-contract-checks.log', 'control-portal-checks.log', 'local-package-checks.log',
|
||||
'cockpit-checks.log')]))
|
||||
review = {'output': str(run / 'candidates.json'), 'candidates': [dict(
|
||||
variant=v, version=stamp, directory=str(run / v),
|
||||
iso_name=iso_name(v) if mode == 'iso' else None,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue