From b835097a5e2715302e25f9f0674912eb91aa45d9 Mon Sep 17 00:00:00 2001 From: Pavel Isaev Date: Mon, 9 Nov 2026 14:35:40 +0300 Subject: [PATCH] Record explicit hash-bound one-run VM waiver for existing image publication --- deploy/RELEASE-CYCLE.md | 11 +++++++++++ pipeline/prepare-hardware-pair.py | 10 ++++++++-- pipeline/release-cycle.py | 25 +++++++++++++++++++++---- 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/deploy/RELEASE-CYCLE.md b/deploy/RELEASE-CYCLE.md index 6f13405..cf81206 100644 --- a/deploy/RELEASE-CYCLE.md +++ b/deploy/RELEASE-CYCLE.md @@ -1,5 +1,16 @@ # Daily release cycle +## One-run VM waiver (2026-11-09) + +The user explicitly authorized publishing the already built D-Bus images from +20261109T090622Z without repeating VM acceptance, for manual hardware testing. +The driver accepts `--vm-acceptance-waiver FILE` only with `--existing --archive`. +The JSON records `authorized_by: user`, a reason, and `iso_sha256` for every variant. +Preparation verifies those hashes and records `vm_acceptance: waived-by-user`; +it does not fabricate passed VM summaries. Archive identity, OSTree fsck, signing +and HTTPS publication checks remain mandatory. This option is not set in the +scheduled service configuration; any temporary invocation override must be removed. + ## Terra-only execution (2026-11-08) The user requested moving all builds, Flatpak preparation and VM acceptance to diff --git a/pipeline/prepare-hardware-pair.py b/pipeline/prepare-hardware-pair.py index c826d75..2ce8824 100644 --- a/pipeline/prepare-hardware-pair.py +++ b/pipeline/prepare-hardware-pair.py @@ -19,7 +19,12 @@ def prepare(config): iso = root / 'build/output' / item['iso_name'] repo = root / 'build/repo' sha = digest(iso) - if item['variant'] == 'core': + waiver = None + if item.get('vm_acceptance_waiver'): + waiver = json.loads(Path(item['vm_acceptance_waiver']).read_text()) + if waiver.get('authorized_by') != 'user' or not waiver.get('reason') or waiver.get('iso_sha256', {}).get(item['variant']) != sha: + raise ValueError('VM acceptance waiver missing or mismatched') + if item['variant'] == 'core' and waiver is None: summary = json.loads(Path(item['core_summary']).read_text()) if summary.get('passed') is not True or summary.get('iso_sha256') != sha: raise ValueError('Core VM acceptance missing or mismatched') @@ -43,7 +48,8 @@ def prepare(config): if item.get('expected_image_commit') and record['image_commit'] != item['expected_image_commit']: raise ValueError('Reviewed image differs from repository') Path(record['acceptance']).write_text(json.dumps(record | dict(scope='hardware-test', - accepted=True, checks=checks, limitations=item.get('limitations', [])), indent=2) + '\n') + accepted=True, vm_acceptance='waived-by-user' if waiver else 'passed', + checks=checks, limitations=item.get('limitations', [])), indent=2) + '\n') records.append(record) Path(config['output']).write_text(json.dumps(records, indent=2) + '\n') diff --git a/pipeline/release-cycle.py b/pipeline/release-cycle.py index 19e4eac..120d3a3 100644 --- a/pipeline/release-cycle.py +++ b/pipeline/release-cycle.py @@ -61,11 +61,14 @@ def main(): parser.add_argument('--existing', help='JSON mapping core/gnome to existing worker build directories') parser.add_argument('--archive', type=Path, help='Reuse matching archived inputs; seed delta transfer when rebuilding Purpose') parser.add_argument('--core-build', help='Reuse a completed worker Core build; rebuild only Purpose and repeat both VM checks') + parser.add_argument('--vm-acceptance-waiver', type=Path, help='Explicit one-run user authorization bound to existing ISO hashes') args = parser.parse_args() if args.core_build and (args.existing or not Path(args.core_build).is_absolute()): parser.error('--core-build requires an absolute path and cannot accompany --existing') if args.archive and (not (args.existing or args.core_build) or not args.archive.is_absolute()): parser.error('--archive requires --existing or --core-build and an absolute coordinator path') + if args.vm_acceptance_waiver and not (args.existing and args.archive): + parser.error('--vm-acceptance-waiver requires --existing and --archive') config = json.loads(Path(args.config).read_text()) variants = tuple(config.get('variants', ['core', 'gnome'])) if variants not in (('core', 'gnome'), ('core', 'gnome', 'kde')): @@ -302,7 +305,14 @@ rm -rf {builds['core']}/iso-work {builds['core']}/profile {builds['core']}/extra 'ARCHIPELAGO_CORE_BUILD=' + builds['core'], remote_root + '/archipelago', 'build', 'iso', '--purpose', 'kde', builds['kde'], config['bootstrap']]) remote(f'mkdir -p {remote_root}/kde; {kde_command} > {remote_root}/kde/build.log 2>&1', 14400) - validate_pair() + if args.vm_acceptance_waiver: + waiver = json.loads(args.vm_acceptance_waiver.read_text()) + if waiver.get('authorized_by') != 'user' or not waiver.get('reason') or set(waiver.get('iso_sha256', {})) != set(variants): + raise ValueError('Invalid explicit VM acceptance waiver') + atomic(run / 'vm-acceptance-waiver.json', waiver) + state['vm_acceptance'] = {'state': 'waived-by-user', 'reason': waiver['reason']} + else: + validate_pair() phase('archiving-artifacts') if shutil.disk_usage(base / 'data').free < config.get('minimum_coordinator_free_bytes', 50000000000): raise ValueError('Insufficient coordinator space for artifact archive and publication') @@ -351,11 +361,11 @@ rm -rf {builds['core']}/iso-work {builds['core']}/profile {builds['core']}/extra call(['rsync', '-a', f'{worker}:{remote_root}/cli-logs/', str(run / 'cli-logs') + '/']) phase('preparing-publication') core_summaries = list((run / 'core/vms').glob('*/summary.json')) - if len(core_summaries) != 1: + if not args.vm_acceptance_waiver and len(core_summaries) != 1: raise ValueError('Missing or ambiguous Core acceptance') review = {'output': str(run / 'candidates.json'), 'candidates': [ dict(variant='core', version=stamp, directory=str(run / 'core'), iso_name='archipelago-core-latest.iso', - core_summary=str(core_summaries[0]), checks=[{'path': str(core_summaries[0])}]), + core_summary=str(core_summaries[0]) if core_summaries else '', checks=[{'path': str(core_summaries[0])}] if core_summaries else []), dict(variant='gnome', version=stamp, directory=str(run / 'gnome'), iso_name='archipelago-gnome-probe.iso', native_summary=str(run / 'gnome/acceptance/native-acceptance.json'), checks=[{'path': str(run / 'gnome/acceptance/native-acceptance.json')}, @@ -371,6 +381,13 @@ rm -rf {builds['core']}/iso-work {builds['core']}/profile {builds['core']}/extra limitations=['Private KDE candidate; D-089 selects product direction, not public release admission', 'First-image UI calibration does not prove autonomous onboarding acceptance', *review['candidates'][0]['limitations'][1:]])) + if args.vm_acceptance_waiver: + for item in review['candidates']: + item.pop('core_summary', None) + item.pop('native_summary', None) + item['vm_acceptance_waiver'] = str(run / 'vm-acceptance-waiver.json') + item['checks'] = [{'path': str(run / 'vm-acceptance-waiver.json')}] + item['limitations'].append('VM acceptance waived by explicit user authorization for this publication: ' + waiver['reason']) atomic(run / 'review.json', review) call(tools(['python3', '/pipeline/prepare-hardware-pair.py', run / 'review.json'])) records = json.loads((run / 'candidates.json').read_text()) @@ -381,7 +398,7 @@ rm -rf {builds['core']}/iso-work {builds['core']}/profile {builds['core']}/extra for r in records if r['variant'] not in publish_variants] atomic(run / 'release-authorization.json', { 'channel': 'stable', 'decision': config['kde_release_decision'] if 'kde' in publish_variants else 'D-087', - 'reason': 'Explicit user authorization for daily stable publication and installed-ISO update continuity', + 'reason': waiver['reason'] if args.vm_acceptance_waiver else 'Explicit user authorization for daily stable publication and installed-ISO update continuity', 'limitations': review['candidates'][0]['limitations'], 'candidates': [{k: r[k] for k in ('variant', 'version', 'sha256', 'image_commit', 'layer_commit')} for r in publication_records]})