fix(registry): repair two regressions from the domain migration; port the manifest validator to python
Fixes 4 test failures introduced by8e814ca0, which I pushed after running only the container-crate tests while the full suite was still compiling. Both failures were real defects, not stale assertions. 1. Catalog-driven installs would have failed fleet-wide.8e814ca0dropped the old registry address from TRUSTED_REGISTRIES, but the signed catalog still advertises image refs on it — deliberately, since rewriting a signed artifact invalidates its signature. Nodes resolve apps through the catalog, so every install would have been refused with "not from a trusted registry". Reinstated as LEGACY_REGISTRY_HOST, documented as transitional and removable only once the catalog is re-signed. 2. The update fallback lost the property it exists for. update.rs keeps two mirrors on purpose: the domain as primary, and the old IP over plain HTTP as a fallback, because a node whose DNS or clock is wrong (both break TLS) must still be able to update itself — the signature, not the transport, is what makes either source safe. The bulk rewrite pointed both constants at the domain, leaving the escape hatch dependent on exactly what it exists to survive. Restored to its original value. Separately, validate-app-manifest.sh is ported from ruby to python3+PyYAML. It shelled out to ruby with stderr discarded, so on any machine without ruby a missing interpreter was reported as "Valid YAML with top-level app block: FAIL" and every manifest came back REJECTED. This is the first tool an app developer runs, and it sent them to fix YAML that was never broken. Ruby was also the odd dependency out — the repo already ships three python scripts. It now checks for python3 and PyYAML up front and names what is missing, then parses with PyYAML. Missing keys resolve to an absent-value object that indexes to itself and prints empty, so call sites lost their per-hop guards: (((app["container"] || {})["build"] || {})["context"]) becomes app["container"]["build"]["context"]. Booleans still print as true/false rather than Python's True/False — call sites compare == "true", so Python's capitalisation would have silently inverted the readonly_root and no_new_privileges security checks. Verified: full rust suite 1148/1148, 0 failed. All 56 app manifests validate (0 rejected, 0 errored) where previously every one was rejected. No signed artifact modified. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
8e814ca06a
commit
44b50a39d4
@@ -88,7 +88,7 @@ const DEFAULT_UPDATE_MANIFEST_URL: &str =
|
||||
/// whose DNS or TLS is broken still updates. Dropped from the mirror list
|
||||
/// once the fleet has moved.
|
||||
const LEGACY_UPDATE_MANIFEST_URL: &str =
|
||||
"https://source.archipelago-foundation.org/lfg2025/archy/raw/branch/main/releases/manifest.json";
|
||||
"http://146.59.87.168:3000/lfg2025/archy/raw/branch/main/releases/manifest.json";
|
||||
const UPDATE_STATE_FILE: &str = "update_state.json";
|
||||
const UPDATE_MIRRORS_FILE: &str = "update-mirrors.json";
|
||||
/// Marker written by apply_update() just before the service restart and
|
||||
|
||||
Reference in New Issue
Block a user