Check local package import in the frozen-source evidence

This commit is contained in:
Archipelago 2026-11-16 20:21:57 +03:00
parent 44421bb76c
commit 4d9cefd3c2
2 changed files with 53 additions and 2 deletions

View file

@ -1,6 +1,55 @@
# Infrastructure implementation status
Updated 2026-11-15. Architectural acceptance is separate from implementation.
Updated 2026-11-16. Architectural acceptance is separate from implementation.
## Host Extension local packages: import path and image database (2026-11-16)
D-115. `archipelago extension add ./package.pkg.tar.zst` (and the explicit
`--file PATH`) now works through the daemon. `extension add` splits its arguments
into repository names and local archives — a path is recognised by `./`, `../`,
`/`, `~/` or an archive suffix, an unknown option is rejected, and a bare name is
never looked up on the filesystem — imports every archive through
`HostExtensions.ImportPackage`, and then prepares one `PrepareChange` and one `Stage`
for the complete mixed request. `extension import PATH` and
`extension add-local INPUT_ID` remain the explicit two-step form.
The hardware import failure had one cause: the identity cross-check ran
`pacman --config /dev/null -Qp archive`, which opens the default `/var/lib/pacman`.
An installed OSTree host keeps its package database in the image
(`/usr/lib/archipelago/package-db`) and does not populate the default path, so the
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.
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
operation. It now removes the whole per-operation directory, is not skipped by a
cancellation request (`--one-file-system`, no cancel boundary), runs on success and
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.
## Run 20261115T195243Z published after the snapshot-publication fix (2026-11-15)
The run that had failed in `building-software-adapter` (404 on the freshly mounted
repository view) finished after the snapshot/Caddy fix and the adapter-resume fix:
state `complete`, `published: true`, finished 2026-11-15T23:42:06 UTC, snapshot
`2026-11-15`, mode `iso`. Published images for `core`/`gnome`/`kde` + `container`
share the version `20261115T195243Z`; image commits `8a431300c75b`,
`ec82523f6f18`, `1f7272615320`, `8e0b9748b249`. HTTPS re-checked afterwards:
`v1/releases.json`, `releases.json`, `pipeline.json` and the pinned snapshot's
`core/os/x86_64/core.db` all answer 200. Freshness of the desktop kernel switch
(D-114) and of the image-size metadata (D-113) in the published images is a user
manual check on hardware; this note records publication, not hardware acceptance.
## A pinned snapshot must be downloadable, not just mounted (2026-11-15)

View file

@ -341,6 +341,7 @@ 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
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
@ -355,6 +356,7 @@ 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')])
# 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.
@ -501,7 +503,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')]))
('service-contract-checks.log', 'control-portal-checks.log', 'local-package-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,