Drop Python fixture logs from frozen-source evidence

This commit is contained in:
Archipelago 2026-11-16 23:00:46 +03:00
parent c0ba4401e7
commit 18aaf77de0
3 changed files with 31 additions and 35 deletions

View file

@ -4,23 +4,25 @@ 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.
The first object-GC implementation did not pass the safety audit: it ran
`ostree admin cleanup` without a D-047 readiness record, failed to expire its own
old keep refs, and could delete `service/overlay-builds/*` refs still named by a
retained `managed-overlays.json`. The corrected object-only pass makes
`archipelago cleanup plan` a read-only inventory and `cleanup apply` take the shared
host lock, protect deployments plus Core/Purpose/base commits, overlay clean-base,
selected/source layer commits, Host Extension bases and current-context plan targets,
then run only `ostree prune --refs-only`. It does **not** delete deployments or any
service/history/keep refs. Old keep refs are shown by the read-only plan and retained
until D-047/D-048 success records and a retention policy exist. The timer can collect
objects already unreachable from all refs; old deployments and composition histories
remain protected. This is deliberately not full
deployment cleanup. Rust tests cover the root graph and guards; real-host pruning
remains a user-verified scenario.
The older direct `system/src/updates.rs::stage_deployment` also used to call
`ostree admin cleanup` immediately after Stage. That call is removed: Stage is not
boot readiness or D-047 success evidence. Native `finalize-staged` retention remains;
object GC does not retire deployments.
`defaults/os-release` now quotes the code name everywhere
(`VERSION="Tesseract"`, `VERSION_ID="Tesseract"`, `VERSION_CODENAME="tesseract"`) and
@ -31,8 +33,8 @@ Container Runner now ships a Cockpit update page
`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.
`builder` Rust tests enforce that contract and are 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.
@ -55,8 +57,8 @@ An installed OSTree host keeps its package database in the image
check failed before the archive was parsed. Every pacman invocation in the service
now names the image DBPath (`inputs::PACKAGE_DB` and a shared argument builder).
Composition already inherited the base database; the audit confirmed there is no
other `/var/lib/pacman` dependency and `system/tests/local_package_import.py`
enforces both the DBPath and the import-then-plan order of the CLI.
other `/var/lib/pacman` dependency. Native Rust tests cover the explicit DBPath and
the import-then-plan argument flow.
The same pass fixed workspace retention: `Sandbox::release` deleted only the OSTree
checkout, so request files, copied archives and the adapter stayed behind for every
@ -65,13 +67,12 @@ cancellation request (`--one-file-system`, no cancel boundary), runs on success
failure of every plan/compose/resolve path, and purges a workspace untouched for a
day as orphaned.
Checks: `archipelago-system` 40 tests (new: database path, argument splitting),
`archipelago` CLI 4 interface tests (new: local archive documented in help),
`archipelago-builder`/`archipelago-composer` suites, and
`system/tests/local_package_import.py` (6 source-contract checks). The new script is
part of the release cycle's frozen-source checks and its log joins
`rust-evidence.json`. Hardware acceptance of the corrected import remains a user
manual check on an image carrying this source.
Checks at that implementation point: `archipelago-system` 40 tests (database path,
argument splitting), `archipelago` CLI 4 interface tests, builder/composer suites.
The later GC audit adds three system tests and makes the readiness-limited retention
boundary explicit. Local import and Cockpit D-Bus contract checks now run as Rust
tests in the Cargo suite, not Python fixtures. Hardware acceptance of local import
remains a user manual check on an image carrying this source.
## Run 20261115T195243Z published after the snapshot-publication fix (2026-11-15)

View file

@ -5,7 +5,7 @@ Desktop probes, optional rollout drivers, native store plugins and legacy bridge
| Consumer | Input contract | Verification |
| --- | --- | --- |
| `release-cycle.py` | Cargo exit status; native adapter tests; probe exit status and evidence files | Normal source stage runs Rust tests and `system/tests/kernel_arguments.py` before image builds |
| `release-cycle.py` | Cargo exit status; native adapter tests; probe exit status and evidence files | Normal source stage runs the Rust test suite (including native libostree kernel-argument tests) before image builds |
| Builder/install adapters | Command exit status and artifact files, no installed-host presentation parsing | Existing build/install assertions retained; raw `--debug` bypasses decoration |
| `core_iso_acceptance.py` | Explicit `transaction list --json`; installed metadata v3; package/boot state | Shared CLI probe before extension staging and after activation; history counts only `Kind=stage` |
| `gnome_native_acceptance.py` (GNOME and KDE) | Explicit `status --json`; command exit status; native D-Bus GUI interfaces | Shared CLI probe before nano staging and after reboot, so extensions must inherit kargs |

View file

@ -341,8 +341,6 @@ cp {shlex.quote(config['worker_source_root'])}/target/release/archipelago {remot
cp {shlex.quote(config['worker_source_root'])}/target/release/archipelagod {remote_root}/archipelagod
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,8 +355,6 @@ find {remote_root}/probes -type f -name '*.py' -exec sha256sum {{}} + >> {remote
'reason': 'CLI binary changed since the previous attempt'}), flush=True)
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.
@ -505,8 +501,7 @@ 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',
'cockpit-checks.log')]))
('service-contract-checks.log', 'control-portal-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,