From 7c2438dcdc91b43c05cc1fc8019af335b4d06b26 Mon Sep 17 00:00:00 2001 From: Chris Gray Date: Wed, 11 Nov 2026 12:26:14 -0600 Subject: [PATCH 1/5] tools: move the attended NCM transfer profile out of kernel selftests Keep the USB-interface-pinned SSH reproduction in mobile tooling as requested in linux-omarchy-mobile #225. The kernel selftest remains host-only; document what the transfer profile does and does not establish. Assisted-by: LLM --- device/bluejay/UPSTREAM.md | 2 ++ tools/ncm-transfer | 47 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100755 tools/ncm-transfer diff --git a/device/bluejay/UPSTREAM.md b/device/bluejay/UPSTREAM.md index 53aae8fea..eb160196b 100644 --- a/device/bluejay/UPSTREAM.md +++ b/device/bluejay/UPSTREAM.md @@ -18,6 +18,8 @@ PR. Source-only instructions are not authority to run a phone operation. | Disabled Wi-Fi DT | [#230](https://github.com/derekross/linux-omarchy-mobile/pull/230) | Merge after both #227 and #228, then rebase to its own two commits | | Trusty trace API | [#231](https://github.com/derekross/linux-omarchy-mobile/pull/231) | Merged 2026-11-09; no Trusty runtime claimed | +The attended USB SSH transfer profile is `tools/ncm-transfer --peer root@ --interface `. It performs sixteen SHA-256-verified 2 MiB zero transfers with a shared 20-second deadline and no retry. Run it only after the device identity and storage checks pass; USB tracing is separately required to establish that aggregation retry was exercised. It does not test laptop sleep or USB replug. + All seven submitted heads passed CI. That is build/policy evidence, not runtime qualification of the rebased stack. The tested source is the contributor's `bringup/bluejay-tested-20261108`, commit `c934e316b`, based on diff --git a/tools/ncm-transfer b/tools/ncm-transfer new file mode 100755 index 000000000..e2003bb48 --- /dev/null +++ b/tools/ncm-transfer @@ -0,0 +1,47 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-2.0 +"""Pull 16 exact 2 MiB zero streams over an explicitly selected USB SSH link. + +Example: tools/ncm-transfer --peer root@ --interface +The peer needs head and SSH. No device files or partitions are modified. +No retries: the first timeout, SSH error, size or digest mismatch stops the run. +Run only after the device's read-only identity and storage-guard checks pass. +This reproduces the transfer profile; use USB tracing separately to establish +whether a full request pool exercised the aggregation retry. +""" +import argparse +import hashlib +import re +import subprocess +import time + +parser = argparse.ArgumentParser(description=__doc__) +parser.add_argument('--peer') +parser.add_argument('--interface') +args = parser.parse_args() +if not args.peer or not args.interface: + print('SKIP: --peer and --interface required for an authorized USB test') + raise SystemExit(4) +if not re.fullmatch(r'[A-Za-z0-9_][A-Za-z0-9_.:@-]*', args.peer): + parser.error('invalid SSH peer') +if not re.fullmatch(r'[A-Za-z0-9_][A-Za-z0-9_.:-]*', args.interface): + parser.error('invalid host interface') +size = 2 * 1024 * 1024 +expected = hashlib.sha256(bytes(size)).digest() +deadline = time.monotonic() + 20 +for index in range(16): + remaining = deadline - time.monotonic() + if remaining <= 0: + raise SystemExit('FAIL: 20-second stage deadline; stopped without retry') + try: + result = subprocess.run(['ssh', '-o', 'BatchMode=yes', '-o', 'ConnectionAttempts=1', + '-o', 'ConnectTimeout=5', '-o', 'ControlMaster=no', + '-o', 'ControlPath=none', '-o', 'ProxyCommand=none', + '-o', 'ProxyJump=none', '-o', 'BindInterface=' + args.interface, + args.peer, 'head -c 2097152 /dev/zero'], + capture_output=True, timeout=remaining) + except subprocess.TimeoutExpired: + raise SystemExit('FAIL: transfer timeout; stopped without retry') from None + if result.returncode or len(result.stdout) != size or hashlib.sha256(result.stdout).digest() != expected: + raise SystemExit('FAIL: SSH, size or digest check; stopped without retry') + print(f'ok - transfer {index + 1}/16: {size} bytes, SHA-256 verified', flush=True) From dc26f8f76724bfd93f0656dd449726a1a4fd34e6 Mon Sep 17 00:00:00 2001 From: Chris Gray Date: Wed, 11 Nov 2026 12:49:50 -0600 Subject: [PATCH 2/5] device/bluejay: record certified kernel revisions and remaining gates Refresh the review table after the November 11 signed replacements. Distinguish source/build results from the still-unbooted runtime stack and document the focused passive package coordination and migration dependency. Assisted-by: LLM --- device/bluejay/UPSTREAM.md | 42 +++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/device/bluejay/UPSTREAM.md b/device/bluejay/UPSTREAM.md index eb160196b..200e4ccc9 100644 --- a/device/bluejay/UPSTREAM.md +++ b/device/bluejay/UPSTREAM.md @@ -1,27 +1,41 @@ # Bluejay development source and review status -Status (2026-11-10): documentation split from [#543](https://github.com/derekross/omarchy-mobile/pull/543), now closed unmerged in favour of the split PRs below. +Status (2026-11-11): documentation split from [#543](https://github.com/derekross/omarchy-mobile/pull/543), now closed unmerged in favour of the split PRs below. The historical source below demonstrates one working development handset; it -is not a release installer. No code or device descriptor is changed by this -PR. Source-only instructions are not authority to run a phone operation. +is not a release installer. This status page changes no boot or hardware +policy. Source-only instructions are not authority to run a phone operation. ## Kernel topics in review | Topic | PR | Remaining work | | --- | --- | --- | -| NCM aggregation retry | [#225](https://github.com/derekross/linux-omarchy-mobile/pull/225) | Suspend handling revised; separate selftests and validate on the reference phone, including laptop sleep | +| NCM aggregation retry | [#225](https://github.com/derekross/linux-omarchy-mobile/pull/225) | Driver/selftest commits split; attended SSH profile in [mobile #666](https://github.com/derekross/omarchy-mobile/pull/666); reference phone and laptop-sleep qualification remain | | Retained-memory exclusions | [#226](https://github.com/derekross/linux-omarchy-mobile/pull/226) | Provenance and node naming addressed; passing CI, awaiting maintainer merge | -| GS101 PCIe/PHY | [#227](https://github.com/derekross/linux-omarchy-mobile/pull/227) | Power control and match data revised; explain single link try/history suppression and qualify a fresh 6a boot | -| BCM4389 bring-up | [#228](https://github.com/derekross/linux-omarchy-mobile/pull/228) | Cache DMA-size limit at probe, count size drops and keep chip-only bring-up separate | -| ALIX touch | [#229](https://github.com/derekross/linux-omarchy-mobile/pull/229) | Staging knobs removed; check reset-order header and qualify a fresh 6a boot | -| Disabled Wi-Fi DT | [#230](https://github.com/derekross/linux-omarchy-mobile/pull/230) | Merge after both #227 and #228, then rebase to its own two commits | +| GS101 PCIe/PHY | [#227](https://github.com/derekross/linux-omarchy-mobile/pull/227) | Power control, match data and single-try/failure-history-read rationale revised; qualify a fresh 6a boot | +| BCM4389 bring-up | [#228](https://github.com/derekross/linux-omarchy-mobile/pull/228) | Probe-time DMA-limit cache and oversized-TX completion/counter revised; chip-only diagnostics excluded; matched-stack phone trial remains | +| ALIX touch | [#229](https://github.com/derekross/linux-omarchy-mobile/pull/229) | Staging knobs removed and shared reset-order header checked; qualify a fresh 6a boot | +| Disabled Wi-Fi DT | [#230](https://github.com/derekross/linux-omarchy-mobile/pull/230) | Revised dependency stack refreshed; merge after #227 and #228, then rebase to its own two commits | | Trusty trace API | [#231](https://github.com/derekross/linux-omarchy-mobile/pull/231) | Merged 2026-11-09; no Trusty runtime claimed | The attended USB SSH transfer profile is `tools/ncm-transfer --peer root@ --interface `. It performs sixteen SHA-256-verified 2 MiB zero transfers with a shared 20-second deadline and no retry. Run it only after the device identity and storage checks pass; USB tracing is separately required to establish that aggregation retry was exercised. It does not test laptop sleep or USB replug. -All seven submitted heads passed CI. That is build/policy evidence, not -runtime qualification of the rebased stack. The tested source is the +The November 11 replacements for #225, #227, #228, #229 and #230 are based on +`fc7086a68fcaaed8960d09f1bdf6c51c9926c759` and were certified by the human +under DCO after source review. Signing preserves the reviewed source trees +and exact diffs. The common integration passes W=1 builds of seven touched C +files, ten Google device trees without new dtbs_check warnings, four binding +checks, policy and strict checkpatch without errors. New-file coverage +warnings and one continuation-alignment check remain disclosed in the PRs. +A complete Image, Bluejay DTB and 1,828 modules also build for +`7.3.0-rc6-omamobile-bluejay-review-20261111`; the full build has two format +warnings in unchanged AoC ALSA code. Matching dependency indexes and module +resolution pass. The revised build has not been installed or booted on the +phone. The PR checks show fresh published-head CI separately from these local +results and the earlier heads' passing CI. + +This is build/policy evidence, not runtime qualification of the rebased stack. +The tested source is the contributor's `bringup/bluejay-tested-20261108`, commit `c934e316b`, based on `29a7a9326bf0`; the tested release is `7.3.0-rc6-omamobile-bluejay-input-gated0`. @@ -37,12 +51,16 @@ which follows #562 for its matching root-ready marker. The planned Bluejay package builds on the passive first-light proposal [#346](https://github.com/derekross/omarchy-mobile/pull/346). Kernel-release pins, module hashes and experimental startup belong in `device/bluejay/bringup/` until their dependencies merge. No combined package -agreement with #346's author or new phone qualification is claimed here. +agreement with #346's author or passive-package phone migration is claimed here. +A focused [passive policy follow-up](https://github.com/latentoperator/omarchy-mobile/commit/ffb2c8c82f8d6c53e1beaa10f420537ca7890ee2) +is coordinated on that PR and requires #563 first. Its package fixtures and +aarch64 build pass; replacing the old active development package still needs +an explicit migration of the startup files it owns. The tested overlays, startup files, Aquamarine patch and probe tools remain inspectable at [the immutable #543 source](https://github.com/latentoperator/omarchy-mobile/tree/6ad4651f8ac151333345c72db99f1fd83259696f). The subsystem plans describe them historically; their relative file paths do -not imply that this documentation-only PR installs those files. The original +not imply that these status notes install those files. The original #543 is closed unmerged in favour of documentation [#561](https://github.com/derekross/omarchy-mobile/pull/561), initramfs #562, installer #563 and bring-up #565. From a736d4eb88323452d38dede90784896638e49135 Mon Sep 17 00:00:00 2001 From: Chris Gray Date: Fri, 13 Nov 2026 07:26:12 -0600 Subject: [PATCH 3/5] tools: use fresh pinned SSH for NCM transfers Use phone-ssh for identity, host-key and direct-interface settings. Report the failed transfer/check and SSH diagnostics, stop the SSH process group on timeout or interruption, and reject helper control tokens as interface names. Add offline fixtures covering successful transfers, early failures, settings, argument validation, deadlines and cancellation. The attached Bluejay also passed sixteen verified transfers on its historical kernel. --- device/bluejay/UPSTREAM.md | 12 ++-- tests/all | 2 + tests/ncm-transfer | 133 +++++++++++++++++++++++++++++++++++++ tools/ncm-transfer | 80 +++++++++++++++++----- 4 files changed, 202 insertions(+), 25 deletions(-) create mode 100755 tests/ncm-transfer diff --git a/device/bluejay/UPSTREAM.md b/device/bluejay/UPSTREAM.md index 200e4ccc9..201a213a9 100644 --- a/device/bluejay/UPSTREAM.md +++ b/device/bluejay/UPSTREAM.md @@ -18,12 +18,10 @@ policy. Source-only instructions are not authority to run a phone operation. | Disabled Wi-Fi DT | [#230](https://github.com/derekross/linux-omarchy-mobile/pull/230) | Revised dependency stack refreshed; merge after #227 and #228, then rebase to its own two commits | | Trusty trace API | [#231](https://github.com/derekross/linux-omarchy-mobile/pull/231) | Merged 2026-11-09; no Trusty runtime claimed | -The attended USB SSH transfer profile is `tools/ncm-transfer --peer root@ --interface `. It performs sixteen SHA-256-verified 2 MiB zero transfers with a shared 20-second deadline and no retry. Run it only after the device identity and storage checks pass; USB tracing is separately required to establish that aggregation retry was exercised. It does not test laptop sleep or USB replug. +The attended USB SSH transfer profile is `tools/ncm-transfer --peer root@ --interface `. It performs sixteen SHA-256-verified 2 MiB zero transfers with a shared 20-second deadline and no retry. Each transfer uses `tools/phone-ssh --fresh`, including its `OMAMOBILE_SSH_KEY` and `OMAMOBILE_SSH_KNOWN_HOSTS` settings. Direct interface binding defaults `OMAMOBILE_SSH_CONFIG` to `/dev/null`; an incompatible explicit config is refused. Failures name the transfer and failed check and include SSH's stderr. Run it only after the device identity and storage checks pass; USB tracing is separately required to establish that aggregation retry was exercised. It does not test laptop sleep or USB replug. -The November 11 replacements for #225, #227, #228, #229 and #230 are based on -`fc7086a68fcaaed8960d09f1bdf6c51c9926c759` and were certified by the human -under DCO after source review. Signing preserves the reviewed source trees -and exact diffs. The common integration passes W=1 builds of seven touched C +The November 11 integration was built on +`fc7086a68fcaaed8960d09f1bdf6c51c9926c759`. Its local checks passed W=1 builds of seven touched C files, ten Google device trees without new dtbs_check warnings, four binding checks, policy and strict checkpatch without errors. New-file coverage warnings and one continuation-alignment check remain disclosed in the PRs. @@ -31,8 +29,8 @@ A complete Image, Bluejay DTB and 1,828 modules also build for `7.3.0-rc6-omamobile-bluejay-review-20261111`; the full build has two format warnings in unchanged AoC ALSA code. Matching dependency indexes and module resolution pass. The revised build has not been installed or booted on the -phone. The PR checks show fresh published-head CI separately from these local -results and the earlier heads' passing CI. +phone at that build checkpoint. Current source revisions, review and CI belong +in the individual kernel PRs. This is build/policy evidence, not runtime qualification of the rebased stack. The tested source is the diff --git a/tests/all b/tests/all index 2979afca7..0aaa6eeb2 100755 --- a/tests/all +++ b/tests/all @@ -93,3 +93,5 @@ echo "# tests/chroot-extractors" tests/chroot-extractors echo "# tests/rootfs-smoke-link" # the smoke test's install-link checks, on small made-up images tests/rootfs-smoke-link +echo "# tests/ncm-transfer" +tests/ncm-transfer diff --git a/tests/ncm-transfer b/tests/ncm-transfer new file mode 100755 index 000000000..05ca28d77 --- /dev/null +++ b/tests/ncm-transfer @@ -0,0 +1,133 @@ +#!/bin/bash +# SPDX-License-Identifier: MIT +# Real phone-ssh settings with a stand-in ssh; no network or phone access. +set -euo pipefail +cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." +python3 - <<'PY' +import json +import os +from pathlib import Path +import runpy +import subprocess +import sys +import tempfile +from unittest.mock import MagicMock, patch + +tool = Path('tools/ncm-transfer').resolve() +with tempfile.TemporaryDirectory(prefix='ncm-transfer-') as scratch: + scratch = Path(scratch) + fake = scratch / 'ssh' + fake.write_text('''#!/usr/bin/env python3 +import json, os, sys +from pathlib import Path +log = Path(os.environ['NCM_TEST_LOG']) +with log.open('a') as f: + f.write(json.dumps(sys.argv[1:]) + '\\n') +mode = os.environ.get('NCM_TEST_MODE', 'ok') +if mode == 'third' and len(log.read_text().splitlines()) == 3: + mode = 'ssh' +if mode == 'ssh': + print('Host key verification failed (fixture)', file=sys.stderr) + sys.exit(255) +if mode == 'short': + sys.stdout.buffer.write(bytes(7)) +elif mode == 'digest': + sys.stdout.buffer.write(b'x' * 2097152) +else: + sys.stdout.buffer.write(bytes(2097152)) +''') + fake.chmod(0o755) + key = scratch / 'key with spaces' + known = scratch / 'known hosts' + key.write_text('fixture key\n') + known.write_text('fixture host key\n') + log = scratch / 'calls' + env = {k: v for k, v in os.environ.items() if not k.startswith('OMAMOBILE_SSH_')} + env.update(PATH=str(scratch) + os.pathsep + env['PATH'], NCM_TEST_LOG=str(log), + OMAMOBILE_SSH_KEY=str(key), OMAMOBILE_SSH_KNOWN_HOSTS=str(known), + OMAMOBILE_SSH_HOST_KEY_ALIAS='phone-fixture', OMAMOBILE_SSH_SHARE='1') + args = ['--peer', 'root@192.0.2.1', '--interface', 'usb-fixture'] + + def invoke(mode='ok', cli=None, extra=None): + log.unlink(missing_ok=True) + result = subprocess.run([str(tool), *(args if cli is None else cli)], + env=dict(env, NCM_TEST_MODE=mode, **(extra or {})), + capture_output=True, text=True, timeout=25) + calls = [json.loads(line) for line in log.read_text().splitlines()] if log.exists() else [] + return result, calls + + result, calls = invoke() + assert result.returncode == 0, result.stderr + assert len(calls) == 16 and result.stdout.count('SHA-256 verified') == 16 + for call in calls: + for option in ('ControlMaster=no', 'ControlPath=none', 'StrictHostKeyChecking=yes', + 'HostKeyAlias=phone-fixture', 'ConnectTimeout=5', str(key), + 'UserKnownHostsFile="' + str(known) + '"', '/dev/null', + 'root@192.0.2.1', 'head -c 2097152 /dev/zero'): + assert option in call, (option, call) + proxy, = (x for x in call if x.startswith('ProxyCommand=')) + assert '--relay usb-fixture 192.0.2.1 5' in proxy, proxy + assert 'ControlMaster=auto' not in call + print('ok - sixteen verified transfers use fresh pinned phone-ssh settings and interface binding') + + for mode, diagnostic in [('ssh', 'phone-ssh exited 255'), ('short', 'received 7'), + ('digest', 'SHA-256 mismatch'), ('third', 'transfer 3/16')]: + result, calls = invoke(mode) + assert result.returncode != 0 and diagnostic in result.stderr, result + assert len(calls) == (3 if mode == 'third' else 1), calls + if mode in ('ssh', 'third'): + assert 'Host key verification failed (fixture)' in result.stderr + print('ok - ' + mode + ' names the failed check and stops without retry') + + for cli in ([], ['--peer', 'root@192.0.2.1'], + ['--peer=-V', '--interface', 'usb-fixture'], + ['--peer', 'root@192.0.2.1', '--interface=-V'], + ['--peer', 'root@192.0.2.1', '--interface', 'off'], + ['--peer', 'root@192.0.2.1', '--interface', 'auto'], + ['--peer', 'root@192.0.2.1', '--interface', 'x' * 16]): + result, calls = invoke(cli=cli) + assert result.returncode == 2 and not calls, result + print('ok - missing and invalid arguments fail before SSH') + + result, calls = invoke(extra={'OMAMOBILE_SSH_CONFIG': str(scratch / 'explicit config')}) + assert result.returncode != 0 and not calls + assert 'requires explicit OMAMOBILE_SSH_CONFIG=/dev/null' in result.stderr + print('ok - incompatible explicit SSH config is diagnosed, never ignored') + + # Exercise the shared deadline without waiting 20 seconds or opening a process. + for times, timeout in [([0, 21], False), ([0, 1], True)]: + process = MagicMock() + process.pid = 123456 + process.communicate.side_effect = [subprocess.TimeoutExpired('fixture', 19), (b'', b'timeout fixture')] + with patch.object(sys, 'argv', [str(tool), *args]), \ + patch('time.monotonic', side_effect=times), \ + patch('subprocess.Popen') as popen, patch('os.killpg') as killpg: + popen.return_value.__enter__.return_value = process + try: + runpy.run_path(str(tool), run_name='__main__') + raise AssertionError('deadline did not stop the stage') + except SystemExit as error: + assert '20-second stage deadline' in str(error), error + assert popen.call_count == int(timeout) + if timeout: + assert popen.call_args.kwargs['start_new_session'] is True + assert process.communicate.call_args_list[0].kwargs['timeout'] == 19 + killpg.assert_called_once_with(process.pid, 9) + else: + killpg.assert_not_called() + print('ok - elapsed stage deadline and transfer timeout both stop immediately') + + process = MagicMock() + process.pid = 123456 + process.communicate.side_effect = [KeyboardInterrupt(), (b'', b'')] + with patch.object(sys, 'argv', [str(tool), *args]), \ + patch('subprocess.Popen') as popen, patch('os.killpg') as killpg: + popen.return_value.__enter__.return_value = process + try: + runpy.run_path(str(tool), run_name='__main__') + raise AssertionError('interrupt did not stop the stage') + except KeyboardInterrupt: + pass + killpg.assert_called_once_with(process.pid, 9) + print('ok - interruption stops the SSH process group before exiting') +PY diff --git a/tools/ncm-transfer b/tools/ncm-transfer index e2003bb48..4e41c8239 100755 --- a/tools/ncm-transfer +++ b/tools/ncm-transfer @@ -1,8 +1,11 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: GPL-2.0 +# SPDX-License-Identifier: MIT """Pull 16 exact 2 MiB zero streams over an explicitly selected USB SSH link. Example: tools/ncm-transfer --peer root@ --interface +Uses phone-ssh --fresh and its OMAMOBILE_SSH_* identity and host-key settings. +Direct interface binding defaults OMAMOBILE_SSH_CONFIG to /dev/null; an +explicit incompatible config is refused by phone-ssh rather than ignored. The peer needs head and SSH. No device files or partitions are modified. No retries: the first timeout, SSH error, size or digest mismatch stops the run. Run only after the device's read-only identity and storage-guard checks pass. @@ -11,37 +14,78 @@ whether a full request pool exercised the aggregation retry. """ import argparse import hashlib +import os import re +import signal import subprocess +import sys import time +from pathlib import Path parser = argparse.ArgumentParser(description=__doc__) -parser.add_argument('--peer') -parser.add_argument('--interface') +parser.add_argument('--peer', required=True) +parser.add_argument('--interface', required=True) args = parser.parse_args() -if not args.peer or not args.interface: - print('SKIP: --peer and --interface required for an authorized USB test') - raise SystemExit(4) if not re.fullmatch(r'[A-Za-z0-9_][A-Za-z0-9_.:@-]*', args.peer): parser.error('invalid SSH peer') -if not re.fullmatch(r'[A-Za-z0-9_][A-Za-z0-9_.:-]*', args.interface): +if args.interface in ('off', 'auto') or not re.fullmatch(r'[A-Za-z0-9][A-Za-z0-9_.:-]{0,14}', args.interface): parser.error('invalid host interface') +ssh = Path(__file__).resolve().with_name('phone-ssh') +env = dict(os.environ, OMAMOBILE_SSH_HOST=args.peer, + OMAMOBILE_SSH_INTERFACE=args.interface, SSH_ASKPASS_REQUIRE='never') +env.setdefault('OMAMOBILE_SSH_CONFIG', '/dev/null') +env.setdefault('OMAMOBILE_SSH_CONNECT_TIMEOUT', '5') + + +def fail(message, stderr=b''): + if stderr: + print(stderr.decode(errors='replace').rstrip(), file=sys.stderr) + raise SystemExit(f'FAIL: transfer {index + 1}/16: {message}; stopped without retry') + + +def stop_transfer(process): + try: + os.killpg(process.pid, signal.SIGKILL) + except ProcessLookupError: + pass + return process.communicate() + + +def interrupted(signum, _frame): + raise SystemExit(128 + signum) + + +for signum in (signal.SIGTERM, signal.SIGHUP): + signal.signal(signum, interrupted) + + size = 2 * 1024 * 1024 expected = hashlib.sha256(bytes(size)).digest() deadline = time.monotonic() + 20 for index in range(16): remaining = deadline - time.monotonic() if remaining <= 0: - raise SystemExit('FAIL: 20-second stage deadline; stopped without retry') + fail('20-second stage deadline') try: - result = subprocess.run(['ssh', '-o', 'BatchMode=yes', '-o', 'ConnectionAttempts=1', - '-o', 'ConnectTimeout=5', '-o', 'ControlMaster=no', - '-o', 'ControlPath=none', '-o', 'ProxyCommand=none', - '-o', 'ProxyJump=none', '-o', 'BindInterface=' + args.interface, - args.peer, 'head -c 2097152 /dev/zero'], - capture_output=True, timeout=remaining) - except subprocess.TimeoutExpired: - raise SystemExit('FAIL: transfer timeout; stopped without retry') from None - if result.returncode or len(result.stdout) != size or hashlib.sha256(result.stdout).digest() != expected: - raise SystemExit('FAIL: SSH, size or digest check; stopped without retry') + # No controlling terminal or interactive key prompt, and a timeout + # stops the SSH proxy as well as SSH itself. + with subprocess.Popen([str(ssh), '--fresh', 'head -c 2097152 /dev/zero'], + stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, + stderr=subprocess.PIPE, env=env, start_new_session=True) as process: + try: + output, errors = process.communicate(timeout=remaining) + except subprocess.TimeoutExpired: + output, errors = stop_transfer(process) + fail('transfer timeout within 20-second stage deadline', errors) + except BaseException: + stop_transfer(process) + raise + except OSError as error: + fail(f'could not start phone-ssh: {error}') + if process.returncode: + fail(f'phone-ssh exited {process.returncode}', errors) + if len(output) != size: + fail(f'size mismatch: expected {size} bytes, received {len(output)}', errors) + if hashlib.sha256(output).digest() != expected: + fail('SHA-256 mismatch', errors) print(f'ok - transfer {index + 1}/16: {size} bytes, SHA-256 verified', flush=True) From 69d48168d3efc511eba046953d851cc82fafc752 Mon Sep 17 00:00:00 2001 From: Chris Gray Date: Sat, 14 Nov 2026 09:34:39 -0600 Subject: [PATCH 4/5] device/bluejay: correct passive package coordination status The boot-update.conf ownership follow-up was not accepted on #346. Keep the package passive and describe the attended migration and smoke report that still gate it. Assisted-by: OpenAI Codex --- device/bluejay/UPSTREAM.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/device/bluejay/UPSTREAM.md b/device/bluejay/UPSTREAM.md index 201a213a9..fe373a4f1 100644 --- a/device/bluejay/UPSTREAM.md +++ b/device/bluejay/UPSTREAM.md @@ -50,10 +50,10 @@ Bluejay package builds on the passive first-light proposal [#346](https://github Kernel-release pins, module hashes and experimental startup belong in `device/bluejay/bringup/` until their dependencies merge. No combined package agreement with #346's author or passive-package phone migration is claimed here. -A focused [passive policy follow-up](https://github.com/latentoperator/omarchy-mobile/commit/ffb2c8c82f8d6c53e1beaa10f420537ca7890ee2) -is coordinated on that PR and requires #563 first. Its package fixtures and -aarch64 build pass; replacing the old active development package still needs -an explicit migration of the startup files it owns. +A proposed follow-up that would make the package own `boot-update.conf` +was not taken; #346 stays passive. Replacing the old active development +package still needs an attended migration of the startup files it owns +and a smoke report with the passive package installed. The tested overlays, startup files, Aquamarine patch and probe tools remain inspectable at [the immutable #543 source](https://github.com/latentoperator/omarchy-mobile/tree/6ad4651f8ac151333345c72db99f1fd83259696f). From d891c66def3858676a751c2a1d54f7d55582625a Mon Sep 17 00:00:00 2001 From: Chris Gray Date: Sat, 14 Nov 2026 11:33:02 -0600 Subject: [PATCH 5/5] tests: keep the NCM transfer suite beside SSH checks Keep this host SSH transport test beside tests/phone-ssh rather than at the append-only tail, where new upstream suites repeatedly conflict with it. Retain all upstream test entries. Assisted-by: OpenAI Codex --- tests/all | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/all b/tests/all index 0aaa6eeb2..3980d1eb2 100755 --- a/tests/all +++ b/tests/all @@ -75,6 +75,8 @@ fi python3 tests/bluejay-root-ready.py echo "# tests/phone-ssh" tests/phone-ssh +echo "# tests/ncm-transfer" +tests/ncm-transfer echo "# tests/module-load-once" tests/module-load-once # One suite per line from here on, so two pull requests that each add one @@ -93,5 +95,3 @@ echo "# tests/chroot-extractors" tests/chroot-extractors echo "# tests/rootfs-smoke-link" # the smoke test's install-link checks, on small made-up images tests/rootfs-smoke-link -echo "# tests/ncm-transfer" -tests/ncm-transfer