diff --git a/.github/native/hosted_native.py b/.github/native/hosted_native.py
new file mode 100644
index 000000000..c3b98795d
--- /dev/null
+++ b/.github/native/hosted_native.py
@@ -0,0 +1,852 @@
+#!/usr/bin/env python3
+"""Disposable hosted smoke harness; only allowlisted metadata leaves the runner.
+
+Native and Maestro output stays under RUNNER_TEMP, never in an uploaded glob.
+The gate trusts protected workflow/job provenance, never this writable artifact.
+"""
+
+import hashlib
+import json
+import os
+from pathlib import Path
+import platform
+import re
+import shutil
+import signal
+import subprocess
+import sys
+import tempfile
+import time
+import urllib.request
+import xml.etree.ElementTree as ET
+
+
+ROOT = Path(__file__).resolve().parents[2]
+PLATFORM = os.environ.get('KEEPER_NATIVE_PLATFORM', '')
+PRIVATE = Path(os.environ.get('RUNNER_TEMP', tempfile.gettempdir())) / 'keeper-native-private'
+EVIDENCE = ROOT / 'artifacts' / 'native' / PLATFORM.lower() / 'metadata.json'
+MAESTRO_VERSION = 'cli-2.11.0'
+MAESTRO_SHA256 = '5384593cb4e7a106489e75a821d157dd43f4e438df6bc308b72e82c685e1283a'
+APP_IDS = {'IOS': 'io.hexawallet.hexakeeper.dev', 'ANDROID': 'io.hexawallet.keeper.development'}
+
+
+def save(data):
+ EVIDENCE.parent.mkdir(parents=True, exist_ok=True)
+ EVIDENCE.write_text(json.dumps(data, indent=2) + '\n')
+
+
+def read():
+ return json.loads(EVIDENCE.read_text())
+
+
+def failure_details(log):
+ """Bounded tool errors from this fresh CI fixture, never raw process logs."""
+ selected = []
+ for line in log.splitlines():
+ line = re.split(r'\b(?:UI\s+hierarchy|View\s+hierarchy|credentials?)\s*[:=]',
+ line, maxsplit=1, flags=re.IGNORECASE)[0].rstrip()
+ if re.match(r'^\s*\d+\s*\|', line):
+ continue
+ if not re.search(r'(?:\berror:|^error |^e: |^\[!\]|^FAILURE:|^> (?!Task\b)|^Caused by:|^Could not |'
+ r'^A problem occurred|^Execution failed|^The sandbox is not in sync)', line):
+ continue
+ line = re.sub(r'https?://\S+', '[URL]', line)
+ line = re.sub(r'(?i)\b(password|token|secret|api[_-]?key|authorization)\s*[:=]\s*\S+',
+ r'\1=[REDACTED]', line)
+ line = re.sub(r'(?i)\bBearer\s+\S+', 'Bearer [REDACTED]', line)
+ line = re.sub(r'\b[a-fA-F0-9]{24,}\b', '[HEX]', line)
+ line = re.sub(r'/Users/[^/\s]+', '/Users/[runner]', line)
+ selected.append(line[:500])
+ if len(selected) == 20:
+ break
+ return selected
+
+
+def maestro_failure_details(log):
+ """Retain only this flow's fixed commands and bounded tool failure messages."""
+ selected = []
+ for raw in log.splitlines():
+ line = re.sub(r'\x1b\[[0-9;]*[A-Za-z]', '', raw).strip()
+ if line.endswith('FAILED'):
+ if line.startswith(('Launch app', 'Clear state', 'Stop app')) and any(app in line for app in APP_IDS.values()):
+ selected.append('Maestro app launch/stop command FAILED')
+ elif line.startswith(('Assert', 'Wait')) and 'Create a passcode' in line:
+ selected.append('Maestro assertion: Create a passcode visible FAILED')
+ elif line.startswith(('Assert', 'Wait')) and 'Confirm your passcode' in line:
+ selected.append('Maestro assertion: Confirm your passcode state FAILED')
+ elif line.startswith('Tap on'):
+ match = re.search(r'\bkey_[1-4]\b', line)
+ if match:
+ selected.append('Maestro tap %s FAILED' % match.group())
+ elif line.startswith(('Assertion is false:', 'Element not found:')):
+ # Emit only a category and fixed selector; even a first-line suffix
+ # can contain a hierarchy or arbitrary device text.
+ category = 'assertion failed' if line.startswith('Assertion is false:') else 'element not found'
+ for target in ['Create a passcode', 'Confirm your passcode', 'key_1', 'key_2', 'key_3', 'key_4']:
+ if target in line:
+ selected.append('Maestro %s: %s' % (category, target))
+ break
+ elif line.startswith(('Unable to launch app', 'Failed to launch app', 'Unable to connect',
+ 'Failed to connect', 'Failed to start', 'No devices found',
+ 'No connected devices', 'Unable to find device')):
+ selected.extend(failure_details('error: Maestro ' + line))
+ if len(selected) >= 10:
+ break
+ return list(dict.fromkeys(selected))[:10]
+
+
+def android_startup_errors(log):
+ selected = []
+ for line in log.splitlines():
+ match = re.match(r'^[EF]/(AndroidRuntime|ReactNativeJS|ReactNative)\s*\(\s*\d+\):\s*(.*)', line)
+ if not match:
+ continue
+ tag, message = match.groups()
+ if re.search(r'(?:FATAL EXCEPTION|Caused by:|\b[\w.$]*(?:Exception|Error)\b|'
+ r'Invariant Violation|Unable to load script|Could not)', message):
+ selected.append('error: %s %s' % (tag, message))
+ return failure_details('\n'.join(selected))
+
+
+def metro_startup_errors(log):
+ selected = []
+ for raw in log.splitlines():
+ line = re.sub(r'\x1b\[[0-9;]*[A-Za-z]', '', raw).strip()
+ if re.match(r'^(?:error\b|(?:Syntax|Type|Reference)Error:|Unable to resolve module)', line, re.IGNORECASE):
+ selected.append('error: Metro ' + line)
+ return failure_details('\n'.join(selected))
+
+
+def metro_startup_progress(log):
+ # Metro's TerminalReporter uses the same bare BUNDLE line for done and
+ # failed builds. Count observed markers without inferring completion.
+ lines = [re.sub(r'\x1b\[[0-9;]*[A-Za-z]', '', line).strip() for line in log.splitlines()]
+ bundles = sum(bool(re.match(r'^BUNDLE\s', line)) for line in lines)
+ prebundles = sum(bool(re.match(r'^PREBUNDLE\s', line)) for line in lines)
+ return {'bundle_marker_observed': bundles > 0, 'bundle_marker_count': bundles,
+ 'prebundle_marker_count': prebundles}
+
+
+def private_log_prefix(path):
+ """Read launch-time output, discarding a partially truncated final record."""
+ limit = 1024 * 1024
+ with path.open('rb') as source:
+ payload = source.read(limit + 1)
+ truncated = len(payload) > limit
+ payload = payload[:limit]
+ if truncated:
+ payload = payload.rsplit(b'\n', 1)[0] + b'\n' if b'\n' in payload else b''
+ return payload.decode(errors='replace'), truncated
+
+
+def ios_startup_diagnostics(payload, executable):
+ if not re.fullmatch(r'[A-Za-z0-9_][A-Za-z0-9_.-]*', executable):
+ raise ValueError('Unsafe iOS executable selector.')
+ # log(1) compact: ISO timestamp, abbreviated type, process[PID:TID], message.
+ # Only prefixed own-process records qualify; never retain continuation lines.
+ pattern = re.compile(r'^\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}:\d{2}(?:\.\d+)?'
+ r'(?:[+-]\d{2}:?\d{2}|Z)?\s+(\S+)\s+'
+ r'([A-Za-z0-9_.-]+)\[\d+:[A-Fa-f0-9x]+\]\s+(.*)$')
+ selected = []
+ matched = 0
+ for line in payload.splitlines():
+ match = pattern.match(line)
+ if not match:
+ continue
+ severity, process, message = match.groups()
+ if process != executable:
+ continue
+ matched += 1
+ if severity.lower() in ['e', 'f', 'er', 'ft', 'error', 'fault'] or re.search(
+ r'(?:\b(?:error|exception|fatal)\b|\b[\w.$]*(?:Exception|Error)\b)',
+ message, re.IGNORECASE):
+ selected.append('error: iOS ' + message)
+ return {'format': 'compact', 'matching_process_records': matched,
+ 'errors': failure_details('\n'.join(selected))}
+
+
+def startup_hierarchy_signals(directory):
+ """Classify fixed public startup selectors; never export hierarchy content."""
+ # Maestro cli-2.11.0 writes standalone TreeNode snapshots in this layout.
+ flags = ['createPIN', 'confirmPIN', 'RNredbox', 'noScriptURL',
+ 'developmentServerError', 'unableLoadScript']
+ result = {flag: False for flag in flags}
+ result.update({'snapshot_count': 0, 'parse_error_types': []})
+ redbox_ids = {'redbox-error', 'redbox-dismiss', 'redbox-reload', 'rn_redbox_stack',
+ 'rn_redbox_dismiss_button', 'rn_redbox_reload_button', 'catalyst_redbox_title'}
+ fixed_messages = {'noScriptURL': 'No script URL provided.',
+ 'developmentServerError': 'Could not connect to development server.',
+ 'unableLoadScript': 'Unable to load script.'}
+ for index, path in enumerate(directory.glob('**/screen-hierarchy/step-*.json')):
+ try:
+ if index >= 8:
+ raise ValueError('Hierarchy snapshot count exceeded limit.')
+ result['snapshot_count'] += 1
+ if path.is_symlink() or not path.resolve().is_relative_to(directory.resolve()):
+ raise ValueError('Hierarchy snapshot must remain in private output.')
+ with path.open('rb') as source:
+ payload = source.read(1024 * 1024 + 1)
+ if len(payload) > 1024 * 1024:
+ raise ValueError('Hierarchy snapshot exceeded byte limit.')
+ pending = [json.loads(payload)]
+ snapshot = {flag: False for flag in flags}
+ nodes = 0
+ while pending:
+ node = pending.pop()
+ nodes += 1
+ if nodes > 10000:
+ raise ValueError('Hierarchy snapshot exceeded node limit.')
+ if not isinstance(node, dict):
+ raise TypeError('Unexpected hierarchy node format.')
+ attributes = node.get('attributes') or {}
+ children = node.get('children') or []
+ if not isinstance(attributes, dict) or not isinstance(children, list):
+ raise TypeError('Unexpected hierarchy attributes or children format.')
+ # iOS StaticText often exposes only accessibilityText. Android
+ # resource IDs include the package prefix before :id/.
+ identifier = attributes.get('resource-id', '')
+ if isinstance(identifier, str) and identifier.rsplit(':id/', 1)[-1] in redbox_ids:
+ snapshot['RNredbox'] = True
+ for key in ['accessibilityText', 'text', 'title', 'value']:
+ value = attributes.get(key)
+ if not isinstance(value, str):
+ continue
+ snapshot['createPIN'] |= value.strip() == 'Create a passcode'
+ snapshot['confirmPIN'] |= value.strip() == 'Confirm your passcode'
+ for flag, message in fixed_messages.items():
+ snapshot[flag] |= message in value
+ if len(pending) + len(children) + nodes > 10000:
+ raise ValueError('Hierarchy snapshot exceeded node limit.')
+ pending.extend(children)
+ for flag in flags:
+ result[flag] |= snapshot[flag]
+ except Exception as error:
+ kind = type(error).__name__
+ if kind not in result['parse_error_types']:
+ result['parse_error_types'].append(kind)
+ if index >= 8:
+ break
+ return result
+
+
+def maestro_preflight_diagnostics(directory=None, command_label='Assert startup and disposable passcode transition'):
+ """Export fixed cli-2.11.0 driver markers, never subprocess error text."""
+ markers = {
+ 'runner_install_started': '[Start] Install XCUITest runner on',
+ 'runner_install_launch_returned': '[Done] Install XCUITest runner on',
+ 'status_check_started': '[Start] Perform XCUITest driver status check on',
+ 'status_response_received': '[Done] Perform XCUITest driver status check on',
+ 'status_check_failed': '[Failed] Perform XCUITest driver status check on',
+ 'driver_startup_timeout': 'iOS driver not ready in time, consider increasing timeout by configuring MAESTRO_DRIVER_STARTUP_TIMEOUT env variable',
+ 'prebuilt_driver_selected': 'Installing pre built driver without xcodebuild',
+ 'xcodebuild_driver_selected': 'Installing driver with xcodebuild',
+ 'xctestrun_config_missing': 'xctestrun config does not exist',
+ 'ui_test_runner_missing': 'ui test runner does not exist',
+ 'xcode_test_execute_failed': '** TEST EXECUTE FAILED **',
+ 'xcode_test_failed': '** TEST FAILED **',
+ 'xcode_testing_failed': 'Testing failed:',
+ }
+ # The install/status "Done" markers precede readiness evaluation; they do
+ # not prove that the runner installed successfully or became ready.
+ result = {name: False for name in markers}
+ result.update({'host_port_unavailable': False, 'requested_device_disconnected': False,
+ 'exception_types': [], 'logs_read': 0, 'truncated_logs': 0,
+ 'log_limit_reached': False, 'collection_error_types': []})
+ known_types = ['IOSDriverTimeoutException', 'FileNotFoundException', 'CliError',
+ 'IllegalStateException', 'IOException', 'ConnectException',
+ 'SocketTimeoutException', 'TimeoutException', 'RuntimeException',
+ 'UnknownHostException', 'SSLHandshakeException']
+ paths = []
+ for index, entry in enumerate(read()['commands'], 1):
+ if entry['label'] == command_label:
+ paths.append(PRIVATE / ('command-%03d.log' % index))
+ directory = directory if directory is not None else PRIVATE / 'maestro-output'
+ if not directory.resolve().is_relative_to(PRIVATE.resolve()):
+ raise ValueError('Maestro diagnostic directory must remain private.')
+ for pattern in ['**/maestro.log', '**/xctest_runner_*.log']:
+ for path in directory.glob(pattern):
+ paths.append(path)
+ if len(paths) > 6:
+ break
+ if len(paths) > 6:
+ break
+ for path in paths[:6]:
+ try:
+ if path.is_symlink() or not path.resolve().is_relative_to(PRIVATE.resolve()):
+ raise ValueError('Maestro log must remain in private output.')
+ payload, truncated = private_log_prefix(path)
+ result['logs_read'] += 1
+ result['truncated_logs'] += int(truncated)
+ for name, marker in markers.items():
+ result[name] |= marker in payload
+ for line in payload.splitlines():
+ result['host_port_unavailable'] |= ('Requested driver host port ' in line
+ and ' is not available' in line)
+ result['requested_device_disconnected'] |= (' was requested, but it is not connected.' in line)
+ for kind in known_types:
+ if re.search(r'(? 6
+ return result
+
+
+def record_startup_failure(report, device):
+ """Collect bounded diagnostics before destroying this job's fresh app state."""
+ details = {'scope': 'Fresh startup only; no account or persisted PIN created.',
+ 'collection_errors': []}
+
+ def collect(name, action):
+ try:
+ details[name] = action()
+ except Exception as error:
+ details['collection_errors'].append({'stage': name, 'error_type': type(error).__name__})
+
+ def private_text(path):
+ # No raw logs/reports are copied to the artifact directory.
+ with path.open('rb') as source:
+ source.seek(0, os.SEEK_END)
+ source.seek(max(0, source.tell() - 1024 * 1024))
+ return source.read().decode(errors='replace')
+
+ def maestro_details():
+ result = {'failed_commands': [], 'testcase_failures': [], 'report': 'MISSING'}
+ for index, entry in enumerate(read()['commands'], 1):
+ if entry['label'] == 'Assert startup and disposable passcode transition':
+ result['failed_commands'] = maestro_failure_details(private_text(PRIVATE / ('command-%03d.log' % index)))
+ if report.exists():
+ if report.stat().st_size > 1024 * 1024:
+ raise RuntimeError('Maestro report exceeded diagnostic size limit.')
+ suite = ET.parse(report).getroot()
+ result['report'] = 'PRESENT'
+ result['testcase_statuses'] = [case.get('status') if case.get('status') in
+ ['SUCCESS', 'ERROR', 'WARNING', 'SKIPPED'] else 'UNKNOWN'
+ for case in list(suite.iter('testcase'))[:10]]
+ for failure in list(suite.iter('failure'))[:10]:
+ # Pinned Maestro JUnit stores failure.message separately from UI hierarchy.
+ first_line = ''.join(failure.itertext()).splitlines()[:1]
+ result['testcase_failures'].extend(maestro_failure_details('\n'.join(first_line)))
+ return result
+
+ collect('maestro', maestro_details)
+ collect('maestro_preflight', maestro_preflight_diagnostics)
+ collect('hierarchy_signals', lambda: startup_hierarchy_signals(PRIVATE / 'maestro-output'))
+ collect('metro_errors', lambda: metro_startup_errors(private_text(PRIVATE / 'metro.log')))
+ collect('metro_progress', lambda: metro_startup_progress(private_log_prefix(PRIVATE / 'metro.log')[0]))
+ if PLATFORM == 'ANDROID' and device:
+ def android_details():
+ args = ['adb', '-s', device, 'logcat', '-d', '-t', '300', '-v', 'brief',
+ 'AndroidRuntime:E', 'ReactNativeJS:E', 'ReactNative:E', '*:S']
+ path = PRIVATE / 'android-startup-errors.log'
+ with path.open('wb') as output:
+ try:
+ result = subprocess.run(args, stdout=output, stderr=subprocess.STDOUT,
+ timeout=20, check=False)
+ code = result.returncode
+ except subprocess.TimeoutExpired:
+ code = 124
+ return {'command': args, 'exit_code': code,
+ 'errors': android_startup_errors(private_text(path)) if code == 0 else []}
+ collect('android_errors', android_details)
+ elif PLATFORM == 'IOS' and device:
+ def ios_details():
+ executable = read()['built_artifact']['executable']
+ if not re.fullmatch(r'[A-Za-z0-9_][A-Za-z0-9_.-]*', executable):
+ raise ValueError('Unsafe iOS executable selector.')
+ predicate = ('process == "%s" AND (messageType == "error" OR messageType == "fault" '
+ 'OR eventMessage CONTAINS[c] "error" OR eventMessage CONTAINS[c] "exception" '
+ 'OR eventMessage CONTAINS[c] "fatal")') % executable
+ args = ['xcrun', 'simctl', 'spawn', device, 'log', 'show', '--style', 'compact',
+ '--last', '10m', '--predicate', predicate]
+ path = PRIVATE / 'ios-startup-errors.log'
+ # Keep log/xcrun notices private and separate from compact records.
+ with path.open('wb') as output, (PRIVATE / 'ios-startup-errors-stderr.log').open('wb') as stderr:
+ try:
+ result = subprocess.run(args, stdout=output, stderr=stderr,
+ timeout=25, check=False)
+ code = result.returncode
+ except subprocess.TimeoutExpired:
+ code = 124
+ result = {'command': args, 'exit_code': code, 'errors': []}
+ if code == 0:
+ try:
+ payload, truncated = private_log_prefix(path)
+ result.update(ios_startup_diagnostics(payload, executable))
+ result['input_truncated'] = truncated
+ except (ValueError, TypeError) as error:
+ result['parse_error'] = type(error).__name__
+ return result
+ collect('ios_errors', ios_details)
+ data = read()
+ data['startup_diagnostics'] = details
+ save(data)
+ print('Bounded startup diagnostics: ' + json.dumps(details), flush=True)
+
+
+def command(args, label, timeout=120, cwd=ROOT, capture=False, error_details=True):
+ """Record exact nonsecret argv and status; keep all process output private."""
+ PRIVATE.mkdir(parents=True, exist_ok=True)
+ data = read()
+ entry = {'label': label, 'command': args, 'timeout_seconds': timeout}
+ data['commands'].append(entry)
+ save(data)
+ started = time.monotonic()
+ output_file = PRIVATE / ('command-%03d.log' % len(data['commands']))
+ print(label, flush=True)
+ try:
+ with output_file.open('wb') as output:
+ proc = subprocess.Popen(args, cwd=cwd, stdout=output, stderr=subprocess.STDOUT,
+ start_new_session=True)
+ try:
+ code = proc.wait(timeout=timeout)
+ except subprocess.TimeoutExpired:
+ os.killpg(proc.pid, signal.SIGKILL)
+ proc.wait()
+ code = 124
+ except OSError:
+ code = 127
+ entry['exit_code'] = code
+ entry['duration_seconds'] = round(time.monotonic() - started, 1)
+ if code:
+ # Fixed diagnostics expose install blockers without publishing arbitrary logs.
+ log = output_file.read_text(errors='replace') if output_file.exists() else ''
+ known = {
+ 'lockfile needs to be updated': 'Manifest and yarn.lock are inconsistent; repair the lockfile separately.',
+ 'could not find compatible versions': 'The native dependency lock is incompatible with the manifest.',
+ 'no space left on device': 'The hosted runner ran out of disk space.',
+ 'command not found': 'A required native tool is unavailable.',
+ 'requires a higher minimum deployment target': 'A pod requires a higher iOS deployment target.',
+ }
+ entry['diagnostic'] = next((message for needle, message in known.items()
+ if needle in log.lower()), 'Inspect this command locally; private raw output was not retained.')
+ entry['redacted_tool_errors'] = failure_details(log) if error_details else []
+ for line in entry['redacted_tool_errors']:
+ print(line, flush=True)
+ save(data)
+ raise RuntimeError('%s failed (exit %s). %s' % (label, code, entry['diagnostic']))
+ save(data)
+ return output_file.read_text(errors='replace').strip() if capture else None
+
+
+def record():
+ source = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=ROOT, text=True).strip()
+ if source != os.environ.get('KEEPER_SOURCE_SHA'):
+ raise RuntimeError('Checkout does not match the exact requested PR head.')
+ save({
+ 'schema': 1, 'platform': PLATFORM, 'source_sha': source,
+ 'workflow_ref': os.environ.get('GITHUB_WORKFLOW_REF'),
+ 'workflow_sha': os.environ.get('GITHUB_WORKFLOW_SHA'),
+ 'run_id': os.environ.get('GITHUB_RUN_ID'), 'run_attempt': os.environ.get('GITHUB_RUN_ATTEMPT'),
+ 'runner': {key: os.environ.get(key) for key in
+ ['RUNNER_OS', 'RUNNER_ARCH', 'ImageOS', 'ImageVersion']},
+ 'os': platform.platform(), 'commands': [], 'build': 'NOT RUN', 'smoke': 'NOT RUN',
+ 'hardware': 'NOT RUN', 'signing': 'NOT RUN', 'app_id': APP_IDS[PLATFORM],
+ 'smoke_scope': 'Fresh install; render Create a passcode; type four disposable digits; assert Confirm your passcode; stop before persisting credentials.',
+ 'startup_timing_scope': 'Bounded cold development bundle/startup allowance; no release performance acceptance.',
+ 'artifact_policy': 'Metadata only. No raw logs, screenshots, app binaries, simulator data or credentials.',
+ })
+ versions = {
+ 'node': command(['node', '--version'], 'Record Node version', capture=True),
+ 'java': command(['java', '-version'], 'Record Java version', capture=True),
+ }
+ if PLATFORM == 'IOS':
+ versions['xcode'] = command(['xcodebuild', '-version'], 'Record Xcode version', capture=True)
+ versions['sdk'] = command(['xcrun', '--sdk', 'iphonesimulator', '--show-sdk-version'],
+ 'Record iOS Simulator SDK', capture=True)
+ else:
+ versions['expected_sdk_build'] = 'compileSdk=36; buildTools=35.0.0; NDK=27.1.12297006'
+ versions['expected_emulator_target'] = 'Android API 35; google_apis; x86_64; pixel_6'
+ data = read()
+ data['toolchain'] = versions
+ save(data)
+
+
+def fixtures():
+ # Empty values would fall back to real development services in config.ts.
+ overlays = ['.env.ci', 'firebase.json']
+ (ROOT / '.env.ci').write_text('''ENVIRONMENT=DEVELOPMENT
+RELAY=https://127.0.0.1:9/
+SIGNING_SERVER_TESTNET=https://127.0.0.1:9/
+SIGNING_SERVER_MAINNET=https://127.0.0.1:9/
+CHANNEL_URL=https://127.0.0.1:9/
+SENTRY_DNS=https://public@127.0.0.1:9/1
+ENC_KEY_STORAGE_IDENTIFIER=KEEPER-HOSTED-DISPOSABLE
+''')
+ (ROOT / 'firebase.json').write_text(json.dumps({'react-native': {
+ 'app_data_collection_default_enabled': False,
+ 'analytics_auto_collection_enabled': False,
+ 'analytics_collection_deactivated': True,
+ 'messaging_auto_init_enabled': False,
+ }}) + '\n')
+ if PLATFORM == 'IOS':
+ import plistlib
+ for path, bundle in [('ios/GoogleService-Info.plist', 'io.hexawallet.keeper'),
+ ('ios/GoogleServices/dev/GoogleService-Info.plist', APP_IDS['IOS'])]:
+ overlays.append(path)
+ with (ROOT / path).open('wb') as output:
+ plistlib.dump({'API_KEY': 'AIzaSy' + '0' * 33, 'GCM_SENDER_ID': '123456789012',
+ 'PLIST_VERSION': '1', 'BUNDLE_ID': bundle,
+ 'PROJECT_ID': 'keeper-disposable-ci',
+ 'GOOGLE_APP_ID': '1:123456789012:ios:0000000000000000000000',
+ 'IS_GCM_ENABLED': False, 'IS_ANALYTICS_ENABLED': False,
+ 'IS_ADS_ENABLED': False, 'IS_SIGNIN_ENABLED': False}, output)
+ else:
+ overlays.append('android/app/google-services.json')
+ (ROOT / 'android/app/google-services.json').write_text(json.dumps({
+ 'project_info': {'project_number': '123456789012', 'project_id': 'keeper-disposable-ci'},
+ 'client': [{'client_info': {'mobilesdk_app_id': '1:123456789012:android:0000000000000000',
+ 'android_client_info': {'package_name': APP_IDS['ANDROID']}},
+ 'api_key': [{'current_key': 'AIzaSy' + '0' * 33}]}],
+ 'configuration_version': '1',
+ }) + '\n')
+ data = read()
+ data['configuration'] = 'Synthetic Firebase project; DEVELOPMENT/testnet; loopback-only configured services; no production secrets.'
+ data['configuration_overlays'] = [{'path': path, 'sha256': hashlib.sha256((ROOT / path).read_bytes()).hexdigest()}
+ for path in overlays]
+ save(data)
+
+
+def install_maestro():
+ archive = PRIVATE / 'maestro.zip'
+ url = 'https://github.com/mobile-dev-inc/Maestro/releases/download/%s/maestro.zip' % MAESTRO_VERSION
+ command(['curl', '--fail', '--location', '--silent', '--show-error', '--max-time', '120',
+ '--output', str(archive), url], 'Download pinned Maestro', timeout=130)
+ if hashlib.sha256(archive.read_bytes()).hexdigest() != MAESTRO_SHA256:
+ raise RuntimeError('Maestro archive checksum mismatch.')
+ # unzip preserves executable modes for the bundled native iOS driver;
+ # Python ZipFile extraction would silently strip those modes.
+ command(['unzip', '-q', str(archive), '-d', str(PRIVATE / 'maestro')],
+ 'Extract verified Maestro including native executable modes', timeout=120)
+ candidates = list((PRIVATE / 'maestro').rglob('bin/maestro'))
+ if len(candidates) != 1:
+ raise RuntimeError('Unexpected Maestro archive layout.')
+ data = read()
+ data['maestro'] = {'version': MAESTRO_VERSION, 'sha256': MAESTRO_SHA256, 'binary': str(candidates[0])}
+ save(data)
+
+
+def android_sdk_metadata(sdk, component):
+ properties = (sdk / component / 'source.properties').read_text()
+ values = dict((key.strip(), value.strip()) for line in properties.splitlines()
+ if '=' in line for key, value in [line.split('=', 1)])
+ if not values.get('Pkg.Revision'):
+ raise RuntimeError('Android SDK component %s has no Pkg.Revision metadata.' % component)
+ return {key: value for key, value in values.items()
+ if key in ['Pkg.Revision', 'AndroidVersion.ApiLevel']}
+
+
+def prepare():
+ command(['npm', 'install', '--global', 'yarn@1.22.22', '--ignore-scripts'], 'Install pinned Yarn', timeout=180)
+ command(['yarn', 'install', '--frozen-lockfile', '--ignore-scripts', '--non-interactive'],
+ 'Install immutable JavaScript dependencies', timeout=900)
+ command(['node_modules/.bin/patch-package', '--error-on-fail'], 'Apply repository dependency patches', timeout=180)
+ original_manifest = (ROOT / 'package.json').read_bytes()
+ command(['node', '.github/native/nodeify.cjs'],
+ 'Apply committed Node compatibility whitelist without installing dependencies', timeout=180)
+ installed_manifest = (ROOT / 'package.json').read_bytes()
+ original = json.loads(original_manifest)
+ installed = json.loads(installed_manifest)
+ for key in ['browser', 'react-native', 'browserify']:
+ original.pop(key, None)
+ installed.pop(key, None)
+ if original != installed:
+ raise RuntimeError('Node compatibility setup changed fields beyond module mappings.')
+ data = read()
+ data['nodeify_overlay'] = {
+ 'path': 'package.json', 'before_sha256': hashlib.sha256(original_manifest).hexdigest(),
+ 'after_sha256': hashlib.sha256(installed_manifest).hexdigest(),
+ 'diff_sha256': hashlib.sha256(subprocess.check_output(['git', 'diff', 'HEAD', '--', 'package.json'], cwd=ROOT)).hexdigest(),
+ 'allowed_fields': ['browser', 'react-native', 'browserify'],
+ }
+ save(data)
+ command(['git', 'diff', '--exit-code', 'HEAD', '--', 'yarn.lock', 'ios/Podfile.lock'],
+ 'Verify dependency locks remain immutable')
+ fixtures()
+ install_maestro()
+ if PLATFORM == 'IOS':
+ command(['gem', 'install', 'cocoapods', '--version', '1.16.2', '--no-document'],
+ 'Install pinned CocoaPods', timeout=300)
+ if os.environ.get('KEEPER_POD_LOCK_REPAIR') == '1':
+ # Diagnostic bootstrap only. A candidate lock is reviewed/committed,
+ # then a separate strict deployment run must build and test the app.
+ command(['pod', 'update', 'NitroIap', 'NitroModules', 'openiap', '--no-repo-update'],
+ 'Generate targeted CocoaPods lock candidate (not validation)',
+ timeout=900, cwd=ROOT / 'ios')
+ shutil.copyfile(ROOT / 'ios/Podfile.lock', EVIDENCE.parent / 'Podfile.lock.candidate')
+ raise RuntimeError('Pod lock candidate generated for review; no native validation performed.')
+ command(['pod', 'install', '--deployment'], 'Install immutable CocoaPods dependencies',
+ timeout=900, cwd=ROOT / 'ios')
+ # Existing PBX build phases hardcode this path. Adapt the disposable host,
+ # preserving the app project and the source commit being tested.
+ command(['sudo', 'mkdir', '-p', '/opt/homebrew/bin'], 'Prepare existing Xcode Node path')
+ command(['sudo', 'ln', '-sf', shutil.which('node'), '/opt/homebrew/bin/node'],
+ 'Connect existing Xcode Node path to pinned Node')
+ else:
+ command(['sdkmanager', 'platforms;android-36', 'build-tools;35.0.0', 'ndk;27.1.12297006'],
+ 'Install pinned Android build SDK and NDK', timeout=600)
+ sdk = Path(os.environ.get('ANDROID_HOME', os.environ.get('ANDROID_SDK_ROOT', '')))
+ observed = {}
+ for component in ['platforms/android-36', 'build-tools/35.0.0', 'ndk/27.1.12297006']:
+ observed[component] = android_sdk_metadata(sdk, component)
+ data = read()
+ data['toolchain']['observed_android_sdk'] = observed
+ save(data)
+ if (ROOT / 'package.json').read_bytes() != installed_manifest:
+ raise RuntimeError('Native installation unexpectedly rewrote the installed manifest.')
+ command(['git', 'diff', '--exit-code', 'HEAD', '--', 'yarn.lock', 'ios/Podfile.lock'],
+ 'Verify native installation did not rewrite locks')
+
+
+def artifact_identity():
+ if PLATFORM == 'IOS':
+ import plistlib
+ bundle = PRIVATE / 'DerivedData/Build/Products/Debug-iphonesimulator/hexa_keeper_dev.app'
+ with (bundle / 'Info.plist').open('rb') as source:
+ executable = plistlib.load(source)['CFBundleExecutable']
+ binary = bundle / executable
+ tree = hashlib.sha256()
+ for file in sorted(path for path in bundle.rglob('*') if path.is_file()):
+ tree.update(str(file.relative_to(bundle)).encode() + b'\0')
+ tree.update(hashlib.sha256(file.read_bytes()).digest())
+ return {'path': str(bundle), 'executable': executable,
+ 'executable_sha256': hashlib.sha256(binary.read_bytes()).hexdigest(),
+ 'bundle_tree_sha256': tree.hexdigest()}
+ apk = ROOT / 'android/app/build/outputs/apk/development/debug/app-development-debug.apk'
+ return {'path': str(apk.relative_to(ROOT)), 'sha256': hashlib.sha256(apk.read_bytes()).hexdigest()}
+
+
+def driver():
+ """Fail early on iOS driver setup without installing or crediting the app."""
+ if PLATFORM != 'IOS':
+ raise ValueError('The disposable driver preflight is iOS-only.')
+ state = PRIVATE / 'maestro-preflight-state'
+ os.environ['XDG_STATE_HOME'] = str(state)
+ details = {'scope': 'DRIVER PREFLIGHT/setup only; no app build, install or UI credit.',
+ 'result': 'FAIL', 'cleanup_errors': []}
+ device = None
+ original_error = None
+ label = 'Check disposable iOS driver readiness'
+ try:
+ created = command(['xcrun', 'simctl', 'create', 'Keeper-driver-preflight-ci',
+ 'com.apple.CoreSimulator.SimDeviceType.iPhone-16',
+ 'com.apple.CoreSimulator.SimRuntime.iOS-18-5'],
+ 'Create owned driver-preflight simulator', timeout=120, capture=True)
+ if not re.fullmatch(r'[A-Fa-f0-9]{8}(?:-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}', created):
+ raise ValueError('simctl create did not return an owned simulator UUID.')
+ device = created
+ command(['xcrun', 'simctl', 'boot', device], 'Boot owned driver-preflight simulator', timeout=120)
+ command(['xcrun', 'simctl', 'bootstatus', device, '-b'],
+ 'Wait for driver-preflight simulator boot', timeout=240)
+ command([read()['maestro']['binary'], '--platform', 'ios', '--device', device, 'hierarchy'],
+ label, timeout=300, error_details=False)
+ details['result'] = 'PASS'
+ except Exception as error:
+ original_error = error
+ details['error_type'] = type(error).__name__
+ raise
+ finally:
+ if device:
+ for action in ['shutdown', 'delete']:
+ try:
+ subprocess.run(['xcrun', 'simctl', action, device], stdout=subprocess.DEVNULL,
+ stderr=subprocess.DEVNULL, timeout=30, check=True)
+ except Exception as error:
+ details['cleanup_errors'].append({'action': action, 'error_type': type(error).__name__})
+ try:
+ details['diagnostics'] = maestro_preflight_diagnostics(state / 'maestro/tests', label)
+ except Exception as error:
+ details['diagnostics'] = {'collection_error_types': [type(error).__name__]}
+ if details['cleanup_errors']:
+ details['result'] = 'FAIL'
+ data = read()
+ data['driver_preflight'] = details
+ save(data)
+ if details['cleanup_errors'] and original_error is None:
+ raise RuntimeError('Owned driver-preflight simulator cleanup failed.')
+
+
+def build():
+ if PLATFORM == 'IOS':
+ architecture = platform.machine()
+ if architecture not in ['arm64', 'x86_64']:
+ raise RuntimeError('Unsupported hosted iOS simulator architecture: %s' % architecture)
+ data = read()
+ data.setdefault('toolchain', {})['ios_simulator_architecture'] = architecture
+ save(data)
+ command(['xcodebuild', '-workspace', 'ios/hexa_keeper.xcworkspace', '-scheme', 'hexa_keeper_dev',
+ '-configuration', 'Debug', '-sdk', 'iphonesimulator', '-destination', 'generic/platform=iOS Simulator',
+ '-derivedDataPath', str(PRIVATE / 'DerivedData'), 'CODE_SIGNING_ALLOWED=NO',
+ 'CODE_SIGNING_REQUIRED=NO', 'ARCHS=' + architecture, 'ONLY_ACTIVE_ARCH=YES', 'build'],
+ 'Build unsigned development simulator app', timeout=2400)
+ else:
+ observed = command(['./gradlew', '--version'], 'Record actual Gradle and JVM version',
+ capture=True, cwd=ROOT / 'android')
+ data = read()
+ data['toolchain']['gradle'] = observed
+ save(data)
+ command(['./gradlew', ':app:assembleDevelopmentDebug', '--no-daemon', '--max-workers=2',
+ '-PreactNativeArchitectures=x86_64'], 'Build debug-key-only development APK',
+ timeout=2100, cwd=ROOT / 'android')
+ data = read()
+ data['built_artifact'] = artifact_identity()
+ data['build'] = 'PASS'
+ save(data)
+
+
+def warm_metro_bundle():
+ """Bound cold development bundling before starting either disposable app."""
+ bundle_platform = {'IOS': 'ios', 'ANDROID': 'android'}.get(PLATFORM)
+ if bundle_platform is None:
+ raise ValueError('Unsupported native bundle platform.')
+ url = 'http://127.0.0.1:8081/index.bundle?platform=%s&dev=true&minify=false' % bundle_platform
+ body = PRIVATE / ('%s-development-warmup.bundle' % bundle_platform)
+ details = {'scope': 'Development bundle setup only; not native or UI evidence.',
+ 'platform': bundle_platform, 'url': url, 'timeout_seconds': 240,
+ 'result': 'FAIL', 'http_status': None}
+ started = time.monotonic()
+ try:
+ status = command(['curl', '--fail', '--silent', '--show-error', '--max-time', '240',
+ '--output', str(body), '--write-out', '%{http_code}', url],
+ 'Warm %s development bundle (setup only)' % PLATFORM, timeout=250, capture=True)
+ if re.fullmatch(r'\d{3}', status):
+ details['http_status'] = int(status)
+ if status != '200' or not body.is_file() or body.stat().st_size == 0:
+ raise RuntimeError('Development bundle warmup did not return a nonempty HTTP 200 body.')
+ digest = hashlib.sha256()
+ with body.open('rb') as source:
+ for chunk in iter(lambda: source.read(1024 * 1024), b''):
+ digest.update(chunk)
+ details.update({'result': 'PASS', 'bytes': body.stat().st_size, 'sha256': digest.hexdigest()})
+ finally:
+ details['duration_seconds'] = round(time.monotonic() - started, 1)
+ data = read()
+ data['metro_warmup'] = details
+ save(data)
+
+
+def smoke():
+ if read()['build'] != 'PASS':
+ raise RuntimeError('A successful native build is required before smoke testing.')
+ if artifact_identity() != read()['built_artifact']:
+ raise RuntimeError('Built artifact changed before the disposable startup smoke.')
+ metro_output = (PRIVATE / 'metro.log').open('wb')
+ metro = subprocess.Popen(['node', 'node_modules/react-native/cli.js', 'start', '--port', '8081'],
+ cwd=ROOT, stdout=metro_output, stderr=subprocess.STDOUT, start_new_session=True)
+ device = None
+ report = PRIVATE / 'smoke-junit.xml'
+ try:
+ for _ in range(60):
+ if metro.poll() is not None:
+ raise RuntimeError('Metro exited before the disposable smoke.')
+ try:
+ with urllib.request.urlopen('http://127.0.0.1:8081/status', timeout=2) as response:
+ if b'packager-status:running' in response.read():
+ break
+ except OSError:
+ time.sleep(1)
+ else:
+ raise RuntimeError('Metro did not become ready within 60 attempts.')
+ warm_metro_bundle()
+ if PLATFORM == 'IOS':
+ device = command(['xcrun', 'simctl', 'create', 'Keeper-disposable-ci',
+ 'com.apple.CoreSimulator.SimDeviceType.iPhone-16',
+ 'com.apple.CoreSimulator.SimRuntime.iOS-18-5'],
+ 'Create fresh iPhone 16 iOS 18.5 simulator', capture=True)
+ command(['xcrun', 'simctl', 'boot', device], 'Boot disposable simulator')
+ command(['xcrun', 'simctl', 'bootstatus', device, '-b'], 'Wait for simulator boot', timeout=240)
+ command(['xcrun', 'simctl', 'install', device,
+ str(PRIVATE / 'DerivedData/Build/Products/Debug-iphonesimulator/hexa_keeper_dev.app')],
+ 'Install unsigned development app', timeout=120)
+ descriptor = 'iPhone 16; iOS 18.5'
+ else:
+ sdk = Path(os.environ.get('ANDROID_HOME', os.environ.get('ANDROID_SDK_ROOT', '')))
+ # Query the installed SDK package without loading emulator GUI libraries
+ # on the headless host. The emulator runner already booted this image.
+ emulator_version = android_sdk_metadata(sdk, 'emulator')
+ adb_version = command(['adb', 'version'], 'Record actual adb version', capture=True)
+ data = read()
+ data['toolchain']['emulator'] = {'source': 'emulator/source.properties', **emulator_version}
+ data['toolchain']['adb'] = adb_version
+ save(data)
+ device = command(['adb', 'get-serialno'], 'Identify fresh emulator', capture=True)
+ command(['adb', '-s', device, 'reverse', 'tcp:8081', 'tcp:8081'], 'Connect emulator to Metro')
+ command(['adb', '-s', device, 'install', '-r',
+ 'android/app/build/outputs/apk/development/debug/app-development-debug.apk'],
+ 'Install development debug APK', timeout=120)
+ descriptor = command(['adb', '-s', device, 'shell', 'getprop', 'ro.build.fingerprint'],
+ 'Record Android emulator image', capture=True)
+ data = read()
+ data['device'] = {'id': device, 'image': descriptor, 'fresh_disposable_state': True}
+ data['installed_artifact_verified'] = True
+ save(data)
+ command([data['maestro']['binary'], '--device', device, 'test', '--env', 'APP_ID=' + APP_IDS[PLATFORM],
+ '--flatten-debug-output', '--debug-output', str(PRIVATE / 'maestro-output'),
+ '--format', 'junit', '--output', str(report), '--test-output-dir', str(PRIVATE / 'maestro-output'),
+ '.github/native/startup.yaml'], 'Assert startup and disposable passcode transition', timeout=420)
+ suite = ET.parse(report).getroot()
+ cases = list(suite.iter('testcase'))
+ if not cases or any(list(case.iter('failure')) or list(case.iter('error')) or list(case.iter('skipped'))
+ for case in cases):
+ raise RuntimeError('Maestro did not produce a complete successful smoke report.')
+ data = read()
+ data['smoke'] = 'PASS'
+ data['smoke_test_cases'] = len(cases)
+ save(data)
+ except Exception:
+ try:
+ record_startup_failure(report, device)
+ except Exception as error:
+ # Diagnostics never replace the original failed native/UI result.
+ data = read()
+ data['startup_diagnostics'] = {'collection_errors': [
+ {'stage': 'collector', 'error_type': type(error).__name__}]}
+ save(data)
+ raise
+ finally:
+ if metro.poll() is None:
+ os.killpg(metro.pid, signal.SIGTERM)
+ try:
+ metro.wait(timeout=10)
+ except subprocess.TimeoutExpired:
+ os.killpg(metro.pid, signal.SIGKILL)
+ metro_output.close()
+ if device and PLATFORM == 'IOS':
+ subprocess.run(['xcrun', 'simctl', 'shutdown', device], stdout=subprocess.DEVNULL,
+ stderr=subprocess.DEVNULL, timeout=30, check=False)
+ subprocess.run(['xcrun', 'simctl', 'delete', device], stdout=subprocess.DEVNULL,
+ stderr=subprocess.DEVNULL, timeout=30, check=False)
+ elif device:
+ subprocess.run(['adb', '-s', device, 'uninstall', APP_IDS[PLATFORM]], stdout=subprocess.DEVNULL,
+ stderr=subprocess.DEVNULL, timeout=30, check=False)
+
+
+def main():
+ if PLATFORM not in APP_IDS or len(sys.argv) != 2 or sys.argv[1] not in ['record', 'prepare', 'driver', 'build', 'smoke']:
+ raise RuntimeError('Expected a hosted platform and record|prepare|driver|build|smoke.')
+ os.environ.update({'ENVFILE': '.env.ci', 'RCT_NO_LAUNCH_PACKAGER': '1',
+ 'RCT_NEW_ARCH_ENABLED': '1', 'MAESTRO_CLI_NO_ANALYTICS': '1'})
+ run_phase(sys.argv[1])
+
+
+def run_phase(phase):
+ try:
+ globals()[phase]()
+ except Exception:
+ if EVIDENCE.exists():
+ evidence = read()
+ evidence['failed_phase'] = phase
+ if phase in ['build', 'smoke']:
+ evidence[phase] = 'FAIL'
+ save(evidence)
+ raise
+
+
+if __name__ == '__main__':
+ try:
+ main()
+ except Exception as error:
+ print('Hosted native validation failed: %s' % error, file=sys.stderr)
+ sys.exit(1)
diff --git a/.github/native/nodeify.cjs b/.github/native/nodeify.cjs
new file mode 100644
index 000000000..d24127bf1
--- /dev/null
+++ b/.github/native/nodeify.cjs
@@ -0,0 +1,33 @@
+#!/usr/bin/env node
+'use strict';
+
+const path = require('node:path');
+
+// Match setup.sh's existing polyfills without invoking its dependency installer.
+// The unfiltered --hack command selects every core shim, including packages this
+// app does not depend on, and makes valid imports such as constants unresolvable.
+const SHIMS = Object.freeze([
+ 'buffer', 'events', 'process', 'stream', 'inherits', 'path', 'assert', 'crypto',
+]);
+
+function runNodeify(root = path.resolve(__dirname, '../..')) {
+ if (process.cwd() !== root) {
+ throw new Error('Run native Node compatibility preparation from the repository root.');
+ }
+ const cli = require.resolve('rn-nodeify/cmd.js', { paths: [root] });
+ const coreList = require.resolve(path.join(path.dirname(cli), 'coreList.js'));
+ require(coreList);
+ require.cache[coreList].exports = [...SHIMS];
+ const originalArguments = process.argv;
+ try {
+ // No --install flag: the pinned upstream CLI can apply its existing module
+ // and file compatibility fixes, but cannot enter installShims().
+ process.argv = [process.execPath, cli, '--hack'];
+ require(cli);
+ } finally {
+ process.argv = originalArguments;
+ }
+}
+
+module.exports = { runNodeify, SHIMS };
+if (require.main === module) runNodeify();
diff --git a/.github/native/startup.yaml b/.github/native/startup.yaml
new file mode 100644
index 000000000..1dc939637
--- /dev/null
+++ b/.github/native/startup.yaml
@@ -0,0 +1,22 @@
+# Intentionally stop before persisting a PIN or generating any recovery material.
+appId: ${APP_ID}
+name: Disposable startup and passcode input
+---
+- launchApp:
+ clearState: true
+ permissions:
+ all: deny
+- extendedWaitUntil:
+ visible: Create a passcode
+ timeout: 180000
+- assertNotVisible: Confirm your passcode
+- tapOn:
+ id: key_1
+- tapOn:
+ id: key_2
+- tapOn:
+ id: key_3
+- tapOn:
+ id: key_4
+- assertVisible: Confirm your passcode
+- stopApp
diff --git a/.github/tests/keeper-local-validation.test.cjs b/.github/tests/keeper-local-validation.test.cjs
index 3de7d7994..17aa8dc79 100644
--- a/.github/tests/keeper-local-validation.test.cjs
+++ b/.github/tests/keeper-local-validation.test.cjs
@@ -15,6 +15,12 @@ const runWorkflow = new (Object.getPrototypeOf(async function () {}).constructor
);
const sha = 'b78b480eb4223390b2d17073387f9887d2e35f95';
+const baseSha = 'a'.repeat(40);
+const runBaseSha = 'c'.repeat(40);
+const repository = 'KeeperCommunity/bitcoin-keeper';
+const repositoryId = 470904030;
+const headRef = 'codex/example-change';
+const nativeWorkflowPath = '.github/workflows/keeper-hosted-native.yml';
const prNumber = 7045;
const comment = (body, login) => ({ body, user: { login } });
const handoff = (head = sha, checks = 'IOS, ANDROID, HARDWARE') => comment(
@@ -41,27 +47,101 @@ Real devices/signers: ${overrides.hardware || 'NOT RUN / POST-RELEASE by owner d
'local-writer'
);
+const hostedRun = (overrides = {}) => ({
+ id: 90,
+ workflow_id: 123,
+ path: nativeWorkflowPath,
+ head_sha: sha,
+ head_branch: headRef,
+ head_repository: { full_name: repository, id: repositoryId },
+ repository: { full_name: repository, id: repositoryId },
+ event: 'pull_request',
+ status: 'completed',
+ conclusion: 'success',
+ run_attempt: 2,
+ html_url: `https://github.com/${repository}/actions/runs/90`,
+ pull_requests: [{
+ number: prNumber,
+ head: { sha, ref: headRef, repo: { id: repositoryId } },
+ base: { sha: runBaseSha, ref: 'sprint', repo: { id: repositoryId } }
+ }],
+ ...overrides
+});
+const hostedJob = (platform, overrides = {}) => ({
+ name: platform === 'IOS' ? 'Hosted iOS simulator' : 'Hosted Android emulator',
+ head_sha: sha,
+ run_id: 90,
+ run_attempt: 2,
+ status: 'completed',
+ conclusion: 'success',
+ steps: ['Build development app', 'Run disposable startup smoke'].map(name => ({
+ name, status: 'completed', conclusion: 'success'
+ })),
+ ...overrides
+});
+const trustedTree = () => ({
+ truncated: false,
+ tree: [
+ { path: nativeWorkflowPath, mode: '100644', type: 'blob', sha: '1'.repeat(40) },
+ { path: '.github/native', mode: '040000', type: 'tree', sha: '2'.repeat(40) },
+ { path: '.github/native/smoke.yaml', mode: '100644', type: 'blob', sha: '3'.repeat(40) },
+ { path: '.github/native/build.sh', mode: '100755', type: 'blob', sha: '4'.repeat(40) },
+ { path: 'src/App.tsx', mode: '100644', type: 'blob', sha: '5'.repeat(40) }
+ ]
+});
+const hostedOptions = (overrides = {}) => ({
+ runs: [hostedRun()], jobs: [hostedJob('IOS'), hostedJob('ANDROID')], ...overrides
+});
+
async function evaluate(comments, options = {}) {
const filesRoute = () => {};
const commentsRoute = () => {};
+ const runsRoute = () => {};
+ const jobsRoute = () => {};
const statuses = [];
const failures = [];
+ const warnings = [];
+ const calls = [];
+ const pullsRequested = [];
+ let pullReads = 0;
const github = {
- paginate: async route => {
+ paginate: async (route, args) => {
+ calls.push({ route, args });
if (route === filesRoute) return options.files || [{ filename: 'src/App.tsx' }];
if (route === commentsRoute) return comments;
+ if (route === runsRoute) {
+ if (options.runsError) throw new Error(options.runsError);
+ return [...(options.runs || [])];
+ }
+ if (route === jobsRoute) {
+ if (options.jobsError) throw new Error(options.jobsError);
+ return options.jobsByRun?.[args.run_id] || options.jobs || [];
+ }
throw new Error('Unexpected paginate route');
},
rest: {
pulls: {
- get: async () => ({ data: {
- base: { ref: 'sprint' },
- head: { sha: options.head || sha },
- body: '', user: { login: 'cloud-writer' },
- html_url: 'https://github.com/KeeperCommunity/bitcoin-keeper/pull/7045'
- } }),
+ get: async ({ pull_number }) => {
+ pullsRequested.push(pull_number);
+ pullReads += 1;
+ return { data: {
+ base: { ref: options.baseRef || 'sprint', sha: baseSha,
+ repo: { full_name: repository, id: repositoryId } },
+ head: { sha: pullReads > 1 && options.afterHead ? options.afterHead : options.head || sha,
+ ref: headRef, repo: options.headRepository || { full_name: repository, id: repositoryId } },
+ body: options.body || '', user: { login: 'cloud-writer' },
+ html_url: `https://github.com/${repository}/pull/${pull_number}`
+ } };
+ },
listFiles: filesRoute
},
+ actions: { listWorkflowRuns: runsRoute, listJobsForWorkflowRunAttempt: jobsRoute },
+ git: {
+ getTree: async ({ tree_sha }) => {
+ if (options.treeErrors?.includes(tree_sha)) throw new Error('Tree unavailable');
+ return { data: options.trees?.[tree_sha] || trustedTree() };
+ }
+ },
issues: { listComments: commentsRoute },
repos: {
getCollaboratorPermissionLevel: async ({ username }) => ({ data: {
@@ -74,11 +154,14 @@ async function evaluate(comments, options = {}) {
}
};
const context = { repo: { owner: 'KeeperCommunity', repo: 'bitcoin-keeper' },
- issue: { number: prNumber }, payload: {} };
- const core = { info: () => {}, warning: () => {}, setFailed: text => failures.push(text) };
+ issue: { number: prNumber }, payload: {}, ...options.context };
+ const core = { info: () => {}, warning: text => warnings.push(text),
+ setFailed: text => failures.push(text) };
await runWorkflow(github, context, core);
- assert.equal(statuses.length, 1);
- return { status: statuses[0], failures };
+ assert.equal(statuses.length, options.afterHead || options.baseRef ? 0 : 1);
+ return { status: statuses[0], statuses, failures, warnings, calls, pullsRequested,
+ runsCalls: calls.filter(c => c.route === runsRoute),
+ jobsCalls: calls.filter(c => c.route === jobsRoute) };
}
test('current requirements still fail without an owner decision', async () => {
@@ -158,3 +241,283 @@ test('a new PR head invalidates both handoff and owner decision', async () => {
assert.equal(status.state, 'failure');
assert.equal(status.description, 'Trusted Cloud handoff for current SHA required');
});
+
+test('trusted exact-head hosted smoke passes both platforms without a local attestation', async () => {
+ const result = await evaluate([handoff(sha, 'IOS, ANDROID')], hostedOptions());
+ assert.equal(result.status.state, 'success');
+ assert.match(result.status.description, /hosted IOS, ANDROID/);
+ assert.equal(result.status.sha, sha);
+ assert.equal(result.failures.length, 0);
+ assert.deepEqual(result.runsCalls[0].args, {
+ owner: 'KeeperCommunity', repo: 'bitcoin-keeper', workflow_id: 'keeper-hosted-native.yml',
+ head_sha: sha, event: 'pull_request', per_page: 100
+ });
+ assert.equal(result.jobsCalls[0].args.attempt_number, 2);
+});
+
+test('successful hosted Android can combine with local iOS when hosted iOS fails', async () => {
+ const { status } = await evaluate([
+ handoff(sha, 'IOS, ANDROID'), report({ android: 'NOT RUN' })
+ ], hostedOptions({
+ runs: [hostedRun({ conclusion: 'failure' })],
+ jobs: [hostedJob('IOS', { conclusion: 'failure' }), hostedJob('ANDROID')]
+ }));
+ assert.equal(status.state, 'success');
+ assert.match(status.description, /hosted ANDROID/);
+});
+
+test('one platform success cannot satisfy the other platform', async () => {
+ const { status } = await evaluate([handoff(sha, 'IOS, ANDROID')], hostedOptions({
+ jobs: [hostedJob('ANDROID')]
+ }));
+ assert.equal(status.state, 'failure');
+ assert.match(status.description, /IOS/);
+});
+
+test('hosted platform passes do not satisfy physical hardware checks', async () => {
+ const { status } = await evaluate([handoff()], hostedOptions());
+ assert.equal(status.state, 'failure');
+ assert.equal(status.description, 'Missing local PASS: HARDWARE');
+});
+
+test('hosted passes can fill unrun platforms while exact owner rules defer hardware', async () => {
+ const { status } = await evaluate([handoff(), decision(),
+ report({ ios: 'NOT RUN', android: 'NOT RUN' })], hostedOptions());
+ assert.equal(status.state, 'success');
+ assert.match(status.description, /hosted IOS, ANDROID; owner-deferred HARDWARE/);
+});
+
+test('hosted success cannot waive hardware failures or remove later-report requirements', async () => {
+ for (const comments of [
+ [handoff(), decision()],
+ [handoff(), report(), decision()],
+ [handoff(), decision(), report({ hardware: 'FAIL: incorrect signer address' })],
+ [handoff(), decision({}, 'other-writer'), report()]
+ ]) {
+ const { status } = await evaluate(comments, hostedOptions());
+ assert.equal(status.state, 'failure');
+ assert.match(status.description, /HARDWARE/);
+ }
+});
+
+test('latest trusted local failure or blocked report cannot be hidden by hosted passes', async () => {
+ for (const state of ['LOCAL_FAILED', 'BLOCKED']) {
+ const { status } = await evaluate([handoff(sha, 'IOS, ANDROID'),
+ report(), report({ state })], hostedOptions());
+ assert.equal(status.state, 'failure');
+ assert.equal(status.description, 'Latest local validation is not LOCAL_PASSED');
+ }
+});
+
+test('explicit local platform failures cannot be relabeled as passed by hosted results', async () => {
+ for (const failedField of ['ios', 'android']) {
+ const { status } = await evaluate([handoff(sha, 'IOS, ANDROID'),
+ report({ [failedField]: 'FAIL: reproducible startup crash' })], hostedOptions());
+ assert.equal(status.state, 'failure', failedField);
+ }
+});
+
+test('hosted passes still require a trusted current-head Cloud handoff', async () => {
+ for (const comments of [[], [handoff('d'.repeat(40), 'IOS, ANDROID')],
+ [comment(handoff(sha, 'IOS, ANDROID').body, 'read-only-user')]]) {
+ const result = await evaluate(comments, hostedOptions());
+ assert.equal(result.status.state, 'failure');
+ assert.equal(result.runsCalls.length, 0);
+ }
+});
+
+test('reject hosted runs with stale, wrong, missing or untrusted identity metadata', async () => {
+ const badRuns = [
+ { head_sha: 'd'.repeat(40) },
+ { head_branch: 'other-branch' },
+ { head_repository: { full_name: 'attacker/bitcoin-keeper', id: 1 } },
+ { path: '.github/workflows/build-only.yml' },
+ { event: 'push' },
+ { event: 'pull_request_target' },
+ { pull_requests: [] },
+ { pull_requests: [{ ...hostedRun().pull_requests[0], number: prNumber + 1 }] },
+ { pull_requests: [{ ...hostedRun().pull_requests[0],
+ head: { sha: 'd'.repeat(40), ref: headRef, repo: { id: repositoryId } } }] },
+ { pull_requests: [{ ...hostedRun().pull_requests[0],
+ base: { ref: 'sprint', repo: { id: repositoryId } } }] },
+ { run_attempt: 0 },
+ { run_attempt: '2' }
+ ];
+ for (const change of badRuns) {
+ const { status } = await evaluate([handoff(sha, 'IOS, ANDROID')],
+ hostedOptions({ runs: [hostedRun(change)] }));
+ assert.equal(status.state, 'failure', JSON.stringify(change));
+ }
+});
+
+test('reject hosted evidence whose recorded PR association has wrong refs or repositories', async () => {
+ const original = hostedRun().pull_requests[0];
+ for (const change of [
+ { base: { ...original.base, ref: 'dev' } },
+ { base: { ...original.base, repo: { id: 1 } } },
+ { head: { ...original.head, ref: 'other-branch' } },
+ { head: { ...original.head, repo: { id: 1 } } }
+ ]) {
+ const { status } = await evaluate([handoff(sha, 'IOS, ANDROID')],
+ hostedOptions({ runs: [hostedRun({ pull_requests: [{ ...original, ...change }] })] }));
+ assert.equal(status.state, 'failure', JSON.stringify(change));
+ }
+});
+
+test('fork-hosted runs retain local fallback but cannot supply trusted hosted evidence', async () => {
+ const options = hostedOptions({ headRepository: { full_name: 'contributor/bitcoin-keeper', id: 1 } });
+ const hostedOnly = await evaluate([handoff(sha, 'IOS, ANDROID')], options);
+ assert.equal(hostedOnly.status.state, 'failure');
+ const local = await evaluate([handoff(sha, 'IOS, ANDROID'), report()], options);
+ assert.equal(local.status.state, 'success');
+});
+
+test('hosted CI requires matching workflow and entire native harness in source and both bases', async () => {
+ for (const ref of [sha, baseSha, runBaseSha]) {
+ for (const mutation of ['workflow', 'smoke', 'add', 'delete', 'mode']) {
+ const tree = trustedTree();
+ if (mutation === 'workflow') tree.tree[0].sha = 'f'.repeat(40);
+ if (mutation === 'smoke') tree.tree[2].sha = 'f'.repeat(40);
+ if (mutation === 'add') tree.tree.push({
+ path: '.github/native/extra.sh', mode: '100755', type: 'blob', sha: 'f'.repeat(40)
+ });
+ if (mutation === 'delete') tree.tree.splice(2, 1);
+ if (mutation === 'mode') tree.tree[3].mode = '100644';
+ const { status } = await evaluate([handoff(sha, 'IOS, ANDROID')],
+ hostedOptions({ trees: { [ref]: tree } }));
+ assert.equal(status.state, 'failure', `${ref}: ${mutation}`);
+ }
+ }
+});
+
+test('unrelated source changes do not invalidate immutable hosted CI definitions', async () => {
+ const tree = trustedTree();
+ tree.tree[4].sha = 'f'.repeat(40);
+ const { status } = await evaluate([handoff(sha, 'IOS, ANDROID')],
+ hostedOptions({ trees: { [sha]: tree } }));
+ assert.equal(status.state, 'success');
+});
+
+test('bootstrap without trusted native infrastructure and truncated trees fail closed', async () => {
+ for (const tree of [{ truncated: false, tree: [] },
+ { ...trustedTree(), truncated: true },
+ { truncated: false, tree: trustedTree().tree.filter(e => e.path !== nativeWorkflowPath) },
+ { truncated: false, tree: trustedTree().tree.filter(e => !e.path.startsWith('.github/native/')) }]) {
+ const { status } = await evaluate([handoff(sha, 'IOS, ANDROID')],
+ hostedOptions({ trees: { [baseSha]: tree } }));
+ assert.equal(status.state, 'failure');
+ }
+});
+
+test('hosted API failures never become a pass and preserve genuine local fallback', async () => {
+ for (const failure of [{ runsError: 'Actions unavailable' },
+ { jobsError: 'Jobs unavailable' }, { treeErrors: [runBaseSha] }]) {
+ const options = hostedOptions(failure);
+ const hostedOnly = await evaluate([handoff(sha, 'IOS, ANDROID')], options);
+ assert.equal(hostedOnly.status.state, 'failure');
+ assert.ok(hostedOnly.warnings.length);
+ const local = await evaluate([handoff(sha, 'IOS, ANDROID'), report()], options);
+ assert.equal(local.status.state, 'success');
+ }
+});
+
+test('cancelled, skipped, pending or incomplete hosted runs provide no platform evidence', async () => {
+ for (const change of [{ status: 'queued', conclusion: null },
+ { status: 'in_progress', conclusion: null }, { conclusion: 'cancelled' },
+ { conclusion: 'skipped' }, { conclusion: 'timed_out' }, { conclusion: 'action_required' },
+ { conclusion: 'neutral' }, { conclusion: null }]) {
+ const { status } = await evaluate([handoff(sha, 'IOS, ANDROID')],
+ hostedOptions({ runs: [hostedRun(change)] }));
+ assert.equal(status.state, 'failure', JSON.stringify(change));
+ }
+});
+
+test('a newer failed or pending run supersedes an older successful run regardless of API order', async () => {
+ for (const newest of [hostedRun({ id: 91, conclusion: 'cancelled' }),
+ hostedRun({ id: 91, status: 'in_progress', conclusion: null }),
+ hostedRun({ id: 91, conclusion: 'failure' })]) {
+ const { status, jobsCalls } = await evaluate([handoff(sha, 'IOS, ANDROID')], hostedOptions({
+ runs: [hostedRun(), newest], jobsByRun: { 91: [] }
+ }));
+ assert.equal(status.state, 'failure');
+ assert.ok(jobsCalls.every(call => call.args.run_id === 91));
+ }
+});
+
+test('reruns inspect only the newest attempt and do not reuse earlier success', async () => {
+ const result = await evaluate([handoff(sha, 'IOS, ANDROID')], hostedOptions({
+ runs: [hostedRun({ run_attempt: 3 })], jobs: [hostedJob('IOS'), hostedJob('ANDROID')]
+ }));
+ assert.equal(result.jobsCalls[0].args.attempt_number, 3);
+ assert.equal(result.status.state, 'failure');
+});
+
+test('wrong run identity and stale source on jobs cannot satisfy current platform checks', async () => {
+ for (const change of [{ head_sha: 'd'.repeat(40) }, { run_id: 89 },
+ { run_attempt: 1 }, { status: 'in_progress' }, { conclusion: 'cancelled' },
+ { conclusion: 'skipped' }, { conclusion: 'failure' }]) {
+ const { status } = await evaluate([handoff(sha, 'IOS')], hostedOptions({
+ jobs: [hostedJob('IOS', change)]
+ }));
+ assert.equal(status.state, 'failure', JSON.stringify(change));
+ }
+});
+
+test('a build-only job or missing, skipped, cancelled or failed smoke is not native validation', async () => {
+ for (const steps of [[], [hostedJob('IOS').steps[0]], [hostedJob('IOS').steps[1]],
+ ...['skipped', 'cancelled', 'failure'].map(conclusion => [
+ hostedJob('IOS').steps[0], { ...hostedJob('IOS').steps[1], conclusion }
+ ]), [hostedJob('IOS').steps[0], { ...hostedJob('IOS').steps[1], status: 'in_progress' }]]) {
+ const { status } = await evaluate([handoff(sha, 'IOS')], hostedOptions({
+ jobs: [hostedJob('IOS', { steps })]
+ }));
+ assert.equal(status.state, 'failure', JSON.stringify(steps));
+ }
+});
+
+test('duplicate platform jobs or required steps do not ambiguously satisfy validation', async () => {
+ for (const jobs of [[hostedJob('IOS'), hostedJob('IOS')],
+ [hostedJob('IOS', { steps: [...hostedJob('IOS').steps, hostedJob('IOS').steps[1]] })]]) {
+ const { status } = await evaluate([handoff(sha, 'IOS')], hostedOptions({ jobs }));
+ assert.equal(status.state, 'failure');
+ }
+});
+
+test('workflow_run routing evaluates the associated PR and refreshes its current head', async () => {
+ const routedNumber = 7059;
+ const run = hostedRun({ pull_requests: [{ ...hostedRun().pull_requests[0], number: routedNumber }] });
+ const result = await evaluate([handoff(sha, 'IOS, ANDROID')], hostedOptions({
+ runs: [run], context: { issue: {}, eventName: 'workflow_run', payload: { workflow_run: run } }
+ }));
+ assert.equal(result.status.state, 'success');
+ assert.deepEqual(result.pullsRequested, [routedNumber, routedNumber]);
+ assert.match(result.status.target_url, /pull\/7059$/);
+});
+
+test('a PR head change during validation prevents posting obsolete success', async () => {
+ const result = await evaluate([handoff(sha, 'IOS, ANDROID')], hostedOptions({
+ afterHead: 'd'.repeat(40)
+ }));
+ assert.equal(result.statuses.length, 0);
+ assert.match(result.failures[0], /PR head changed/);
+});
+
+test('documentation and GitHub metadata exemption never consumes hosted CI assertions', async () => {
+ const result = await evaluate([], hostedOptions({ files: [
+ { filename: 'AGENTS.md' }, { filename: '.github/workflows/keeper-hosted-native.yml' }
+ ] }));
+ assert.equal(result.status.state, 'success');
+ assert.equal(result.runsCalls.length, 0);
+ assert.equal(result.jobsCalls.length, 0);
+});
+
+test('hosted workflow lifecycle events refresh the privileged gate under the exact workflow name', () => {
+ const nativeWorkflow = fs.readFileSync(path.join(path.dirname(workflowPath),
+ 'keeper-hosted-native.yml'), 'utf8');
+ const name = nativeWorkflow.match(/^name:\s*(.+)$/m)?.[1];
+ assert.ok(name, 'hosted workflow must have a name');
+ assert.ok(lines.some(line => line.trim() === `workflows: [${name}]`),
+ 'workflow_run must name the actual hosted workflow');
+ assert.ok(lines.some(line => line.trim() === 'types: [completed, requested, in_progress]'),
+ 'new attempts must invalidate old hosted evidence promptly');
+});
diff --git a/.github/tests/nodeify.test.cjs b/.github/tests/nodeify.test.cjs
new file mode 100644
index 000000000..400c36534
--- /dev/null
+++ b/.github/tests/nodeify.test.cjs
@@ -0,0 +1,38 @@
+'use strict';
+
+const assert = require('node:assert/strict');
+const fs = require('node:fs');
+const os = require('node:os');
+const path = require('node:path');
+const { spawnSync } = require('node:child_process');
+const test = require('node:test');
+
+const wrapper = path.resolve(__dirname, '../native/nodeify.cjs');
+
+test('native shim preparation filters upstream defaults without requesting installation', t => {
+ const root = fs.mkdtempSync(path.join(os.tmpdir(), 'keeper-nodeify-'));
+ t.after(() => fs.rmSync(root, { recursive: true, force: true }));
+ const upstream = path.join(root, 'node_modules/rn-nodeify');
+ fs.mkdirSync(upstream, { recursive: true });
+ fs.writeFileSync(path.join(upstream, 'coreList.js'), "module.exports = ['constants', 'fs', 'net'];\n");
+ fs.writeFileSync(path.join(upstream, 'cmd.js'), `
+ process.stdout.write(JSON.stringify({
+ shims: require('./coreList'), arguments: process.argv.slice(2)
+ }));
+ `);
+ const result = spawnSync(process.execPath, ['-e',
+ 'require(process.argv[1]).runNodeify(process.cwd())', wrapper], { cwd: root, encoding: 'utf8' });
+ assert.equal(result.status, 0, result.stderr);
+ const output = JSON.parse(result.stdout);
+ assert.deepEqual(output.arguments, ['--hack']);
+ assert.deepEqual(output.shims, [
+ 'buffer', 'events', 'process', 'stream', 'inherits', 'path', 'assert', 'crypto',
+ ]);
+ assert.ok(!output.shims.includes('constants'));
+});
+
+test('native shim preparation rejects an unrelated working directory', () => {
+ const { runNodeify } = require(wrapper);
+ assert.throws(() => runNodeify(path.join(os.tmpdir(), 'unrelated-keeper-checkout')),
+ /repository root/);
+});
diff --git a/.github/tests/test_hosted_native.py b/.github/tests/test_hosted_native.py
new file mode 100644
index 000000000..86b53e1a7
--- /dev/null
+++ b/.github/tests/test_hosted_native.py
@@ -0,0 +1,506 @@
+"""Pure hosted-harness checks: these do not claim native simulator evidence."""
+
+import hashlib
+import importlib.util
+import json
+from pathlib import Path
+import subprocess
+import sys
+import tempfile
+import unittest
+from unittest import mock
+
+
+SPEC = importlib.util.spec_from_file_location(
+ 'hosted_native', Path(__file__).resolve().parents[1] / 'native' / 'hosted_native.py')
+native = importlib.util.module_from_spec(SPEC)
+SPEC.loader.exec_module(native)
+
+
+class HostedNativeHarnessTest(unittest.TestCase):
+ def setUp(self):
+ self.directory = tempfile.TemporaryDirectory()
+ self.addCleanup(self.directory.cleanup)
+ self.root = Path(self.directory.name)
+ self.patches = mock.patch.multiple(native, ROOT=self.root, PRIVATE=self.root / 'private',
+ EVIDENCE=self.root / 'evidence/metadata.json', PLATFORM='ANDROID')
+ self.patches.start()
+ self.addCleanup(self.patches.stop)
+ native.save({'commands': [], 'build': 'NOT RUN', 'smoke': 'NOT RUN'})
+
+ def test_success_records_command_and_duration_without_output(self):
+ script = self.root / 'output.py'
+ script.write_text('print("private output")')
+ result = native.command([sys.executable, str(script)], 'Success', capture=True)
+ self.assertEqual(result, 'private output')
+ record = native.read()['commands'][0]
+ self.assertEqual(record['exit_code'], 0)
+ self.assertGreaterEqual(record['duration_seconds'], 0)
+ self.assertNotIn('private output', native.EVIDENCE.read_text())
+
+ def test_failure_exposes_only_allowlisted_diagnostic(self):
+ script = self.root / 'failure.py'
+ script.write_text('print("private payload: lockfile needs to be updated"); raise SystemExit(3)')
+ with self.assertRaisesRegex(RuntimeError, 'Manifest and yarn.lock are inconsistent'):
+ native.command([sys.executable, str(script)], 'Install')
+ record = native.read()['commands'][0]
+ self.assertEqual(record['exit_code'], 3)
+ self.assertNotIn('private payload', native.EVIDENCE.read_text())
+
+ def test_hierarchy_command_failure_never_exports_arbitrary_error_lines(self):
+ script = self.root / 'hierarchy_failure.py'
+ script.write_text('print("error: PRIVATE_SENTINEL hierarchy data"); raise SystemExit(1)')
+ with self.assertRaisesRegex(RuntimeError, 'exit 1'):
+ native.command([sys.executable, str(script)], 'Driver hierarchy', error_details=False)
+ self.assertEqual(native.read()['commands'][0]['redacted_tool_errors'], [])
+ self.assertNotIn('PRIVATE_SENTINEL', native.EVIDENCE.read_text())
+
+ def test_tool_error_details_are_bounded_and_redacted(self):
+ output = 'private payload\nerror: missing module https://example.test/private token=secret\n' \
+ + 'Caused by: password=private Bearer private\n' + 'error: detail\n' * 30
+ details = native.failure_details(output)
+ self.assertEqual(len(details), 20)
+ self.assertNotIn('private', '\n'.join(details))
+ self.assertIn('token=[REDACTED]', details[0])
+ self.assertIn('[URL]', details[0])
+ kotlin = '> Task :compile\n' * 40 + 'e: file:///runner/App.kt:1 unresolved reference'
+ self.assertEqual(native.failure_details(kotlin), ['e: file:///runner/App.kt:1 unresolved reference'])
+ excerpts = ''.join(' %s | +(NSDictionary*)statWithError:(NSError**)error:\n' % line
+ for line in range(30))
+ self.assertEqual(native.failure_details(excerpts + 'error: actual compiler failure'),
+ ['error: actual compiler failure'])
+
+ def test_timeout_records_failure_and_terminates_process(self):
+ with self.assertRaisesRegex(RuntimeError, 'exit 124'):
+ native.command([sys.executable, '-c', 'import time; time.sleep(30)'], 'Timeout', timeout=0.05)
+ self.assertEqual(native.read()['commands'][0]['exit_code'], 124)
+
+ def test_startup_diagnostics_keep_fixed_failed_steps_and_redact_error_messages(self):
+ maestro = '\n'.join([
+ 'Assert that "Create a passcode" is visible... FAILED',
+ 'Tap on id: key_2... FAILED',
+ 'Tap on "private recovery phrase"... FAILED',
+ 'UI hierarchy: private state',
+ 'Assertion is false: "Create a passcode" is visible; UI hierarchy: PRIVATE_SENTINEL',
+ 'Element not found: key_1; private arbitrary suffix',
+ ])
+ messages = native.maestro_failure_details(maestro)
+ self.assertTrue(any('Create a passcode' in message for message in messages))
+ self.assertIn('Maestro tap key_2 FAILED', messages)
+ self.assertNotIn('private', '\n'.join(messages))
+ self.assertNotIn('PRIVATE_SENTINEL', '\n'.join(messages))
+ self.assertNotIn('hierarchy', '\n'.join(messages))
+ self.assertIn('Maestro assertion failed: Create a passcode', messages)
+ self.assertIn('Maestro element not found: key_1', messages)
+ metro = native.metro_startup_errors(' BUNDLE index.js\n ERROR Error: Unable to resolve module token=private https://example.test/private; View hierarchy: PRIVATE_SENTINEL')
+ self.assertEqual(len(metro), 1)
+ self.assertNotIn('private', metro[0])
+ self.assertNotIn('PRIVATE_SENTINEL', metro[0])
+ native_errors = native.android_startup_errors('\n'.join([
+ 'E/AndroidRuntime( 123): FATAL EXCEPTION: main; credentials: PRIVATE_SENTINEL',
+ 'E/ReactNativeJS( 123): TypeError: Cannot load module token=private',
+ 'E/OtherApp( 124): Error: private unrelated data',
+ 'E/ReactNativeJS( 123): at unneeded stack frame',
+ ]))
+ self.assertEqual(len(native_errors), 2)
+ self.assertNotIn('private', '\n'.join(native_errors))
+ self.assertNotIn('PRIVATE_SENTINEL', '\n'.join(native_errors))
+
+ def test_junit_failure_collection_omits_hierarchy_and_preserves_failed_result(self):
+ native.PRIVATE.mkdir()
+ native.save({'commands': [], 'build': 'PASS', 'smoke': 'FAIL'})
+ (native.PRIVATE / 'metro.log').write_text('No bundler error\n')
+ report = native.PRIVATE / 'smoke-junit.xml'
+ report.write_text(''
+ 'Assertion is false: Create a passcode is visible\nUI hierarchy: private data'
+ '')
+ hierarchy = native.PRIVATE / 'maestro-output/2026-10-17_092233/Disposable startup and passcode input/screen-hierarchy'
+ hierarchy.mkdir(parents=True)
+ (hierarchy / 'step-002-assertCondition-Create_a_passcode.json').write_text(json.dumps({
+ 'attributes': {'accessibilityText': 'PRIVATE_SENTINEL', 'resource-id': 'redbox-error'},
+ 'children': [{'attributes': {'accessibilityText': 'No script URL provided. PRIVATE_SENTINEL'}}]}))
+ native.record_startup_failure(report, None)
+ data = native.read()
+ self.assertEqual(data['smoke'], 'FAIL')
+ self.assertEqual(data['startup_diagnostics']['maestro']['testcase_statuses'], ['ERROR'])
+ self.assertNotIn('private data', native.EVIDENCE.read_text())
+ self.assertNotIn('PRIVATE_SENTINEL', native.EVIDENCE.read_text())
+ self.assertTrue(data['startup_diagnostics']['hierarchy_signals']['RNredbox'])
+ self.assertTrue(data['startup_diagnostics']['hierarchy_signals']['noScriptURL'])
+ self.assertTrue(data['startup_diagnostics']['maestro']['testcase_failures'])
+
+ def test_private_hierarchy_exports_only_fixed_signals_from_standalone_tree_nodes(self):
+ hierarchy = self.root / 'maestro-output/2026-10-17_092233/Disposable startup and passcode input/screen-hierarchy'
+ hierarchy.mkdir(parents=True)
+ (hierarchy / 'step-002-assertCondition-Create_a_passcode.json').write_text(json.dumps({
+ 'attributes': {'accessibilityText': 'Create a passcode', 'value': 'PRIVATE_SENTINEL'},
+ 'children': [
+ {'attributes': {'accessibilityText': 'Confirm your passcode'}},
+ {'attributes': {'resource-id': 'io.hexawallet.keeper.development:id/rn_redbox_stack',
+ 'text': 'Could not connect to development server. PRIVATE_SENTINEL'}},
+ {'attributes': {'title': 'Unable to load script. PRIVATE_SENTINEL'}},
+ {'attributes': {'text': 'SpringBoard PRIVATE_SENTINEL'}, 'children': None},
+ ]}))
+ # Other JSON files are not hierarchy snapshots and must not be parsed.
+ (hierarchy.parent / 'commands.json').write_text('{ malformed PRIVATE_SENTINEL')
+ signals = native.startup_hierarchy_signals(self.root / 'maestro-output')
+ self.assertEqual(signals, {'createPIN': True, 'confirmPIN': True, 'RNredbox': True,
+ 'noScriptURL': False, 'developmentServerError': True,
+ 'unableLoadScript': True, 'snapshot_count': 1, 'parse_error_types': []})
+ self.assertNotIn('PRIVATE_SENTINEL', json.dumps(signals))
+ self.assertNotIn('SpringBoard', json.dumps(signals))
+
+ def test_private_hierarchy_bounds_bytes_and_nodes_and_records_only_parse_error_classes(self):
+ hierarchy = self.root / 'maestro-output/screen-hierarchy'
+ hierarchy.mkdir(parents=True)
+ (hierarchy / 'step-001-malformed.json').write_text('{ PRIVATE_SENTINEL')
+ (hierarchy / 'step-002-oversize.json').write_bytes(b'PRIVATE_SENTINEL' * (1024 * 1024 // 8))
+ (hierarchy / 'step-003-too-many-nodes.json').write_text(json.dumps({
+ 'attributes': {'accessibilityText': 'Create a passcode'}, 'children': [{}] * 10000}))
+ signals = native.startup_hierarchy_signals(self.root / 'maestro-output')
+ self.assertEqual(signals['snapshot_count'], 3)
+ self.assertEqual(set(signals['parse_error_types']), {'JSONDecodeError', 'ValueError'})
+ self.assertFalse(signals['createPIN'])
+ self.assertNotIn('PRIVATE_SENTINEL', json.dumps(signals))
+
+ def test_maestro_preflight_retains_fixed_driver_markers_and_known_types_without_raw_messages(self):
+ output = native.PRIVATE / 'maestro-output'
+ output.mkdir(parents=True)
+ native.save({'commands': [{'label': 'Assert startup and disposable passcode transition'}],
+ 'smoke': 'FAIL'})
+ (native.PRIVATE / 'command-001.log').write_text(
+ 'xcuitest.installer.LocalXCTestInstaller$IOSDriverTimeoutException: '
+ 'iOS driver not ready in time, consider increasing timeout by configuring '
+ 'MAESTRO_DRIVER_STARTUP_TIMEOUT env variable PRIVATE_SENTINEL\n'
+ 'PRIVATE_SENTINELException: arbitrary exception names must not escape\n')
+ (output / 'maestro.log').write_text(
+ '[Start] Install XCUITest runner on PRIVATE_SENTINEL\n'
+ '[Done] Install XCUITest runner on PRIVATE_SENTINEL\n'
+ '[Start] Perform XCUITest driver status check on PRIVATE_SENTINEL\n'
+ '[Done] Perform XCUITest driver status check on PRIVATE_SENTINEL\n'
+ '[Failed] Perform XCUITest driver status check on PRIVATE_SENTINEL\n'
+ 'Installing pre built driver without xcodebuild PRIVATE_SENTINEL\n'
+ 'Requested driver host port PRIVATE_SENTINEL is not available\n')
+ (output / 'xctest_runner_fixture.log').write_text(
+ 'java.io.FileNotFoundException: xctestrun config does not exist PRIVATE_SENTINEL\n'
+ 'ui test runner does not exist PRIVATE_SENTINEL\n'
+ '** TEST EXECUTE FAILED ** PRIVATE_SENTINEL\nTesting failed: PRIVATE_SENTINEL\n')
+ result = native.maestro_preflight_diagnostics()
+ self.assertTrue(result['driver_startup_timeout'])
+ self.assertTrue(result['runner_install_started'])
+ self.assertTrue(result['runner_install_launch_returned'])
+ self.assertTrue(result['status_response_received'])
+ self.assertTrue(result['status_check_failed'])
+ self.assertTrue(result['host_port_unavailable'])
+ self.assertTrue(result['xctestrun_config_missing'])
+ self.assertTrue(result['ui_test_runner_missing'])
+ self.assertTrue(result['xcode_test_execute_failed'])
+ self.assertTrue(result['xcode_testing_failed'])
+ self.assertEqual(set(result['exception_types']), {'IOSDriverTimeoutException', 'FileNotFoundException'})
+ self.assertEqual(result['logs_read'], 3)
+ self.assertNotIn('PRIVATE_SENTINEL', json.dumps(result))
+ self.assertNotIn(str(output), json.dumps(result))
+ self.assertNotIn('driver_ready', result)
+ self.assertEqual(native.read()['smoke'], 'FAIL')
+
+ def test_ios_driver_preflight_is_setup_only_and_cleans_only_its_created_simulator(self):
+ native.save({'commands': [], 'maestro': {'binary': '/private/maestro'},
+ 'build': 'NOT RUN', 'smoke': 'NOT RUN'})
+ owned = '12345678-1234-1234-1234-123456789abc'
+ with mock.patch.object(native, 'PLATFORM', 'IOS'), mock.patch.dict(native.os.environ), \
+ mock.patch.object(native, 'command', side_effect=[owned, None, None, None]) as command, \
+ mock.patch.object(subprocess, 'run', return_value=subprocess.CompletedProcess([], 0)) as cleanup:
+ native.driver()
+ self.assertEqual(native.os.environ['XDG_STATE_HOME'], str(native.PRIVATE / 'maestro-preflight-state'))
+ self.assertEqual(command.call_args.args[0],
+ ['/private/maestro', '--platform', 'ios', '--device', owned, 'hierarchy'])
+ self.assertFalse(command.call_args.kwargs['error_details'])
+ self.assertEqual([call.args[0] for call in cleanup.call_args_list],
+ [['xcrun', 'simctl', 'shutdown', owned], ['xcrun', 'simctl', 'delete', owned]])
+ self.assertEqual(native.read()['driver_preflight']['result'], 'PASS')
+ self.assertEqual(native.read()['build'], 'NOT RUN')
+ self.assertEqual(native.read()['smoke'], 'NOT RUN')
+
+ def test_ios_driver_failure_preserves_original_error_and_attempts_delete_after_cleanup_timeout(self):
+ native.save({'commands': [], 'maestro': {'binary': '/private/maestro'},
+ 'build': 'NOT RUN', 'smoke': 'NOT RUN'})
+ owned = '12345678-1234-1234-1234-123456789abc'
+ with mock.patch.object(native, 'PLATFORM', 'IOS'), mock.patch.dict(native.os.environ), \
+ mock.patch.object(native, 'command', side_effect=[owned, None, None, RuntimeError('driver failed PRIVATE_SENTINEL')]), \
+ mock.patch.object(subprocess, 'run', side_effect=[subprocess.TimeoutExpired('shutdown', 30),
+ subprocess.CompletedProcess([], 0)]) as cleanup, \
+ self.assertRaisesRegex(RuntimeError, 'driver failed PRIVATE_SENTINEL'):
+ native.run_phase('driver')
+ self.assertEqual(cleanup.call_count, 2)
+ self.assertEqual(cleanup.call_args.args[0], ['xcrun', 'simctl', 'delete', owned])
+ data = native.read()
+ self.assertEqual(data['driver_preflight']['result'], 'FAIL')
+ self.assertEqual(data['driver_preflight']['cleanup_errors'], [{'action': 'shutdown', 'error_type': 'TimeoutExpired'}])
+ self.assertEqual(data['failed_phase'], 'driver')
+ self.assertEqual(data['build'], 'NOT RUN')
+ self.assertEqual(data['smoke'], 'NOT RUN')
+ self.assertNotIn('PRIVATE_SENTINEL', native.EVIDENCE.read_text())
+
+ def test_driver_preflight_diagnostics_cannot_contaminate_smoke_flags(self):
+ native.PRIVATE.mkdir()
+ driver_label = 'Check disposable iOS driver readiness'
+ native.save({'commands': [{'label': driver_label},
+ {'label': 'Assert startup and disposable passcode transition'}]})
+ (native.PRIVATE / 'command-001.log').write_text('IOSDriverTimeoutException PRIVATE_SENTINEL\n')
+ (native.PRIVATE / 'command-002.log').write_text('ordinary smoke output PRIVATE_SENTINEL\n')
+ state = native.PRIVATE / 'maestro-preflight-state/maestro/tests/timestamp'
+ state.mkdir(parents=True)
+ (state / 'maestro.log').write_text('** TEST EXECUTE FAILED ** PRIVATE_SENTINEL\n')
+ driver = native.maestro_preflight_diagnostics(state.parent, driver_label)
+ smoke = native.maestro_preflight_diagnostics()
+ self.assertTrue(driver['xcode_test_execute_failed'])
+ self.assertEqual(driver['exception_types'], ['IOSDriverTimeoutException'])
+ self.assertFalse(smoke['xcode_test_execute_failed'])
+ self.assertEqual(smoke['exception_types'], [])
+ self.assertNotIn('PRIVATE_SENTINEL', json.dumps(driver))
+
+ def test_maestro_preflight_bounds_files_bytes_and_collection_errors_without_changing_failure(self):
+ output = native.PRIVATE / 'maestro-output'
+ output.mkdir(parents=True)
+ native.save({'commands': [], 'smoke': 'FAIL'})
+ (output / 'maestro.log').write_bytes(
+ b'PRIVATE_SENTINEL' * (1024 * 1024 // 8) + b'\nInstalling driver with xcodebuild\n')
+ for index in range(7):
+ (output / ('xctest_runner_%s.log' % index)).write_text('PRIVATE_SENTINEL\n')
+ result = native.maestro_preflight_diagnostics()
+ self.assertEqual(result['logs_read'], 6)
+ self.assertTrue(result['log_limit_reached'])
+ self.assertEqual(result['truncated_logs'], 1)
+ self.assertFalse(result['xcodebuild_driver_selected'])
+ self.assertNotIn('PRIVATE_SENTINEL', json.dumps(result))
+ with mock.patch.object(native, 'private_log_prefix', side_effect=OSError('PRIVATE_SENTINEL')):
+ result = native.maestro_preflight_diagnostics()
+ self.assertEqual(result['collection_error_types'], ['OSError'])
+ self.assertEqual(native.read()['smoke'], 'FAIL')
+
+ def test_ios_startup_errors_restrict_process_and_redact_first_error_line(self):
+ payload = '\n'.join([
+ 'Filtering the log data using the process predicate',
+ 'Timestamp Ty Process[PID:TID]',
+ '2026-10-17 09:22:33.123 E hexa_keeper_dev[123:abc] [com.facebook.react:javascript] NSException: module failed token=private; UI hierarchy: PRIVATE_SENTINEL',
+ 'private stack continuation',
+ '2026-10-17 09:22:34.123 E OtherApp[124:def] Error: hexa_keeper_dev private unrelated application',
+ '2026-10-17 09:22:35.123 Df hexa_keeper_dev[123:abc] normal startup message',
+ '2026-10-17 09:22:36.123 Df hexa_keeper_dev[123:abc] ReferenceError: missing startup module',
+ 'PRIVATE_SENTINEL multiline continuation',
+ '2026-10-17 09:22:37.123+0000 Df hexa_keeper_dev[123:abc] NSException: failed native startup',
+ 'PRIVATE_SENTINEL multiline continuation',
+ 'Error: hexa_keeper_dev[123:abc] missing timestamp must not be accepted',
+ ])
+ diagnostics = native.ios_startup_diagnostics(payload, 'hexa_keeper_dev')
+ errors = diagnostics['errors']
+ self.assertEqual(diagnostics['matching_process_records'], 4)
+ self.assertEqual(len(errors), 3)
+ self.assertIn('NSException: module failed', errors[0])
+ self.assertIn('ReferenceError: missing startup module', errors[1])
+ self.assertIn('NSException: failed native startup', errors[2])
+ self.assertNotIn('private', '\n'.join(errors))
+ self.assertNotIn('PRIVATE_SENTINEL', '\n'.join(errors))
+ self.assertEqual(native.ios_startup_diagnostics('no compact records', 'hexa_keeper_dev')['matching_process_records'], 0)
+
+ def test_ios_collector_keeps_launch_prefix_when_log_is_truncated_and_preserves_failure(self):
+ native.PRIVATE.mkdir()
+ native.save({'commands': [], 'smoke': 'FAIL', 'built_artifact': {'executable': 'hexa_keeper_dev'}})
+ (native.PRIVATE / 'metro.log').write_text('\x1b[32m BUNDLE \x1b[0m private-path/index.js\n'
+ ' BUNDLE private-path/index.js\n PREBUNDLE private-path/index.js\n')
+
+ def compact_log(args, stdout, **kwargs):
+ self.assertEqual(args[args.index('--style') + 1], 'compact')
+ self.assertEqual(args[args.index('--last') + 1], '10m')
+ stdout.write(b'2026-10-17 09:22:33.123 Df hexa_keeper_dev[123:abc] ReferenceError: launch module failed token=private\n')
+ stdout.write(b'2026-10-17 09:22:34.123 E OtherApp[124:def] Error: private unrelated data\n')
+ # The first MiB ends within a continuation, not a complete record.
+ stdout.write(b'PRIVATE_SENTINEL' * (1024 * 1024 // 8))
+ stdout.write(b'\n2026-10-17 09:30:33.123 E hexa_keeper_dev[123:abc] Error: tail must not replace launch evidence\n')
+ return subprocess.CompletedProcess(args, 0)
+
+ with mock.patch.object(native, 'PLATFORM', 'IOS'), \
+ mock.patch.object(subprocess, 'run', side_effect=compact_log):
+ native.record_startup_failure(native.PRIVATE / 'missing-report.xml', 'owned-simulator')
+ data = native.read()
+ self.assertEqual(data['smoke'], 'FAIL')
+ diagnostics = data['startup_diagnostics']['ios_errors']
+ self.assertTrue(diagnostics['input_truncated'])
+ self.assertEqual(diagnostics['matching_process_records'], 1)
+ self.assertEqual(diagnostics['errors'], ['error: iOS ReferenceError: launch module failed token=[REDACTED]'])
+ self.assertEqual(data['startup_diagnostics']['metro_progress'],
+ {'bundle_marker_observed': True, 'bundle_marker_count': 2, 'prebundle_marker_count': 1})
+ self.assertNotIn('private unrelated', native.EVIDENCE.read_text())
+ self.assertNotIn('PRIVATE_SENTINEL', native.EVIDENCE.read_text())
+ self.assertNotIn('private-path', native.EVIDENCE.read_text())
+
+ def test_warmup_keeps_each_platform_body_private_and_does_not_supply_smoke_evidence(self):
+ native.PRIVATE.mkdir()
+ body = b'disposable development bundle PRIVATE_SENTINEL'
+
+ def warmup(args, *unused, **kwargs):
+ self.assertEqual(args[-1], 'http://127.0.0.1:8081/index.bundle?platform=%s&dev=true&minify=false'
+ % platform.lower())
+ Path(args[args.index('--output') + 1]).write_bytes(body)
+ return '200'
+
+ for platform in ['IOS', 'ANDROID']:
+ with self.subTest(platform=platform), mock.patch.object(native, 'PLATFORM', platform), \
+ mock.patch.object(native, 'command', side_effect=warmup):
+ native.warm_metro_bundle()
+ data = native.read()
+ self.assertEqual(data['smoke'], 'NOT RUN')
+ self.assertEqual(data['metro_warmup']['platform'], platform.lower())
+ self.assertEqual(data['metro_warmup']['result'], 'PASS')
+ self.assertEqual(data['metro_warmup']['http_status'], 200)
+ self.assertEqual(data['metro_warmup']['bytes'], len(body))
+ self.assertEqual(data['metro_warmup']['sha256'], hashlib.sha256(body).hexdigest())
+ self.assertNotIn('PRIVATE_SENTINEL', native.EVIDENCE.read_text())
+ with mock.patch.object(native, 'command', side_effect=RuntimeError('HTTP error')), \
+ self.assertRaisesRegex(RuntimeError, 'HTTP error'):
+ native.warm_metro_bundle()
+ self.assertEqual(native.read()['metro_warmup']['result'], 'FAIL')
+ self.assertEqual(native.read()['smoke'], 'NOT RUN')
+ with mock.patch.object(native, 'PLATFORM', 'unsupported&private=value'), \
+ mock.patch.object(native, 'command') as command, \
+ self.assertRaisesRegex(ValueError, 'Unsupported native bundle platform'):
+ native.warm_metro_bundle()
+ command.assert_not_called()
+
+ def test_ios_collector_rejects_unsafe_executable_without_running_command(self):
+ native.PRIVATE.mkdir()
+ native.save({'commands': [], 'smoke': 'FAIL', 'built_artifact': {'executable': '../unsafe"'}})
+ (native.PRIVATE / 'metro.log').write_text('')
+ with mock.patch.object(native, 'PLATFORM', 'IOS'), mock.patch.object(subprocess, 'run') as run:
+ native.record_startup_failure(native.PRIVATE / 'missing-report.xml', 'owned-simulator')
+ run.assert_not_called()
+ self.assertEqual(native.read()['smoke'], 'FAIL')
+ self.assertIn({'stage': 'ios_errors', 'error_type': 'ValueError'},
+ native.read()['startup_diagnostics']['collection_errors'])
+
+ def test_diagnostic_failure_never_replaces_original_smoke_failure(self):
+ native.PRIVATE.mkdir()
+ identity = {'sha256': 'test artifact'}
+ native.save({'commands': [], 'build': 'PASS', 'smoke': 'NOT RUN', 'built_artifact': identity})
+ metro = mock.Mock()
+ metro.poll.return_value = 1
+ with mock.patch.object(native, 'artifact_identity', return_value=identity), \
+ mock.patch.object(subprocess, 'Popen', return_value=metro), \
+ mock.patch.object(native, 'record_startup_failure', side_effect=RuntimeError('collector failed')), \
+ self.assertRaisesRegex(RuntimeError, 'Metro exited before the disposable smoke'):
+ native.run_phase('smoke')
+ self.assertEqual(native.read()['smoke'], 'FAIL')
+ self.assertEqual(native.read()['startup_diagnostics']['collection_errors'],
+ [{'stage': 'collector', 'error_type': 'RuntimeError'}])
+
+ def test_missing_executable_is_recorded(self):
+ with self.assertRaisesRegex(RuntimeError, 'exit 127'):
+ native.command([str(self.root / 'missing-command')], 'Missing')
+ self.assertEqual(native.read()['commands'][0]['exit_code'], 127)
+
+ def test_record_rejects_wrong_source_sha_before_collecting_evidence(self):
+ before = native.EVIDENCE.read_bytes()
+ with mock.patch.dict(native.os.environ, {'KEEPER_SOURCE_SHA': 'b' * 40}), \
+ mock.patch.object(subprocess, 'check_output', return_value='a' * 40 + '\n'), \
+ self.assertRaisesRegex(RuntimeError, 'exact requested PR head'):
+ native.record()
+ self.assertEqual(native.EVIDENCE.read_bytes(), before)
+
+ def test_android_fixtures_use_only_dummy_project_and_loopback_services(self):
+ (self.root / 'android/app').mkdir(parents=True)
+ native.fixtures()
+ environment = (self.root / '.env.ci').read_text()
+ self.assertIn('ENVIRONMENT=DEVELOPMENT', environment)
+ for line in environment.splitlines():
+ if 'https://' in line:
+ self.assertIn('127.0.0.1:9', line)
+ firebase = json.loads((self.root / 'android/app/google-services.json').read_text())
+ self.assertEqual(firebase['project_info']['project_id'], 'keeper-disposable-ci')
+ settings = json.loads((self.root / 'firebase.json').read_text())['react-native']
+ self.assertFalse(settings['messaging_auto_init_enabled'])
+ self.assertFalse(settings['app_data_collection_default_enabled'])
+ for overlay in native.read()['configuration_overlays']:
+ self.assertEqual(overlay['sha256'], hashlib.sha256((self.root / overlay['path']).read_bytes()).hexdigest())
+ self.assertEqual(len(native.read()['configuration_overlays']), 3)
+
+ def test_ios_fixtures_cover_both_tracked_firebase_files(self):
+ (self.root / 'ios/GoogleServices/dev').mkdir(parents=True)
+ with mock.patch.object(native, 'PLATFORM', 'IOS'):
+ native.fixtures()
+ paths = {overlay['path'] for overlay in native.read()['configuration_overlays']}
+ self.assertEqual(paths, {'.env.ci', 'firebase.json', 'ios/GoogleService-Info.plist',
+ 'ios/GoogleServices/dev/GoogleService-Info.plist'})
+
+ def test_emulator_revision_comes_from_sdk_metadata_without_executing_binary(self):
+ emulator = self.root / 'emulator'
+ emulator.mkdir()
+ (emulator / 'source.properties').write_text('Pkg.Revision = 36.6.11\nUnrelated = ignored\n')
+ with mock.patch.object(subprocess, 'Popen') as popen:
+ self.assertEqual(native.android_sdk_metadata(self.root, 'emulator'), {'Pkg.Revision': '36.6.11'})
+ popen.assert_not_called()
+
+ def test_emulator_metadata_must_exist_and_contain_revision(self):
+ with self.assertRaises(FileNotFoundError):
+ native.android_sdk_metadata(self.root, 'emulator')
+ emulator = self.root / 'emulator'
+ emulator.mkdir()
+ for text in ['Pkg.Desc = Android Emulator\n', 'Pkg.Revision = \n']:
+ with self.subTest(properties=text):
+ (emulator / 'source.properties').write_text(text)
+ with self.assertRaisesRegex(RuntimeError, 'no Pkg.Revision metadata'):
+ native.android_sdk_metadata(self.root, 'emulator')
+
+ def test_smoke_requires_successful_build(self):
+ with mock.patch.object(subprocess, 'Popen') as popen, \
+ self.assertRaisesRegex(RuntimeError, 'successful native build'):
+ native.smoke()
+ popen.assert_not_called()
+
+ def test_ios_build_rejects_unsupported_architecture_before_invoking_xcode(self):
+ with mock.patch.object(native, 'PLATFORM', 'IOS'), \
+ mock.patch.object(native.platform, 'machine', return_value='riscv64'), \
+ mock.patch.object(native, 'command') as command, \
+ self.assertRaisesRegex(RuntimeError, 'Unsupported hosted iOS simulator architecture'):
+ native.build()
+ command.assert_not_called()
+
+ def test_ios_build_uses_only_the_supported_host_simulator_architecture(self):
+ for architecture in ['arm64', 'x86_64']:
+ with self.subTest(architecture=architecture), \
+ mock.patch.object(native, 'PLATFORM', 'IOS'), \
+ mock.patch.object(native.platform, 'machine', return_value=architecture), \
+ mock.patch.object(native, 'artifact_identity', return_value={'sha256': 'test artifact'}), \
+ mock.patch.object(native, 'command') as command:
+ native.build()
+ arguments = command.call_args.args[0]
+ self.assertIn('ARCHS=' + architecture, arguments)
+ self.assertIn('ONLY_ACTIVE_ARCH=YES', arguments)
+ self.assertIn('CODE_SIGNING_ALLOWED=NO', arguments)
+ self.assertEqual(command.call_args.kwargs['timeout'], 2400)
+ self.assertEqual(native.read()['toolchain']['ios_simulator_architecture'], architecture)
+
+ def test_artifact_hash_detects_changed_apk_before_smoke(self):
+ apk = self.root / 'android/app/build/outputs/apk/development/debug/app-development-debug.apk'
+ apk.parent.mkdir(parents=True)
+ apk.write_bytes(b'first disposable artifact')
+ identity = native.artifact_identity()
+ self.assertEqual(identity['sha256'], hashlib.sha256(apk.read_bytes()).hexdigest())
+ native.save({'commands': [], 'build': 'PASS', 'smoke': 'NOT RUN', 'built_artifact': identity})
+ apk.write_bytes(b'replacement artifact')
+ with mock.patch.object(subprocess, 'Popen') as popen, \
+ self.assertRaisesRegex(RuntimeError, 'artifact changed'):
+ native.smoke()
+ popen.assert_not_called()
+
+ def test_failed_build_and_smoke_are_never_recorded_as_pass(self):
+ for phase in ['build', 'smoke']:
+ with self.subTest(phase=phase), \
+ mock.patch.object(native, phase, side_effect=RuntimeError('failure')), \
+ self.assertRaisesRegex(RuntimeError, 'failure'):
+ native.run_phase(phase)
+ self.assertEqual(native.read()[phase], 'FAIL')
+ self.assertEqual(native.read()['failed_phase'], phase)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/.github/workflows/keeper-hosted-native.yml b/.github/workflows/keeper-hosted-native.yml
new file mode 100644
index 000000000..ce351c16c
--- /dev/null
+++ b/.github/workflows/keeper-hosted-native.yml
@@ -0,0 +1,147 @@
+name: Keeper hosted native validation
+
+on:
+ pull_request:
+ branches: [sprint]
+ types: [opened, synchronize, reopened, ready_for_review]
+
+# PR code runs only in disposable, unprivileged jobs. No signing or service secrets.
+permissions:
+ contents: read
+
+concurrency:
+ group: keeper-hosted-native-${{ github.event.pull_request.number }}
+ cancel-in-progress: true
+
+env:
+ CI: 'true'
+ HUSKY: '0'
+ KEEPER_SOURCE_SHA: ${{ github.event.pull_request.head.sha }}
+ MAESTRO_CLI_NO_ANALYTICS: '1'
+
+jobs:
+ ios:
+ name: Hosted iOS simulator
+ runs-on: macos-15
+ timeout-minutes: 65
+ env:
+ KEEPER_NATIVE_PLATFORM: IOS
+ DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer
+ steps:
+ - name: Check out exact app source
+ uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
+ with:
+ ref: ${{ github.event.pull_request.head.sha }}
+ persist-credentials: false
+ - name: Set up Node
+ uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
+ with:
+ node-version: '22.22.0'
+ cache: yarn
+ - name: Set up Java for Maestro
+ uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
+ with:
+ distribution: temurin
+ java-version: '17'
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@675dd7ba1b06c8786a1480d89c384f5620a42647 # v1.281.0
+ with:
+ ruby-version: '3.3.8'
+ - name: Record runner and toolchain
+ run: python3 .github/native/hosted_native.py record
+ - name: Install immutable native dependencies
+ run: python3 .github/native/hosted_native.py prepare
+ - name: Check disposable iOS driver readiness
+ run: |
+ test "$(git rev-parse HEAD)" = '${{ github.event.pull_request.head.sha }}'
+ git diff --exit-code HEAD -- .github/native .github/workflows/keeper-hosted-native.yml
+ python3 .github/native/hosted_native.py driver
+ - name: Build development app
+ run: |
+ test "$(git rev-parse HEAD)" = '${{ github.event.pull_request.head.sha }}'
+ git diff --exit-code HEAD -- .github/native .github/workflows/keeper-hosted-native.yml
+ python3 .github/native/hosted_native.py build
+ - name: Run disposable startup smoke
+ run: |
+ test "$(git rev-parse HEAD)" = '${{ github.event.pull_request.head.sha }}'
+ git diff --exit-code HEAD -- .github/native .github/workflows/keeper-hosted-native.yml
+ python3 .github/native/hosted_native.py smoke
+ - name: Retain safe native evidence
+ if: always()
+ uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
+ with:
+ name: keeper-native-ios-${{ github.event.pull_request.head.sha }}
+ path: |
+ artifacts/native/ios/metadata.json
+ artifacts/native/ios/Podfile.lock.candidate
+ if-no-files-found: warn
+ retention-days: 7
+
+ android:
+ name: Hosted Android emulator
+ runs-on: ubuntu-24.04
+ timeout-minutes: 60
+ env:
+ KEEPER_NATIVE_PLATFORM: ANDROID
+ steps:
+ - name: Check out exact app source
+ uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
+ with:
+ ref: ${{ github.event.pull_request.head.sha }}
+ persist-credentials: false
+ - name: Set up Node
+ uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
+ with:
+ node-version: '22.22.0'
+ cache: yarn
+ - name: Set up Java
+ uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
+ with:
+ distribution: temurin
+ java-version: '17'
+ cache: gradle
+ - name: Set up Android command-line tools
+ uses: android-actions/setup-android@be39fa834029ff78f1a44aa3bb0819b8fc2bd8fd # v4
+ with:
+ cmdline-tools-version: '13114758'
+ packages: platform-tools
+ log-accepted-android-sdk-licenses: false
+ - name: Record runner and toolchain
+ run: python3 .github/native/hosted_native.py record
+ - name: Install immutable native dependencies
+ run: python3 .github/native/hosted_native.py prepare
+ - name: Build development app
+ run: |
+ test "$(git rev-parse HEAD)" = '${{ github.event.pull_request.head.sha }}'
+ git diff --exit-code HEAD -- .github/native .github/workflows/keeper-hosted-native.yml
+ python3 .github/native/hosted_native.py build
+ - name: Enable emulator acceleration
+ run: |
+ echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-keeper-kvm.rules
+ sudo udevadm control --reload-rules
+ sudo udevadm trigger --name-match=kvm
+ - name: Run disposable startup smoke
+ uses: reactivecircus/android-emulator-runner@324029e2f414c084d8b15ba075288885e74aef9c38 # v2.34.0
+ with:
+ api-level: 35
+ target: google_apis
+ arch: x86_64
+ profile: pixel_6
+ cores: 2
+ ram-size: 3072M
+ force-avd-creation: true
+ disable-animations: true
+ emulator-boot-timeout: 240
+ emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -no-snapshot -camera-back none -camera-front none
+ script: |
+ test "$(git rev-parse HEAD)" = '${{ github.event.pull_request.head.sha }}'
+ git diff --exit-code HEAD -- .github/native .github/workflows/keeper-hosted-native.yml
+ python3 .github/native/hosted_native.py smoke
+ - name: Retain safe native evidence
+ if: always()
+ uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
+ with:
+ name: keeper-native-android-${{ github.event.pull_request.head.sha }}
+ path: artifacts/native/android/metadata.json
+ if-no-files-found: warn
+ retention-days: 7
diff --git a/.github/workflows/keeper-local-validation.yml b/.github/workflows/keeper-local-validation.yml
index d66fc70f8..af64b8c8a 100644
--- a/.github/workflows/keeper-local-validation.yml
+++ b/.github/workflows/keeper-local-validation.yml
@@ -7,21 +7,25 @@ on:
types: [opened, reopened, synchronize, edited, ready_for_review]
issue_comment:
types: [created, edited, deleted]
+ workflow_run:
+ workflows: [Keeper hosted native validation]
+ types: [completed, requested, in_progress]
permissions:
contents: read
issues: read
pull-requests: read
+ actions: read
statuses: write
concurrency:
- group: keeper-local-validation-${{ github.event.pull_request.number || github.event.issue.number }}
+ group: keeper-local-validation-${{ github.event.pull_request.number || github.event.issue.number || github.event.workflow_run.pull_requests[0].number || github.run_id }}
cancel-in-progress: false
jobs:
keeper-local-validation:
name: Keeper local validation gate
- if: github.event_name == 'pull_request_target' || github.event.issue.pull_request != null
+ if: github.event_name == 'pull_request_target' || github.event.issue.pull_request != null || github.event.workflow_run.event == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Verify local validation for exact PR commit
@@ -30,7 +34,9 @@ jobs:
script: |
const owner = context.repo.owner;
const repo = context.repo.repo;
- const pull_number = context.payload.pull_request?.number ?? context.issue.number;
+ const pull_number = context.payload.pull_request?.number ??
+ context.payload.workflow_run?.pull_requests?.[0]?.number ?? context.issue.number;
+ if (!pull_number) return;
const { data: pr } = await github.rest.pulls.get({ owner, repo, pull_number });
if (pr.base.ref !== 'sprint') {
core.info('Only PRs targeting sprint use this validation gate.');
@@ -87,6 +93,75 @@ jobs:
return allowed;
};
+ // PR workflows are editable by the PR author. A successful check name
+ // alone is NOT evidence. All executable CI files must match both the
+ // protected current base and the base used by that particular run.
+ // This intentionally rejects this infrastructure PR's bootstrap runs.
+ const hostedPasses = async () => {
+ const passed = new Set();
+ try {
+ const workflowPath = '.github/workflows/keeper-hosted-native.yml';
+ const repository = owner + '/' + repo;
+ if (pr.head.repo?.full_name !== repository) return passed;
+ const runs = await github.paginate(github.rest.actions.listWorkflowRuns, {
+ owner, repo, workflow_id: 'keeper-hosted-native.yml',
+ head_sha: sha, event: 'pull_request', per_page: 100
+ });
+ // Do not fall back to an older success after a failed/cancelled
+ // rerun or while newer evidence is pending.
+ const run = runs.sort((a, b) => b.id - a.id)[0];
+ if (!run || run.head_sha !== sha || run.event !== 'pull_request' ||
+ run.path !== workflowPath || run.head_branch !== pr.head.ref ||
+ run.head_repository?.full_name !== repository ||
+ run.status !== 'completed' || !['success', 'failure'].includes(run.conclusion)) {
+ return passed;
+ }
+ const linked = run.pull_requests?.find(p => p.number === pull_number);
+ if (!linked || linked.head?.sha !== sha || linked.head?.ref !== pr.head.ref ||
+ linked.base?.ref !== 'sprint' || !linked.base?.sha ||
+ linked.head?.repo?.id !== pr.head.repo.id ||
+ linked.base?.repo?.id !== pr.base.repo?.id ||
+ !pr.head.repo.id || !pr.base.repo?.id ||
+ !Number.isSafeInteger(run.run_attempt) || run.run_attempt < 1) return passed;
+ const fingerprint = async ref => {
+ const { data } = await github.rest.git.getTree({ owner, repo, tree_sha: ref, recursive: '1' });
+ if (data.truncated) throw new Error('Truncated trusted CI tree');
+ const entries = data.tree.filter(e => e.path === workflowPath ||
+ e.path.startsWith('.github/native/'));
+ if (!entries.some(e => e.path === workflowPath) ||
+ !entries.some(e => e.path.startsWith('.github/native/') && e.type === 'blob')) {
+ throw new Error('Hosted native infrastructure not present in trusted base');
+ }
+ return JSON.stringify(entries.map(e => [e.path, e.mode, e.type, e.sha])
+ .sort((a, b) => a[0].localeCompare(b[0])));
+ };
+ const [headFiles, baseFiles, runBaseFiles] = await Promise.all([
+ fingerprint(sha), fingerprint(pr.base.sha), fingerprint(linked.base.sha)
+ ]);
+ if (headFiles !== baseFiles || headFiles !== runBaseFiles) return passed;
+ const jobs = await github.paginate(github.rest.actions.listJobsForWorkflowRunAttempt, {
+ owner, repo, run_id: run.id, attempt_number: run.run_attempt, per_page: 100
+ });
+ for (const [platform, name] of [['IOS', 'Hosted iOS simulator'],
+ ['ANDROID', 'Hosted Android emulator']]) {
+ const matches = jobs.filter(j => j.name === name);
+ if (matches.length !== 1) continue;
+ const job = matches[0];
+ if (job.head_sha !== sha || job.run_id !== run.id || job.run_attempt !== run.run_attempt ||
+ job.status !== 'completed' || job.conclusion !== 'success') continue;
+ const steps = ['Build development app', 'Run disposable startup smoke'];
+ if (steps.every(name => job.steps?.filter(s => s.name === name &&
+ s.status === 'completed' && s.conclusion === 'success').length === 1)) {
+ passed.add(platform);
+ core.info(platform + ' hosted evidence: ' + run.html_url + ', attempt ' + run.run_attempt);
+ }
+ }
+ } catch (err) {
+ core.warning('Hosted evidence unavailable; local fallback retained: ' + err.message);
+ }
+ return passed;
+ };
+
let state = 'failure';
let description = 'Awaiting local Mac validation';
if (docsOnly) {
@@ -129,6 +204,7 @@ jobs:
if (malformed) {
description = 'Specify Required local checks: IOS, ANDROID, HARDWARE';
} else {
+ const hosted = await hostedPasses();
// Only the release owner can defer unrun physical checks. Keep
// every original handoff intact, and bind the newest owner
// decision to this PR and this exact head commit.
@@ -165,9 +241,7 @@ jobs:
break;
}
}
- if (!report) {
- description = 'Awaiting trusted Mac validation of current SHA';
- } else if (field(report, 'State') !== 'LOCAL_PASSED') {
+ if (report && field(report, 'State') !== 'LOCAL_PASSED') {
description = 'Latest local validation is not LOCAL_PASSED';
} else {
const reportFields = {
@@ -179,10 +253,12 @@ jobs:
const hardwareDeferred = required.has('HARDWARE') && hardwareDeferral &&
reportIndex > ownerDecisionIndex &&
/^(not run|deferred)\b/i.test(hardwareResult);
- const notPassed = [...required].filter(x =>
- !/^pass\b/i.test(field(report, reportFields[x])) &&
- !(x === 'HARDWARE' && hardwareDeferred)
- );
+ const notPassed = [...required].filter(x => {
+ const result = field(report, reportFields[x]);
+ if (/^fail(?:ed)?\b/i.test(result)) return true;
+ return !/^pass\b/i.test(result) && !hosted.has(x) &&
+ !(x === 'HARDWARE' && hardwareDeferred);
+ });
if (hardwareDeferred && !required.has('IOS') && !required.has('ANDROID')) {
description = 'IOS or ANDROID required before HARDWARE deferral';
} else if (notPassed.length) {
@@ -190,9 +266,10 @@ jobs:
} else {
state = 'success';
const passed = [...required].filter(x =>
- /^pass\b/i.test(field(report, reportFields[x]))
+ /^pass\b/i.test(field(report, reportFields[x])) || hosted.has(x)
);
description = 'Validated at current SHA: ' + passed.join(', ') +
+ (hosted.size ? '; hosted ' + [...hosted].join(', ') : '') +
(hardwareDeferred ? '; owner-deferred HARDWARE' : '');
}
}
@@ -200,6 +277,13 @@ jobs:
}
}
+ // API reads above can take time. Never post a success for a head that
+ // changed while evidence was being collected.
+ const { data: current } = await github.rest.pulls.get({ owner, repo, pull_number });
+ if (current.head.sha !== sha) {
+ core.setFailed('PR head changed during validation; awaiting new-head evaluation');
+ return;
+ }
await github.rest.repos.createCommitStatus({
owner, repo, sha, state,
context: contextName,
diff --git a/.github/workflows/keeper-validation-tests.yml b/.github/workflows/keeper-validation-tests.yml
new file mode 100644
index 000000000..7bbc3b67d
--- /dev/null
+++ b/.github/workflows/keeper-validation-tests.yml
@@ -0,0 +1,26 @@
+name: Native validation contracts
+
+on:
+ pull_request:
+ branches: [sprint]
+ push:
+ branches: [sprint]
+ paths: ['.github/**']
+
+permissions:
+ contents: read
+
+jobs:
+ contracts:
+ name: Native validation contracts
+ runs-on: ubuntu-24.04
+ timeout-minutes: 5
+ steps:
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
+ with:
+ persist-credentials: false
+ - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
+ with:
+ node-version: '22'
+ - run: node --test .github/tests/*.test.cjs
+ - run: python3 -B -m unittest discover -s .github/tests -p 'test_*.py'
diff --git a/AGENTS.md b/AGENTS.md
index db639d581..bf74bc552 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -1,6 +1,6 @@
# Bitcoin Keeper: Codex workflow
-This repository uses a **ChatGPT → Codex Cloud → Codex Local (Mac)** workflow for coding tasks. The GitHub pull request is the durable handoff between stages. Do **not** rely on one agent having access to another agent's conversation, unpushed changes, machine, or installed tools.
+This repository uses a **Cloud code complete → hosted native validation → short Mac session for physical checks/signing after approval → release review** workflow. Local native testing remains a fallback when hosted validation is unavailable. The GitHub pull request is the durable handoff between stages. Do **not** rely on one agent having access to another agent's conversation, unpushed changes, machine, or installed tools.
Repository: `KeeperCommunity/bitcoin-keeper`. Use `sprint` as the PR base unless the task explicitly specifies another base.
@@ -26,7 +26,7 @@ Repository: `KeeperCommunity/bitcoin-keeper`. Use `sprint` as the PR base unless
```
4. For app/code changes, `Required local checks` must list one or more of `IOS`, `ANDROID`, `HARDWARE` (comma-separated). Use both iOS and Android for cross-platform changes; add hardware for signer/device interactions. If no Mac tests are necessary, explain why, but the GitHub gate exempts only documentation and `.github/` changes. The handoff must name the actual PR head commit SHA after the final cloud push.
-5. Return the PR URL/number and state `NEEDS_LOCAL` to the user so ChatGPT can generate the exact local handoff prompt. Continue unrelated cloud tasks while waiting for a Mac.
+5. Return the PR URL/number and actual platform `PASS`/`FAIL`/`NOT RUN` results for the current head. Use `NEEDS_LOCAL` for remaining native or physical requirements; successful trusted hosted evidence may satisfy `IOS`/`ANDROID` without a Mac login. Continue unrelated cloud tasks while waiting for a Mac. Follow [hosted native validation](docs/hosted-native-validation.md) for trust, bootstrap, scope and artifact limitations.
6. If a task needs only code review, explicitly state why local testing is not required rather than silently skipping it.
## Codex Local (Mac): validate the PR
@@ -84,6 +84,6 @@ A known critical defect is not eligible for post-release deferral. In particular
## GitHub merge gate
-The `.github/workflows/keeper-local-validation.yml` workflow posts commit status `keeper/local-validation` for the current PR head SHA. For code changes, it remains failing until a repository collaborator posts a `Codex local validation` comment with `State: LOCAL_PASSED`, the **exact current commit SHA**, and `pass` for every platform named by `Required local checks`, except `HARDWARE` when the exact-SHA owner decision above defers unrun physical checks. New commits invalidate previous local sign-off and deferral. Documentation and `.github/`-only PRs are exempt from Mac tests.
+The `.github/workflows/keeper-local-validation.yml` workflow posts commit status `keeper/local-validation` for the current PR head SHA. For code changes, it requires a trusted exact-head Cloud handoff. Each required `IOS`/`ANDROID` platform needs either a genuine successful hosted native build **and** disposable UI smoke from `.github/workflows/keeper-hosted-native.yml`, or a repository collaborator's exact-head `LOCAL_PASSED` report. A hosted run is trusted only when its workflow and complete `.github/native/` harness match the protected current base and the run's original base; PR-authored check names, comments and artifacts alone are not CI evidence. New or changed CI infrastructure must first be reviewed and merged before it can provide authoritative native evidence. The latest run/attempt must contain successful build and smoke steps for that platform; stale, skipped, cancelled, pending, build-only or untrusted evidence supplies no hosted pass. A latest explicit local failure remains blocking. `HARDWARE` still requires the existing local physical result or exact-SHA owner decision and subsequent honest local report above. New commits invalidate previous native evidence, local sign-off and deferral. Documentation and `.github/`-only PRs are exempt from Mac tests.
This workflow **reports** a status; to **enforce** it, repository administrators must require the `keeper/local-validation` commit status for merges to `sprint` in GitHub Rulesets or branch protection. Require the existing `Tests` CI check as well. This is a review/test gate, not a guarantee that tests were actually executed; agents must report actual results truthfully. Release signing, TestFlight, Play Store, and production deployment remain separate and require explicit user approval.
diff --git a/docs/hosted-native-validation.md b/docs/hosted-native-validation.md
new file mode 100644
index 000000000..105af3fc5
--- /dev/null
+++ b/docs/hosted-native-validation.md
@@ -0,0 +1,177 @@
+# Hosted native validation
+
+Issue #7059 adds bounded hosted development builds and a disposable first-use UI
+smoke. It does not change R4 #7045 or R5 #7058 app code, merge either branch,
+change branch protection, or approve a release. Adopt it for R5 after R4's released
+baseline is settled and R5 is reconciled against that baseline.
+
+## Handoff
+
+1. **Cloud code complete:** push the final code, run suitable regression checks,
+ and record the full PR head in the existing `Codex local handoff`. Keep
+ `Required local checks: IOS, ANDROID` and add `HARDWARE` when applicable.
+2. **Hosted native validation:** the PR workflow checks out that exact head with
+ read-only permissions and no persisted checkout credential. Both platform jobs
+ install locked dependencies, build the development app and run the disposable
+ startup smoke. Report each platform as `PASS`, `FAIL` or `NOT RUN` with the run
+ URL, attempt and tested SHA. A successful build without a successful UI smoke
+ is not a platform pass. Any new commit starts this step again.
+3. **Short Mac session:** run only the remaining feature-specific native cases,
+ fallback builds/UI when hosted setup fails, and physical-device cases. Real
+ biometrics, phones/cameras, hardware signers, NFC/USB and signing prompts remain
+ explicit. Preserve the existing owner-scoped HARDWARE deferral procedure. A
+ later local `LOCAL_FAILED`/`BLOCKED` report cannot be hidden by a hosted pass.
+4. **Release review:** inspect the actual exact-head evidence and unresolved
+ issues, obtain independent review and explicit owner approval for any signing,
+ distribution or submission. CI success grants none of those approvals.
+
+Hosted coverage is deliberately narrow: cold startup to the passcode screen and
+entry of a throwaway first passcode through the confirmation screen. Stop before
+account/key generation, backup, wallet funding, live transactions or signer use.
+Do not mistake this smoke for the R5 deletion matrix, recovery/upgrade validation,
+startup performance acceptance or complete release readiness.
+
+## Trust and gate behavior
+
+The existing trusted base-branch gate never checks out or executes PR code and
+retains its `keeper/local-validation` status name. The new native workflow uses
+`pull_request`, never elevated `pull_request_target` execution. No signing,
+environment secrets, release credentials or production configuration are passed
+to its jobs.
+
+The gate reads Actions metadata itself. It selects the newest run at the current
+source SHA, verifies the workflow path, event, source repository/branch, associated
+PR and SHA, and compares every workflow/harness file (including additions and
+deletions) against both the current base and the run's base. The latest attempt
+must have exactly one successful platform job with successful `Build development
+app` and `Run disposable startup smoke` steps. A cancelled/pending run supplies no
+pass. A completed run whose other platform failed can still supply its genuinely
+successful platform. Partial reruns may lack the other platform in the latest
+attempt; use **Re-run all jobs** to establish both platforms together.
+
+Missing metadata, API failures, untrusted changed CI files and incomplete evidence
+produce zero hosted passes. Existing local reports remain a fallback. HARDWARE
+cannot be filled by simulator evidence. New commits also invalidate owner scope
+decisions. Owner deferral still needs a later honest local report recording
+physical checks as NOT RUN/DEFERRED; an actual failed physical test cannot be
+deferred. No PR-author assertion of a hosted result is parsed as evidence.
+
+This verifies reviewed CI provenance and actual GitHub step results. The native
+build still executes PR-controlled Gradle/Xcode/Metro code on its disposable
+runner. Integrity checks detect tracked harness changes between phases, but do
+not provide an adversarial sandbox against malicious same-user build scripts.
+Review native source and CI changes before merging; branch review requirements
+remain necessary. The gate does not make an unreviewed app trustworthy.
+
+Bootstrap is intentionally staged: this infrastructure PR can run diagnostics and
+test the verifier, but its new workflow is not yet in the protected base, so its
+hosted results cannot authorize app PRs. Review and merge the CI-only PR only when
+the owner approves. Then a new same-repository PR run using unchanged reviewed CI
+files can provide evidence. Fork runs and modified native CI need review/local
+fallback. The workflow-run listener is also effective only after the trusted gate
+is merged; pre-merge gate tests execute the candidate inline script with mocked
+API responses, not a privileged checkout of the candidate.
+
+## Dependency and native-install failures
+
+Use Yarn 1's frozen lock install with lifecycle scripts disabled, followed by the
+explicit CI preparation in `.github/native/`. The repository's normal `prepare`
+unconditionally invokes CocoaPods and writes a Mac-specific Android SDK path;
+running it on Linux is not supported. Do not silently regenerate `yarn.lock`, use
+an unlocked install, skip patch failures or replace a failed native build with
+Jest. CocoaPods deployment mode likewise exposes Podfile/lock drift.
+
+The pinned Node compatibility tool is restricted to setup.sh's existing shim
+whitelist without invoking its installer. Unrestricted `--hack` rewrites imports
+to optional packages that the manifest does not contain; the bounded wrapper
+keeps both platform Metro graphs resolvable using committed dependencies. Android
+command-line tools are provisioned explicitly before SDK/NDK installation.
+
+At the initial sprint baseline `def0d6a90c80287edb4f58ae272cbfc340f00d73`,
+two root lint selectors were missing from the Yarn lock. The declared IAP 16.5.0
+also needs NitroModules 0.36.5, and the Pod lock still selected older IAP/Nitro
+versions. This PR repairs these dependency inputs rather than bypassing frozen
+installation. Native lock repair uses an explicit diagnostic candidate run, which
+fails without building/testing and retains only the candidate lock for review.
+Commit the reviewed candidate and disable repair mode before the authoritative
+`pod install --deployment` run. New source commits require new native results.
+Do not import the ongoing R4 diagnostic/reproducibility branch or its private
+fixtures. Its existing Android build diagnostics do not constitute emulator UI
+evidence.
+
+## Evidence, runner budget and remaining work
+
+Each platform retains allowlisted source/toolchain/runner metadata, actual command
+exit outcomes and bounded redacted tool-error excerpts. Diagnostic Pod-lock repair
+may also retain its dependency-lock candidate; it cannot report a platform pass.
+Development configuration points service integrations at
+loopback and uses dummy Firebase identities. Only the bounded first-use scenario
+runs on fresh hosted devices. Raw build/device/Metro/Maestro logs, screenshots,
+app bundles, keystores and generated account data are not uploaded. Failed raw
+command output stays private to the ephemeral runner; metadata records which
+command failed. Keep artifacts for seven days.
+
+On startup failure, metadata may include fixed Maestro command/assertion labels,
+bounded redacted Metro errors and targeted native exception messages from this
+job's fresh account-free device. UI hierarchy and credential suffixes are
+excluded; diagnostic collection cannot change a failed result. Cold development
+bundling has a three-minute initial-screen allowance and seven-minute Maestro
+command limit, with all UI assertions still required. This is not release
+performance acceptance. The iOS build command is limited to the hosted
+simulator's architecture and 40 minutes; Android's build command is capped at
+35 minutes.
+
+Before the iOS build, a separate disposable simulator checks Maestro's driver
+with a bounded `hierarchy` command. This is setup only: it installs no Keeper app
+and supplies no app build or UI credit. Its private XDG state and fixed diagnostic
+flags remain separate from the later smoke. The command is capped at five
+minutes, with Maestro's driver timeout unchanged; owned simulator cleanup runs
+on success or failure.
+
+For both platforms, a bounded loopback request compiles the development bundle
+before iOS simulator creation or Android app installation; only its HTTP status,
+byte count and hash are retained.
+This setup step supplies no native/UI pass. On failure, fixed startup-screen
+flags may be derived from bounded private Maestro hierarchy snapshots, without
+retaining their text or attributes. The iOS exception collector reads the first
+MiB of compact own-process output over the launch window, preserving early
+errors instead of parsing a truncated JSON array. Missing diagnostics remain
+explicit and do not imply a clean runtime.
+
+The iOS job is capped at 65 minutes and Android at 60 minutes, with command and
+emulator boot limits inside those budgets. The jobs have no automatic retries;
+new pushes cancel only
+this workflow's runs for that PR. Cold native compilation, SDK installation and
+CocoaPods can consume substantial hosted minutes. Use job timestamps and the
+Actions usage page to report observed runtime and cost; do not describe a failed
+dependency preflight's short duration as native-build timing. Current pricing,
+included minutes and spending limits depend on the repository's plan.
+As checked on 2026-10-17, GitHub's [standard runner rates](https://docs.github.com/en/billing/reference/actions-runner-pricing)
+are $0.062/minute for macOS and $0.006/minute for Linux x64. At those rates a
+30-minute iOS plus 30-minute Android attempt is about $2.04; reaching both job
+caps is about $4.39, before included minutes, artifact storage, rounding and the
+existing CI jobs. These are planning estimates, not measured native timings or
+an account bill. Observed bootstrap results belong in this PR's validation report.
+Enable spending limits before routine use if needed.
+
+The PR's current validation report records the actual source/run/attempt and each
+platform's build/UI outcome. Until both strict native builds and actual UI runs
+work reliably, use the existing local fallback without interrupting an active Mac
+session. A passing startup smoke does not transfer to another PR or prove its
+feature matrix. See [R4 coverage assessment](r4-cloud-test-assessment.md) for fresh
+disposable candidates and cases that must keep their existing Local evidence.
+Hardware and release approval remain separate.
+
+## Administrative configuration
+
+Require `keeper/local-validation` and existing `Tests` for merges to `sprint`,
+and require review for changes to the gate/native harness. `Native validation
+contracts` is a useful additional required check. Do not require both native jobs
+unconditionally when local fallback is intended: the combined gate resolves
+platform evidence. Administrators should verify the required status app/source,
+default-branch workflow availability, Actions runner permissions and private-repo
+minute budget. On 2026-10-17, the active branch-rules endpoint reported required
+`keeper/local-validation` and `Tests` checks from GitHub Actions (integration
+15368). The legacy branch-protection endpoint returned HTTP 403; broader
+administrator and bypass settings remain unverified. No protection configuration
+was changed by this work.
diff --git a/docs/r4-cloud-test-assessment.md b/docs/r4-cloud-test-assessment.md
new file mode 100644
index 000000000..5b619ba4b
--- /dev/null
+++ b/docs/r4-cloud-test-assessment.md
@@ -0,0 +1,189 @@
+# R4 tests that could move to hosted runners
+
+Assessment date: 17 October 2026. This is a read-only assessment of
+[R4 PR #7045](https://github.com/KeeperCommunity/bitcoin-keeper/pull/7045), whose
+live head was rechecked as **`be89c34473bb6aab253b98325f1fe746ca391c6f`** on branch
+`codex/r4-264-combined-candidate`, targeting `sprint`. R4 remains draft,
+**BLOCKED / NOT RELEASE-READY**. This document changes no R4 code, refs, checks,
+comments, test scope, or release decision.
+
+Fresh hosted runners can take over disposable native build, startup and local
+persistence checks. Much of the remaining backup/recovery matrix is also
+technically suitable for fresh hosted simulators, but requires a separately
+reviewed, disposable **protected-v3** backend and native observation harness that
+are not supplied by the startup smoke. Existing private accounts, databases,
+artifacts and upgrade continuity must stay with their current Local evidence.
+Physical-device and signing work remains separate.
+
+## Evidence and current limits
+
+The newest [Local report, 17 October 06:41 UTC][latest-local] is `BLOCKED` at the
+exact R4 head above. It supersedes only the subsets it actually exercised:
+
+- iOS installed/launched the current Debug simulator artifact, completed protected
+ Recovery Key recovery, matched the backed-up wallet/signers/label/account
+ metadata, and passed cold PIN and native consent-OFF persistence checks.
+ **Whole-current-image equality did not pass:** two local-only NodeConnect
+ records remain, with `canonicalRecoveryEqual=false`. Do not remove those
+ records from the comparison or call that result a full restore pass.
+- The [Android producer report][android-positive] records actual strict-16KB
+ Hermes/crypto, opt-in/repair, rename and positive production-action results,
+ complete native comparisons and cold persistence. This is a demonstrated
+ subset, not all operation/UI acceptance. The [later report][android-followup]
+ adds account/consent/status cases and preserves a lost-response condition with
+ **two mutation requests after one UI action**; its no-second-request condition
+ failed. Later successful read-only reconciliation does not erase that result.
+- The retained strict-16KB Android VM subsequently failed to finish OS boot after
+ the Mac restart. Keeper recovery did not run in that attempt. This is a runtime
+ blocker, not a diagnosed app failure or permission to replace its retained data.
+- Required IOS/ANDROID coverage remains incomplete. At 07:04 UTC, release owner
+ `antuz123` posted a fresh [exact-`be89` physical-only scope decision][owner-scope]
+ deferring eligible unrun HARDWARE checks to owner post-release reporting.
+ Physical tests remain **NOT RUN**. No later `LOCAL_PASSED` report exists;
+ IOS/ANDROID acceptance, known failures and review/release gates remain required.
+ The owner-reduced [release-essential plan][owner-plan] remains in effect, with
+ its historical SHA boundaries and parked cases preserved.
+
+At this assessment's starting snapshot, [infrastructure PR #7060][infra-pr] was
+at `3e32c3611186cf4e0d41ff2e33aff15c222e8fcf`. Its [hosted run][initial-run]
+failed dependency setup on **both platforms**; native builds and UI smoke were
+NOT RUN. Its 47 passing infrastructure contracts are not native passes.
+
+The subsequent [hosted run at infrastructure head `9509`][repair-run], full SHA
+`9509da6bb2b533c348846b2ec079ac5ca27ffae3`, passed immutable dependency installation
+on **both platforms** and the actual Android development native build. Android
+smoke setup then failed when `emulator -version` exited 127, before app install;
+Android UI smoke has **not passed**. The iOS native build subsequently hit its
+35-minute command timeout (exit 124); iOS smoke was **NOT RUN**. Record final
+source/run/attempt and actual platform results in the PR report after the remaining fixes and final run; these
+intermediate results do not establish both-platform native acceptance. Even
+successful #7060 startup smoke will not attest R4 source `be89`, its private
+fixture, or any backup/restore case below.
+
+The R4 head's `keeper/local-validation`, public automatic Realm/Relay lane and
+CodeQL aggregate were still failing when inspected. Successful Jest, CodeQL
+analysis execution and backend bootstrap jobs do not reverse those results. The
+[current handoff][handoff] records actual exact-source host proofs and their
+limits separately from full native acceptance.
+
+### Exact-R4 setup must be reviewed separately
+
+A read-only source audit found no missing root Yarn selectors at `be89`; no R4
+install or build was attempted here. Its committed Pod lock records CocoaPods
+**1.15.2**, while #7060 installs **1.16.2**. CocoaPods' [deployment verification][pod-deployment]
+compares the complete regenerated lock, including that version field. The
+unchanged #7060 setup therefore cannot satisfy the exact R4 lock. A future R4
+lane must match its reviewed toolchain, including the handoff's Node **22.23.3+**,
+and preserve its Nitro/Hermes inputs. R4's public local-backend guide also warns
+that Hermes podspec checksums can depend on checkout path: report a strict-lock
+mismatch as **BLOCKED**, rather than rewriting the lock to obtain a pass.
+
+R4 has no copy of this new native workflow/harness. Reusing the approach needs
+separately reviewed orchestration of its exact head, without edits to R4 source.
+Explicit generated loopback configuration and dummy Firebase can cover startup;
+blank service values must not activate real-service defaults. Fresh account
+creation needs the separately reviewed public local services, while protected-v3
+requires its separate authorized fixture source. None was obtained or started
+for this assessment. #7060's source or toolchain is not a substitute for R4's.
+
+## Fresh disposable cloud candidates
+
+Every row below is a **candidate, NOT RUN by this assessment**. None uses the
+Mac's retained APK/app, accounts, PINs, mnemonics, ciphertext, Mongo database,
+fixtures, logs or volumes. Generate any needed test material within the new
+job, use no funds/providers, and destroy only that job's state after preserving
+safe nonsecret evidence. Existing successful Local subsets stay valid within
+their recorded scope; setup prerequisites below do not request redundant Local
+retests or start a new R4 build campaign.
+
+| Case or prerequisite for remaining tests | Hosted execution that can be safe | Prerequisites and acceptance boundary |
+| --- | --- | --- |
+| Exact-source development build/install/startup on both platforms; PIN create/confirm/cold unlock | Fresh iOS Simulator and Android emulator, unsigned/debug configuration, generated throwaway PIN | First demonstrate #7060's real build/UI passes. R4 then needs its **own exact-head** execution and artifact/config identity; another PR's pass does not transfer. Current #7060 smoke stops before saving a PIN or creating an account. |
+| Actual normal-4KB Android native runtime and Hermes/TextEncoder/BigInt initialization | Fresh explicitly identified 4KB emulator; measure actual page size and exercise the native app | Record API/ABI/image, `PAGE_SIZE`, package/source and result. It does not replace strict-16KB ARM64 evidence or its JNA/Portal requirements. |
+| Encrypted Realm and MMKV cold persistence using newly generated records | New isolated account/state, native process restart, actual PIN and MMKV/Realm reads | Needs a reviewed native observation path; Node Realm, AST projection and a Metro bundle compiled for Hermes are not native runtime proof. Compare complete counts/fingerprints, consent and session before/after restart. |
+| Native Portal introduction/catalog and brief wallet/base rendering without a device | Fresh emulator/simulator and locally generated unfunded/public test records | Limit result to rendered screens/native initialization. No NFC/USB, real camera, signer, biometric or signing claim. Preserve owner-parked navigation scope. |
+| Packaged native-library graph, ELF/RELRO/ZIP checks on a newly built test APK | Run the existing source checker on the new job-owned APK and record exact supplier/packaging identities | Static PASS is not install/launch PASS. The [16KB source guide][android-16kb] requires final packaged bytes, including source-linked libraries, rather than a supplier sample. No Mac APK download is needed. |
+| Canonical-versus-legacy MMKV ordering, confirmed absence versus read errors, fallback persistence and stale Verified after cold launch | New locally generated MMKV/Realm fixtures with reviewed bounded fault injection and actual app restarts | No copy of existing persistence files. Do not fabricate app verification/consent or turn a missing native probe into success. Independent combinations remain explicit; a normal cold-consent pass alone does not prove them. |
+
+These cases can reduce Mac build/UI time without depending on its existing
+private fixture. Fresh account creation must use a reviewed disposable local
+onboarding path: the existing protected-backup fixture alone does not serve
+onboarding/channel/provider APIs.
+
+## Protocol cases suitable only after a new reviewed fixture exists
+
+The [exact-head protected-backup guide][protected-guide] says the public Relay
+`838049e537e07eb646a2a0393eb969fba43d0739` v2 lane is incompatible with current
+protected-v3 consumers. The separately reviewed backend is
+`7693ce4bfffcadb5fb71d6478a8befc8e533a844`; it is not automatically available to
+public/fork CI. The existing backend/fixture data has not been obtained for this
+assessment. Do not vendor private inputs, change contributor pins/readiness
+constants, substitute a permissive mock ACK server, or weaken genuine proof to
+make a hosted run green.
+
+A future cloud lane would need authorized, separately reviewed protocol source;
+a new credential-free, job-owned transactional loopback database; new test
+accounts/keys and deliberate older-copy ciphertext generated inside that job;
+and reviewed native UI/action, HTTP-count and complete crypto/readback evidence.
+If those prerequisites cannot be supplied without private transfer or R4 changes,
+these rows remain Local. The existing #7060 harness supplies none of them.
+
+| Exact remaining R4 cases | What a fresh hosted reproduction must prove |
+| --- | --- |
+| Original zero-node opt-in → default-node bootstrap → automatic Verified → rename → full readback/no-op/cold sequence | Start from a genuinely new account with initial-node state that permits bootstrap; preserve original order and prove automatic completion without manual repair. The existing Android account whose `initialNodesSaved` was already true does not satisfy this case. |
+| Android clean protected restore; explicit older-copy restore on both platforms; remaining iOS positive/consent/account acceptance | New synthetic datasets and blank destinations, actual native crypto/canonical/metadata comparisons, correct provenance and consent OFF. No automatic older-copy fallback on absent/empty/tombstone/error. The observed iOS whole-image difference remains a separate unresolved result. |
+| Scoped protected Delete confirmed/uncertain response, cold tombstone discovery, explicit recreate and EN/ES notices | Run Delete **last, after restore proof**, on the new job's protected copy only; positive acknowledgment plus authoritative readback, local recovery data retained, consent OFF after cold launch, older encrypted copies still read-only. Uncertain deletion is not success. |
+| Representative stale payload/session/CAS/partial-fanout/final-verification boundaries | Actual native production paths with bounded holds/faults, zero wrong-account/stale writes, complete immutable original proof and truthful pending/incomplete state. Do not reinstate exhaustive cross-products parked by the owner. |
+| Old-session delayed completion, recovery supersession and consent/account timing not already instrumented | Newly generated A/B accounts, actual app-session boundaries and late native completion; no cross-account keys, data, status or stale success. Existing A→B→A status coverage does not prove every held old-session completion or first-frame flash. |
+| Lost/malformed mutation acknowledgment and separate read-only reconciliation | Preserve the failed extra-request observation; count attempted requests separately from committed writes and upstream replies. A new synthetic reproduction can diagnose/recheck behavior but cannot retroactively pass the original condition or unpark C8/#7056. |
+
+The [historical automatic matrix][matrix] explicitly distinguishes host-native
+Realm/source proofs from iOS/Android runtime evidence. Its historical v2/delete
+language is superseded by protected-v3: Delete affects only the new protected
+copy. Existing source proof counts must not be relabeled as new hosted native
+execution.
+
+## Work that stays with Local or physical/release owners
+
+| Work | Why a hosted replacement is insufficient |
+| --- | --- |
+| Existing private A/B account continuity, retained original/restore fixture databases, ciphertext and current-image differences | They bind to Local's actual data and receipts. Keep investigation and evidence in place; use only public nonsecret result summaries here. Fresh synthetic tests are additional evidence, not migration or replacement of those receipts. |
+| Existing installed-artifact update/upgrade and durable private Realm/MMKV continuity | Recreating fresh state does not establish byte continuity across the retained app update, prior versions or the exact saved user data. A new synthetic upgrade lane is possible later with reviewed old/new artifacts, but is not the current startup lane or a pass for the retained upgrade. |
+| Retained strict-16KB ARM64 VM recovery and its exact app/Portal/JNA evidence | #7060's standard Linux x86_64 API35 emulator is not that runtime. A separately demonstrated supported strict-16KB hosted image could cover a **new synthetic** run; this assessment neither provisions it nor moves the retained VM/state. Keep actual normal4KB and strict16KB results separate. |
+| Phones, real camera/biometrics, hardware signers, NFC/USB, device prompts | Simulator screens cannot prove physical behavior. Keep HARDWARE explicit; only the existing exact-PR/head release-owner procedure may defer eligible **unrun** physical checks. Failed/critical cases are not waived. |
+| Signing credentials, user approval prompts, production config/artifact/store/channel review | These are owner-controlled release operations and independent readiness evidence. No CI result authorizes signing, merge, deployment, upload, submission or publication. |
+
+The newest report's storage shortage and OS-boot limitation are descriptions of
+Local's environment, not authorization to inspect, restart, unlock, clean up,
+rebuild on, or otherwise interrupt that Mac. This assessment did none of those
+actions. No private native artifact or fixture was downloaded and #7045 was not
+modified.
+
+## Suggested order without changing R4 now
+
+1. Finish #7060's reproducible dependency/native setup and demonstrate actual
+ exact-head iOS **and** Android build-plus-startup passes. Keep pre-merge runs
+ diagnostic: the trusted gate must use reviewed infrastructure from `sprint`.
+2. Separately review a fresh-fixture coverage proposal for the first table; do
+ not launch R4 native work, alter its branch, or claim its acceptance from this
+ document. Preserve the original owner-reduced batch and known failures.
+3. Decide whether the protected-v3 prerequisites can be provided without private
+ transfer or R4 code changes. If not, leave that protocol acceptance with Local;
+ fresh startup passes still reduce a useful but narrow part of future work.
+4. Keep the exact-head IOS/ANDROID/HARDWARE gate, local fallback, fresh owner scope
+ decisions, independent review and separate release approval. No existing
+ blocked/failed R4 report is overwritten or hidden by generic hosted success.
+
+[latest-local]: https://github.com/KeeperCommunity/bitcoin-keeper/pull/7045#issuecomment-6230795563
+[android-positive]: https://github.com/KeeperCommunity/bitcoin-keeper/pull/7045#issuecomment-6224434285
+[android-followup]: https://github.com/KeeperCommunity/bitcoin-keeper/pull/7045#issuecomment-6224892021
+[owner-plan]: https://github.com/KeeperCommunity/bitcoin-keeper/pull/7045#issuecomment-6185462332
+[owner-scope]: https://github.com/KeeperCommunity/bitcoin-keeper/pull/7045#issuecomment-6231002359
+[handoff]: https://github.com/KeeperCommunity/bitcoin-keeper/pull/7045#issuecomment-6219779493
+[protected-guide]: https://github.com/KeeperCommunity/bitcoin-keeper/blob/be89c34473bb6aab253b98325f1fe746ca391c6f/release/r4-protected-backup-app.md
+[android-16kb]: https://github.com/KeeperCommunity/bitcoin-keeper/blob/be89c34473bb6aab253b98325f1fe746ca391c6f/release/r4-android-16kb.md
+[matrix]: https://github.com/KeeperCommunity/bitcoin-keeper/blob/be89c34473bb6aab253b98325f1fe746ca391c6f/openspec/changes/fix-recovery-backup-freshness/automatic-write-validation.md
+[infra-pr]: https://github.com/KeeperCommunity/bitcoin-keeper/pull/7060
+[initial-run]: https://github.com/KeeperCommunity/bitcoin-keeper/actions/runs/39010808486
+[repair-run]: https://github.com/KeeperCommunity/bitcoin-keeper/actions/runs/39012940184
+[pod-deployment]: https://github.com/CocoaPods/CocoaPods/blob/1.16.2/lib/cocoapods/installer.rb#L489-L497
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 85cbf1ecf..0f9a856c6 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -131,7 +131,7 @@ PODS:
- nanopb/encode (= 3.30910.0)
- nanopb/decode (3.30910.0)
- nanopb/encode (3.30910.0)
- - NitroIap (14.4.18):
+ - NitroIap (16.5.0):
- boost
- DoubleConversion
- fast_float
@@ -139,7 +139,7 @@ PODS:
- glog
- hermes-engine
- NitroModules
- - openiap (= 1.2.22)
+ - openiap (= 3.4.0)
- RCT-Folly
- RCT-Folly/Fabric
- RCTRequired
@@ -193,7 +193,7 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- - NitroModules (0.29.6):
+ - NitroModules (0.36.5):
- boost
- DoubleConversion
- fast_float
@@ -222,7 +222,7 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- - openiap (1.2.22)
+ - openiap (3.4.0)
- PDFGenerator (3.1.0)
- PromisesObjC (2.4.0)
- QRCoder (1.1.0)
@@ -3971,7 +3971,7 @@ CHECKOUT OPTIONS:
SPEC CHECKSUMS:
boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90
- BVLinearGradient: cb006ba232a1f3e4f341bb62c42d1098c284da70
+ BVLinearGradient: 880f91a7854faff2df62518f0281afb1c60d49a3
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb
fast_float: b32c788ed9c6a8c584d114d0047beda9664e7cc6
@@ -3986,17 +3986,17 @@ SPEC CHECKSUMS:
glog: 5683914934d5b6e4240e497e0f4a3b42d1854183
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
- hermes-engine: 4ec27e7c84ed7950da6e65008539685455d8bef4
- HtmlToPdf: 6a9c28f54ec810d1d120a698a9b3c83e2bdb1672
+ hermes-engine: 30215ceafa12cccff41931253d1d52e5cbe9fd4a
+ HtmlToPdf: 5c0649e93aa1c6583f400268eedea00f15e0fa5f
libportal-ios: d9aa55474e2d5be8e38e96345dd37be34fda45b4
- libportal-react-native: 91b6bec36f7e92a0bcc4e9d51d6ce3ee7c163728
+ libportal-react-native: 05778ef04321517c8366dc7173d05aa9fe131ff2
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
MMKVCore: 3d16ce9f7d411e135020915fde98a056859a1efa
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
- NitroIap: 4567529625c807049c148f8cecfc0d774d67b584
- NitroMmkv: 320feb7789986e3ba45582d5c630ebcfeca807ae
- NitroModules: 7d693306799405ca141ef5c24efc0936f20a09c0
- openiap: a6c203f0e8f4ace4f05477f90a2967327ef3ad70
+ NitroIap: 2aab68488ccce3c0d6046f0e896b3ed4a5838314
+ NitroMmkv: 1f66a0e71a3a3c5677921aca853aabf7911d92c1
+ NitroModules: 5115360c2954442d8a6a4fafe836f7a5458815df
+ openiap: 253070b2afe71078a2cae63a2b8e282bdd44a059
PDFGenerator: 17d6bc525db0a3fcd156fbf00f9d1b8d5cc75d1e
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
QRCoder: cbd2bee531cc86d286df7942334cfed94c803ae4
@@ -4004,112 +4004,112 @@ SPEC CHECKSUMS:
RCTDeprecation: c7d33f6bc08dbb8be7dfa70d219bfb034480a406
RCTRequired: 42b13c9504609bae9a9f65673a6b4fcbd8d07bd1
RCTSwiftUI: cef2010e1e5e699600b2064d3aa702e53c35816c
- RCTSwiftUIWrapper: 18f0f0601b556e27593928c36697d5f651db760f
+ RCTSwiftUIWrapper: dc8026f15059e65ae5f23ce8b7032f52318e04bb
RCTTypeSafety: c5fd6a8092bee25eaa31d4cca03794e902b5fdfd
React: 6c36d83b2afecc1d45ec2a637158750edad20d87
React-callinvoker: 813372c3165324939d57b849f2db0c99390b9aac
- React-Core: b2a189a7e16fc88a768908152201f14379708ac0
- React-CoreModules: 7ff1464d8c75a63c4028571217e4f4d01b008919
- React-cxxreact: 06aed26685cbd29a55d1648a14f13491549cea9d
+ React-Core: 497da2fa08060213b5b265b38cb64af2e0f0526c
+ React-CoreModules: 255a3150b3a24c8628ef050e7ae448d198dd003b
+ React-cxxreact: e6a1142898716d391d27bd7d05091fca0046e2c5
React-debug: eeaaa885aed6766643a249e186cb55910847f32d
- React-defaultsnativemodule: 137369659d426f45688b7467775a6dc153abf127
- React-domnativemodule: 5c80b3bd89b4d14d1e57f2c2ac2a8e7a3d2a7dcc
- React-Fabric: be18c20ebb56a507b6f04dd701fdc79ab7111763
- React-FabricComponents: 648428bb2ea49ee4db5796d9670994280c93e447
- React-FabricImage: 44232bb0498164e155ffb33621acc1851146d964
- React-featureflags: 840962f151a33d44a93f289d59bcffd166fa8e39
- React-featureflagsnativemodule: 2dac13fa41ee8eff0c45e2a336f5c98291ef9a96
- React-graphics: 8f80ab9311f947fade8d34ddd3cff8870441d000
- React-hermes: f241babdb4e8595933d856ab78f5d5d49218cac0
- React-idlecallbacksnativemodule: 2d0687f8820e232f4686109721ec066c169f9232
- React-ImageManager: cda1751f63b04e8a7df4cb65894ed34c6043fb2e
- React-intersectionobservernativemodule: 34d7b434d4df27a113158bed316a4e0dff658d2b
- React-jserrorhandler: e8ad51be4b0e29eadfdd7854675cf5087a4ea5f9
- React-jsi: ee1dbc3b2635ce07783e6638656c0b472573bb48
- React-jsiexecutor: 05fe7918c713a64a39474915f725fe0e61d65309
- React-jsinspector: 57db0ee88c1471b7310d3feb5c3c92cec6db4702
- React-jsinspectorcdp: 757575b5a8151ca2f253f21e73ef371bc92482a8
- React-jsinspectornetwork: 443fb13ccad11b861d5810f572e6eceb7dd98e05
- React-jsinspectortracing: 59c88018cbc7855bb26c49d8b3bb5ce0d7a6c00a
- React-jsitooling: abc1f89dd35866995bcb873c60a15e8af82d0d96
- React-jsitracing: e8993f012752e5f7a5e749d9348095c30091bb27
- React-logger: cf2064f903777a5bdca904c4265f17396d4d8568
- React-Mapbuffer: c546207c9ac05ba26b90ba26f1288f84c8867f2e
- React-microtasksnativemodule: ad2becc1076529952b6db26d0a1476ec489b9067
- React-mutationobservernativemodule: 867e9c215f21b4308fa98473f3c38585b5897e44
- react-native-background-timer: 4638ae3bee00320753647900b21260b10587b6f7
- react-native-biometrics: ecca256a9e1c8b430f78c4e3dcb16b57ea1418e0
- react-native-blob-util: 6dec9023ecc3ee5ac8ad377598e943f9ca63f741
- react-native-change-icon: 2abab62ecabf10adf6e03cc9516484a27385b580
- react-native-config: 8e425892a531627c52db765be3088185cb871e19
- react-native-contacts: 2a259e02b85c9510a5fcbdf06c56c828387d47c1
- react-native-document-picker: dc2d83366e47e89e7c51e8a41eab99c1d54e941c
- react-native-get-random-values: e2acf4070fe4b7325705a05af047449637a27a21
- react-native-hce: ad5462e792d84e87924308dda1ee516757f1c0eb
- react-native-image-picker: 1f5318beec2ebed6695454ffb9bea8c4152f1598
- react-native-netinfo: cec9c4e86083cb5b6aba0e0711f563e2fbbff187
- react-native-nfc-manager: e5d2ce2f7fee42d1ee0eb6b99f3405d5e330112e
- react-native-pdf: 2886351f9ea698a820f53056afdabd6fa0ab726d
- react-native-randombytes: 3c8f3e89d12487fd03a2f966c288d495415fc116
- react-native-rsa-native: a7931cdda1f73a8576a46d7f431378c5550f0c38
- react-native-safe-area-context: befb5404eb8a16fdc07fa2bebab3568ecabcbb8a
- react-native-tcp-socket: 7c7e53a07f122ecf00fb3626684bc0ca82c4f044
- react-native-worklets-core: aaaac7d17f7e576592369a54f30e96fe4875c983
- React-NativeModulesApple: 519f9f98375db6458a7220becd25db81b3860b76
- React-networking: 2318cba8288ec5df38e899feed3baaac0629b4bd
+ React-defaultsnativemodule: ff63dc721adb5db6eef0951035d4a2935ac99aa8
+ React-domnativemodule: eb73ab018bdd17b950515fc6d1b06fa0ae953110
+ React-Fabric: 2815ec8bfd1c71a8696bbee7d3ff2a97af27b1c3
+ React-FabricComponents: caf3e972e0d2b7feed1f0003377a74a6d9e12cac
+ React-FabricImage: 9c0298b399cf042d937f42ffcdde9047637fdc0f
+ React-featureflags: 7ff07b72680999f92cf82fdf58477b38a876d3b1
+ React-featureflagsnativemodule: ad7919cff5b36a45af42433d323b8fd23931dadd
+ React-graphics: 57c9e72ea57228e83474a27367c4182a79acc803
+ React-hermes: 85101b86c76672bdfc78def14feb93c15445f029
+ React-idlecallbacksnativemodule: d8402e2ed16af4bc0f506315bfdf96007decd80b
+ React-ImageManager: f0f9fafd26ff52e16781fbc8844a55bd3ba21513
+ React-intersectionobservernativemodule: 5bc884eb7e1fe8fec87faf712c963adcec95da69
+ React-jserrorhandler: 0a5be1ec13b7ae0404545422bef137be0d36b38b
+ React-jsi: abd0559cbfcd75539f61bc6ee3ae1e72c38b8727
+ React-jsiexecutor: e96ff30c2e7ab4c1a1652e6a48d44f80b774b411
+ React-jsinspector: 0199e40d52099d06060387d5143dc32cce90aa83
+ React-jsinspectorcdp: 6ca5a4774f941b0a791790adeb94fa55f5338b88
+ React-jsinspectornetwork: 1551f3fb9c1db9e1e178acfca43aec29c99f82a9
+ React-jsinspectortracing: ea86019081a9a746470d85307209118daa6aa6cc
+ React-jsitooling: 3c1dfec708ea756367d36784c158487d149a3b96
+ React-jsitracing: ef17de0220ff8f0bbf95b5a41b63b44b81cf5a55
+ React-logger: 532b0b1405e20c08146a739fbaf6fd16fd771291
+ React-Mapbuffer: a803b9ab86de5b3cacfd1f7e324300a4e932d201
+ React-microtasksnativemodule: 5b3728f26cfad14e7d05bba8e36f19ae083a787b
+ React-mutationobservernativemodule: db471fd2cc188f72dc7d5add41d2bebf5361f0ce
+ react-native-background-timer: 17ea5e06803401a379ebf1f20505b793ac44d0fe
+ react-native-biometrics: 3b95f2eb074d537d3a8b05d853c17778f6685c4a
+ react-native-blob-util: ca455d4d8cc8ed667b6c3dfd7ca00aef09f6ee63
+ react-native-change-icon: 5bfde1910111f603e75b77e1bf9feabaf2bb070e
+ react-native-config: 7cd105e71d903104e8919261480858940a6b9c0e
+ react-native-contacts: 8787d1e792bae8ba6edd1c7ea2749689440ab4bd
+ react-native-document-picker: 063f6391c62fafd49f97490a3ebb1255e4e30781
+ react-native-get-random-values: 9856c21cab42a6d8db71dcb35c3059fdaeac2b16
+ react-native-hce: ae425226cd27e1831b98e5577f15f686a1a0dab8
+ react-native-image-picker: 60f4246eb5bb7187fc15638a8c1f13abd3820695
+ react-native-netinfo: f0a9899081c185db1de5bb2fdc1c88c202a059ac
+ react-native-nfc-manager: 1bcdf6f96c9065a8f4c8d9a0c6fb2db625205b2c
+ react-native-pdf: cd45064d7ef704e69f44c2cee14f0635764c752b
+ react-native-randombytes: 421f1c7d48c0af8dbcd471b0324393ebf8fe7846
+ react-native-rsa-native: 12132eb627797529fdb1f0d22fd0f8f9678df64a
+ react-native-safe-area-context: 0f4986a88ec555aff660503b483d6e4bd6980a9a
+ react-native-tcp-socket: c9290d77fea17ee75bee93e599b604bae63166f0
+ react-native-worklets-core: 30da6af07bef6fcb77ed2b53787958c3d56048e8
+ React-NativeModulesApple: 74bee0c16a7a5426aeadd753179a41d7da413c99
+ React-networking: 08d6e4f20fc02f240fb1c7b48bc0d72fdc66b1ea
React-oscompat: 4524d8ccb12b7f07beb12e2ea9c5ea55b55d604b
- React-perflogger: 2b2a2bc9173796cc58fece00d3df1c99b39c2b8e
- React-performancecdpmetrics: 162db18cc31c25256d393383890cb0f3de27cf73
- React-performancetimeline: a3b28cf401e8cb2027fb282a697ea87d97cd320a
+ React-perflogger: ccc20d34acfe74605f0f2d2a414fddf731b14bd1
+ React-performancecdpmetrics: a750a2a3276b32d543542bfe72f7509b65fd8a3a
+ React-performancetimeline: a7bf3ba360917c9001e26c47e55ccab2f6895d00
React-RCTActionSheet: e1c8afe045a25f3a8d73da52bb28e6186718e206
- React-RCTAnimation: 7681b2367405b53d4e91ac76b36bd8fb1ce50a53
- React-RCTAppDelegate: e8d05c439051bd6860638e59fc8fb81cf3ac0f9b
- React-RCTBlob: fa0e5ab89883e4bf5eb05e534b68ce2951ca514b
- React-RCTFabric: d505530c38fada112559a19e91d200a6b8381d4f
- React-RCTFBReactNativeSpec: 2d7c44c5b4349957cec8c77bb5cd401d9348c4fc
- React-RCTImage: 8d32ede0e9f07aa7a446a54e924f23b3347d2960
- React-RCTLinking: ef0c625de1ce2b78189cb65391888628b5d2d6ed
- React-RCTNetwork: 5e6a3678c23c0b8c4e2b69e85551215f1fcfe2b2
- React-RCTRuntime: ec85cc9d0ca3bd98bfcc0674c59f011eacc96d91
- React-RCTSettings: c7f2c32bee82c3f4e757d779fff3c2bf47cc7e46
- React-RCTText: cc134029a95773223502a9aeac47300586426ca5
- React-RCTVibration: 9ed48065a50d4a4311aed5c17272061f2cae910b
+ React-RCTAnimation: f350cac40fbf4d2f7269c50a4809812a51e7143a
+ React-RCTAppDelegate: c7e4dd9a3a94f348a9c9e3f6ec30a2fa45713d0b
+ React-RCTBlob: 8215edb879697c37ebc3d93d44210c136b0f8f12
+ React-RCTFabric: e2a194c2ae6cba49dc67f72250bd48d5457a0711
+ React-RCTFBReactNativeSpec: 77b5b284baa526512b143c24ae44d7e24c688e65
+ React-RCTImage: 55ce5873af9d447dde76711c84ea545688eb5e01
+ React-RCTLinking: 803e8a4356dc848d1cff0882e70b81c2c28f67e1
+ React-RCTNetwork: 5e13fe88a73150e7cd7eff989a55b5c1c7e4b701
+ React-RCTRuntime: ab3bddd645d86fd1858d9005fe4943cf333384a2
+ React-RCTSettings: 3a6fd39c7169fe408f6cf16d939ba7910b02fe6e
+ React-RCTText: 5a2c8addcbe6d3d36636407423d9969012fcdaa7
+ React-RCTVibration: 460b55fcd5ae2f028e9910ccad192f5ffea1d6b8
React-rendererconsistency: 9262a6a4c4be861ffd7e3149c517bd4076a8851f
- React-renderercss: 4840f91b676f4000cc704f9214f950df02be54f1
- React-rendererdebug: 613c8b53e6032d16c4c499d52bbd21c9df6873fa
- React-RuntimeApple: d53d701e0ac401fa6caca87d22881559617e5a5a
- React-RuntimeCore: 2232f165e559a6edf997a5b18e9669a63e997cba
- React-runtimeexecutor: fbe7aa46f3c1233e903fa6758a1c8c372070c33b
- React-RuntimeHermes: a5ada5beb920f09b3fb3fce491d8d3d132c6e677
- React-runtimescheduler: 81f357f73c68c93459b714b1f917e30a40f1a1ea
- React-timing: 5ace10dca5f52437bb6d4212404898d9ab7df82f
- React-utils: 29d70520468725a40da28decabd1c58dda7f6f90
- React-webperformancenativemodule: a5f9909a36ae47ea244e38efd25e479c01d39e14
- ReactAppDependencyProvider: 87593e9dfdba8dac1d7b2af1af05f0eff2a05684
- ReactCodegen: 417334350a76a91784cc20f7aff392327e217dc4
- ReactCommon: 5f2db7556b60816bdc5761a359539bacd2d0250d
- RealmJS: 10fb99cdac98cad8a6c4471c967bd6be10307741
- RNCClipboard: adba6334687b7fb2c37760e26dedd550b4846a72
- RNDeviceInfo: f9d6fd102f8b11daa7ee322391b23cebee3bd95f
- RNFastImage: 462a183c4b0b6b26fdfd639e1ed6ba37536c3b87
- RNFBApp: 022bf8a1be198c5b8dc8af4dcb656d49f903aa8d
- RNFBMessaging: e42061ab9fab61081c38b5661b292c1f295bbc96
- RNFS: 89de7d7f4c0f6bafa05343c578f61118c8282ed8
- RNGestureHandler: be7148bc663eac98c0ad6474b4b105f8cadd56be
- RNKeychain: a2c134ab796272c3d605e035ab727591000b30f3
- RNLocalize: 19917c3f32cf6386f7d2957a638a4281669cae57
- RNQrGenerator: af2f0888eb81b8ff99517a3929d6399444dcc56d
- RNReanimated: 4e6187f2ba1e30e6ddc7c8fc9f19b2dd2b6b2532
- RNScreens: 7f643ee0fd1407dc5085c7795460bd93da113b8f
- RNSentry: 80792b62c5fa701a58e27d022e1eb20d52a796e5
- RNShare: 51d221e8ac06263e91168c604b94274fdcc4784f
- RNSVG: 3405336c4507ee0bafb02b08058d57216daa2c50
- RNWorklets: 6daa3975bebe6047822c7485666d501a716674ca
+ React-renderercss: 1641d6d12b7aa54fda225dd0f1fa24f199d523ae
+ React-rendererdebug: 92ee565692a4a3e6806e88fa4ee816bda5cee693
+ React-RuntimeApple: a4f51fa6ebd62e5ac0d3445e47d2a71efd750939
+ React-RuntimeCore: c5f51bd6afd2884341749817c5ec512d0dcbc4a7
+ React-runtimeexecutor: 3e96660fb93a17185bc8b23c6bbe10fe25f6d3e2
+ React-RuntimeHermes: 8382231d2cdfc51bb67785fbc6cc4218f7e934c4
+ React-runtimescheduler: 44aa1cbed3ce2759678a1e544ad27108c934a046
+ React-timing: ac50e2e44dc82ec7241557bad16adcae184a693b
+ React-utils: 493a45d877f410d62476c045fbf220acbffba194
+ React-webperformancenativemodule: 9b212313b01f5489f21963fbd4a81ef20f280097
+ ReactAppDependencyProvider: 5bf52020fdc0d0a337068ea42d4a6676ce4a04bc
+ ReactCodegen: 5c808345ff57b4f4f1eab230f541921ad9e37500
+ ReactCommon: 3b79ecfd327035654f6c36cf1de8e222d8b835e6
+ RealmJS: a2e97359d58d72ca9fc2deb2e14ba34a218652e5
+ RNCClipboard: a9d5216cbfaf2f51cfe80bcb132856bb9158fe0d
+ RNDeviceInfo: 0a7c1d2532aa7691f9b9925a27e43af006db4dae
+ RNFastImage: 5c9c9fed9c076e521b3f509fe79e790418a544e8
+ RNFBApp: bb2b158188e3bd5161cbdcd7e9058c2edfaa8c11
+ RNFBMessaging: 994290a71d043bc0837e89514be19ce02805790c
+ RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
+ RNGestureHandler: afae32614741017de0f813f74586eee29773f31a
+ RNKeychain: 182d986f809280edd9444a557adc21845f7d1e6f
+ RNLocalize: 95a43f85e41a966be7bc9cff2437128911c52da0
+ RNQrGenerator: 36f1af182d7673bc36e317aca0d293d19883d6e3
+ RNReanimated: 6b69a94db352e4dae7eb540f6fab60ff05c18508
+ RNScreens: 7179cc1ba31b4e18ed29f10abf20c24a7961cf4c
+ RNSentry: f07853ff3fcbb69df26da1d9744e95ee97f683fd
+ RNShare: 11923289a9964c6bd5f507eaa7fe61ec51b0adce
+ RNSVG: 6a91afc99237de70b617c7a84ba84c988ad5573b
+ RNWorklets: 3f35c2c01e5839d4fee0496d10ada185628ba328
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d
Sentry: 4e85b40e4b0235853f40f959d315a6b28e3148d8
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
- VisionCamera: 0044a94f7489f19e19d5938e97dfc36f4784af3c
+ VisionCamera: 47f10351a1b6a8d251b90986ae72ca5f52331954
Yoga: e6489bbfdab9b98f8d51993484d6bd40216b7834
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5
diff --git a/ios/hexa_keeper/AppDelegate.mm b/ios/hexa_keeper/AppDelegate.mm
index 2e26ca1a9..ff82bdb83 100644
--- a/ios/hexa_keeper/AppDelegate.mm
+++ b/ios/hexa_keeper/AppDelegate.mm
@@ -2,12 +2,14 @@
#import
#import
+#import
#import
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
+ self.dependencyProvider = [RCTAppDependencyProvider new];
self.moduleName = @"hexa_keeper";
// You can add your custom initial props in the dictionary below.
// They will be passed down to the ViewController used by React Native.
@@ -62,4 +64,4 @@ - (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull N
restorationHandler:restorationHandler];
}
-@end
\ No newline at end of file
+@end
diff --git a/package.json b/package.json
index d192ee46f..ce1cd6ed9 100644
--- a/package.json
+++ b/package.json
@@ -98,7 +98,7 @@
"react-native-mmkv": "4.3.0",
"react-native-modal": "^13.0.1",
"react-native-nfc-manager": "3.16.0",
- "react-native-nitro-modules": "0.35.4",
+ "react-native-nitro-modules": "0.36.5",
"react-native-pdf": "7.0.4",
"react-native-qrcode-svg": "6.3.2",
"react-native-randombytes": "3.6.1",
diff --git a/yarn.lock b/yarn.lock
index d629fa670..e5c6acfcc 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1296,7 +1296,7 @@
dependencies:
eslint-visitor-keys "^3.4.3"
-"@eslint-community/regexpp@^4.12.2", "@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1":
+"@eslint-community/regexpp@^4.12.2", "@eslint-community/regexpp@^4.6.1":
version "4.12.2"
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b"
integrity sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==
@@ -4411,11 +4411,6 @@
dependencies:
csstype "^3.0.2"
-"@types/semver@^7.3.12":
- version "7.7.1"
- resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.7.1.tgz#3ce3af1a5524ef327d2da9e4fd8b6d95c8d70528"
- integrity sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==
-
"@types/stack-utils@^2.0.0":
version "2.0.3"
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8"
@@ -4455,22 +4450,6 @@
dependencies:
"@types/yargs-parser" "*"
-"@typescript-eslint/eslint-plugin@5.62.0":
- version "5.62.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db"
- integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==
- dependencies:
- "@eslint-community/regexpp" "^4.4.0"
- "@typescript-eslint/scope-manager" "5.62.0"
- "@typescript-eslint/type-utils" "5.62.0"
- "@typescript-eslint/utils" "5.62.0"
- debug "^4.3.4"
- graphemer "^1.4.0"
- ignore "^5.2.0"
- natural-compare-lite "^1.4.0"
- semver "^7.3.7"
- tsutils "^3.21.0"
-
"@typescript-eslint/eslint-plugin@^8.36.0":
version "8.59.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.59.1.tgz#781bc6f9002982cfaf75a185240e24ad7276628a"
@@ -4485,16 +4464,6 @@
natural-compare "^1.4.0"
ts-api-utils "^2.5.0"
-"@typescript-eslint/parser@5.62.0":
- version "5.62.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7"
- integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==
- dependencies:
- "@typescript-eslint/scope-manager" "5.62.0"
- "@typescript-eslint/types" "5.62.0"
- "@typescript-eslint/typescript-estree" "5.62.0"
- debug "^4.3.4"
-
"@typescript-eslint/parser@^8.36.0":
version "8.59.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.59.1.tgz#835d20a62350659a082a1ae2a60b822c40488905"
@@ -4515,14 +4484,6 @@
"@typescript-eslint/types" "^8.59.1"
debug "^4.4.3"
-"@typescript-eslint/scope-manager@5.62.0":
- version "5.62.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c"
- integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==
- dependencies:
- "@typescript-eslint/types" "5.62.0"
- "@typescript-eslint/visitor-keys" "5.62.0"
-
"@typescript-eslint/scope-manager@8.59.1":
version "8.59.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.59.1.tgz#ed90d054fc3db2d0c81464db3a953a94fb85bb58"
@@ -4536,16 +4497,6 @@
resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.59.1.tgz#ba2a779a444f1d5cb92a606f9b209d239fd4cab1"
integrity sha512-/0nEyPbX7gRsk0Uwfe4ALwwgxuA66d/l2mhRDNlAvaj4U3juhUtJNq0DsY8M2AYwwb9rEq2hrC3IcIcEt++iJA==
-"@typescript-eslint/type-utils@5.62.0":
- version "5.62.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a"
- integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==
- dependencies:
- "@typescript-eslint/typescript-estree" "5.62.0"
- "@typescript-eslint/utils" "5.62.0"
- debug "^4.3.4"
- tsutils "^3.21.0"
-
"@typescript-eslint/type-utils@8.59.1":
version "8.59.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.59.1.tgz#9c83d3f2ed9187a815e8120f72c08317e513e409"
@@ -4557,29 +4508,11 @@
debug "^4.4.3"
ts-api-utils "^2.5.0"
-"@typescript-eslint/types@5.62.0":
- version "5.62.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f"
- integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==
-
"@typescript-eslint/types@8.59.1", "@typescript-eslint/types@^8.59.1":
version "8.59.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.59.1.tgz#c1d014d3f03a97e0113a8899fc9d4e45a7fb0ca9"
integrity sha512-ZDCjgccSdYPw5Bxh+my4Z0lJU96ZDN7jbBzvmEn0FZx3RtU1C7VWl6NbDx94bwY3V5YsgwRzJPOgeY2Q/nLG8A==
-"@typescript-eslint/typescript-estree@5.62.0":
- version "5.62.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b"
- integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==
- dependencies:
- "@typescript-eslint/types" "5.62.0"
- "@typescript-eslint/visitor-keys" "5.62.0"
- debug "^4.3.4"
- globby "^11.1.0"
- is-glob "^4.0.3"
- semver "^7.3.7"
- tsutils "^3.21.0"
-
"@typescript-eslint/typescript-estree@8.59.1":
version "8.59.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.59.1.tgz#4391fadf98a22c869c5b6522dbf4e491e53e351a"
@@ -4595,20 +4528,6 @@
tinyglobby "^0.2.15"
ts-api-utils "^2.5.0"
-"@typescript-eslint/utils@5.62.0":
- version "5.62.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86"
- integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==
- dependencies:
- "@eslint-community/eslint-utils" "^4.2.0"
- "@types/json-schema" "^7.0.9"
- "@types/semver" "^7.3.12"
- "@typescript-eslint/scope-manager" "5.62.0"
- "@typescript-eslint/types" "5.62.0"
- "@typescript-eslint/typescript-estree" "5.62.0"
- eslint-scope "^5.1.1"
- semver "^7.3.7"
-
"@typescript-eslint/utils@8.59.1", "@typescript-eslint/utils@^8.0.0":
version "8.59.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.59.1.tgz#cf6204d69701bbbc5b150f98c18aeef0a42c10bd"
@@ -4619,14 +4538,6 @@
"@typescript-eslint/types" "8.59.1"
"@typescript-eslint/typescript-estree" "8.59.1"
-"@typescript-eslint/visitor-keys@5.62.0":
- version "5.62.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e"
- integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==
- dependencies:
- "@typescript-eslint/types" "5.62.0"
- eslint-visitor-keys "^3.3.0"
-
"@typescript-eslint/visitor-keys@8.59.1":
version "8.59.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.59.1.tgz#b5cba576287a3eeb0b400b62813189abcc3f976a"
@@ -5014,11 +4925,6 @@ array-includes@^3.1.6, array-includes@^3.1.8:
is-string "^1.1.1"
math-intrinsics "^1.1.0"
-array-union@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
- integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
-
array.prototype.findlast@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz#3e4fbcb30a15a7f5bf64cf2faae22d139c2e4904"
@@ -6598,13 +6504,6 @@ dijkstrajs@^1.0.1:
resolved "https://registry.yarnpkg.com/dijkstrajs/-/dijkstrajs-1.0.3.tgz#4c8dbdea1f0f6478bff94d9c49c784d623e4fc23"
integrity sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==
-dir-glob@^3.0.1:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
- integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==
- dependencies:
- path-type "^4.0.0"
-
doctrine@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d"
@@ -6902,7 +6801,7 @@ es-errors@^1.3.0:
resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f"
integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==
-es-iterator-helpers@^1.1.0, es-iterator-helpers@^1.2.1:
+es-iterator-helpers@^1.2.1:
version "1.3.2"
resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.3.2.tgz#8f4ff1f3603cbd09fbdb72c747a679779a65cc7f"
integrity sha512-HVLACW1TppGYjJ8H6/jqH/pqOtKRw6wMlrB23xfExmFWxFquAIWCmwoLsOyN96K4a5KbmOf5At9ZUO3GZbetAw==
@@ -7120,11 +7019,6 @@ eslint-plugin-jsx-a11y@6.10.2:
safe-regex-test "^1.0.3"
string.prototype.includes "^2.0.1"
-eslint-plugin-react-hooks@4.6.2:
- version "4.6.2"
- resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz#c829eb06c0e6f484b3fbb85a97e57784f328c596"
- integrity sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==
-
eslint-plugin-react-hooks@^7.0.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-7.1.1.tgz#e6742cad75d970c0a3f30d7d3fa80a4784f55927"
@@ -7141,38 +7035,21 @@ eslint-plugin-react-native-globals@^0.1.1:
resolved "https://registry.yarnpkg.com/eslint-plugin-react-native-globals/-/eslint-plugin-react-native-globals-0.1.2.tgz#ee1348bc2ceb912303ce6bdbd22e2f045ea86ea2"
integrity sha512-9aEPf1JEpiTjcFAmmyw8eiIXmcNZOqaZyHO77wgm0/dWfT/oxC1SrIq8ET38pMxHYrcB6Uew+TzUVsBeczF88g==
-eslint-plugin-react-native@4.1.0, eslint-plugin-react-native@^4.0.0:
+eslint-plugin-react-native@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react-native/-/eslint-plugin-react-native-4.1.0.tgz#5343acd3b2246bc1b857ac38be708f070d18809f"
integrity sha512-QLo7rzTBOl43FvVqDdq5Ql9IoElIuTdjrz9SKAXCvULvBoRZ44JGSkx9z4999ZusCsb4rK3gjS8gOGyeYqZv2Q==
dependencies:
eslint-plugin-react-native-globals "^0.1.1"
-eslint-plugin-react@7.37.2:
- version "7.37.2"
- resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.37.2.tgz#cd0935987876ba2900df2f58339f6d92305acc7a"
- integrity sha512-EsTAnj9fLVr/GZleBLFbj/sSuXeWmp1eXIN60ceYnZveqEaUCyW4X+Vh4WTdUhCkW4xutXYqTXCUSyqD4rB75w==
+eslint-plugin-react-native@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-react-native/-/eslint-plugin-react-native-5.0.0.tgz#2ee990ba4967c557183b31121578547fb5c02d5d"
+ integrity sha512-VyWlyCC/7FC/aONibOwLkzmyKg4j9oI8fzrk9WYNs4I8/m436JuOTAFwLvEn1CVvc7La4cPfbCyspP4OYpP52Q==
dependencies:
- array-includes "^3.1.8"
- array.prototype.findlast "^1.2.5"
- array.prototype.flatmap "^1.3.2"
- array.prototype.tosorted "^1.1.4"
- doctrine "^2.1.0"
- es-iterator-helpers "^1.1.0"
- estraverse "^5.3.0"
- hasown "^2.0.2"
- jsx-ast-utils "^2.4.1 || ^3.0.0"
- minimatch "^3.1.2"
- object.entries "^1.1.8"
- object.fromentries "^2.0.8"
- object.values "^1.2.0"
- prop-types "^15.8.1"
- resolve "^2.0.0-next.5"
- semver "^6.3.1"
- string.prototype.matchall "^4.0.11"
- string.prototype.repeat "^1.0.0"
+ eslint-plugin-react-native-globals "^0.1.1"
-eslint-plugin-react@^7.30.1:
+eslint-plugin-react@^7.30.1, eslint-plugin-react@^7.37.5:
version "7.37.5"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz#2975511472bdda1b272b34d779335c9b0e877065"
integrity sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==
@@ -7196,7 +7073,7 @@ eslint-plugin-react@^7.30.1:
string.prototype.matchall "^4.0.12"
string.prototype.repeat "^1.0.0"
-eslint-scope@5.1.1, eslint-scope@^5.1.1:
+eslint-scope@5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==
@@ -7217,7 +7094,7 @@ eslint-visitor-keys@^2.1.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303"
integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==
-eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3:
+eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3:
version "3.4.3"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
@@ -7446,7 +7323,7 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
-fast-glob@^3.2.9, fast-glob@^3.3.2, fast-glob@^3.3.3:
+fast-glob@^3.3.2, fast-glob@^3.3.3:
version "3.3.3"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818"
integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==
@@ -7946,18 +7823,6 @@ globalthis@^1.0.4:
define-properties "^1.2.1"
gopd "^1.0.1"
-globby@^11.1.0:
- version "11.1.0"
- resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"
- integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==
- dependencies:
- array-union "^2.1.0"
- dir-glob "^3.0.1"
- fast-glob "^3.2.9"
- ignore "^5.2.0"
- merge2 "^1.4.1"
- slash "^3.0.0"
-
google-protobuf@3.21.4:
version "3.21.4"
resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.21.4.tgz#2f933e8b6e5e9f8edde66b7be0024b68f77da6c9"
@@ -9517,7 +9382,7 @@ merge-stream@^2.0.0:
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
-merge2@^1.3.0, merge2@^1.4.1:
+merge2@^1.3.0:
version "1.4.1"
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
@@ -10082,11 +9947,6 @@ napi-build-utils@^2.0.0:
resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-2.0.0.tgz#13c22c0187fcfccce1461844136372a47ddc027e"
integrity sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==
-natural-compare-lite@^1.4.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4"
- integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==
-
natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
@@ -10276,7 +10136,7 @@ object.assign@^4.1.2, object.assign@^4.1.4, object.assign@^4.1.7:
has-symbols "^1.1.0"
object-keys "^1.1.1"
-object.entries@^1.1.5, object.entries@^1.1.8, object.entries@^1.1.9:
+object.entries@^1.1.5, object.entries@^1.1.9:
version "1.1.9"
resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.9.tgz#e4770a6a1444afb61bd39f984018b5bede25f8b3"
integrity sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==
@@ -11196,10 +11056,10 @@ react-native-nfc-manager@3.16.0:
dependencies:
"@expo/config-plugins" "~8.0.0"
-react-native-nitro-modules@0.35.4:
- version "0.35.4"
- resolved "https://registry.yarnpkg.com/react-native-nitro-modules/-/react-native-nitro-modules-0.35.4.tgz#eff7f3e1e279b44568850300e9789af3fc30facd"
- integrity sha512-4qZa+1kgR/sPRNZv+UShxyArEPpovWxw76Dfd/DtCVtkQ92wOOxGIzdYvndprabd+t+r8zNYgYEPYE74gzkuVQ==
+react-native-nitro-modules@0.36.5:
+ version "0.36.5"
+ resolved "https://registry.yarnpkg.com/react-native-nitro-modules/-/react-native-nitro-modules-0.36.5.tgz#438c77e4f1e77bd1d3e901eb5b4953762e68a078"
+ integrity sha512-SJby84+hovD70JmQ1fq+56tw3oapJeChehUqXA4Gqjm+ktJhMAcj8LGwoAjStSOUwRaK7czbzBPB0Widj+EDoQ==
react-native-pdf@7.0.4:
version "7.0.4"
@@ -11949,7 +11809,7 @@ semver@^6.3.0, semver@^6.3.1:
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
-semver@^7.1.3, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4, semver@^7.6.3, semver@^7.7.3:
+semver@^7.1.3, semver@^7.3.4, semver@^7.3.5, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4, semver@^7.6.3, semver@^7.7.3:
version "7.7.4"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.4.tgz#28464e36060e991fa7a11d0279d2d3f3b57a7e8a"
integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==
@@ -12392,7 +12252,7 @@ string.prototype.includes@^2.0.1:
define-properties "^1.2.1"
es-abstract "^1.23.3"
-string.prototype.matchall@^4.0.11, string.prototype.matchall@^4.0.12:
+string.prototype.matchall@^4.0.12:
version "4.0.12"
resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz#6c88740e49ad4956b1332a911e949583a275d4c0"
integrity sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==
@@ -12779,23 +12639,11 @@ tslib@2.7.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01"
integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==
-tslib@^1.8.1:
- version "1.14.1"
- resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
- integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
-
tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.8.0, tslib@^2.8.1:
version "2.8.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f"
integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==
-tsutils@^3.21.0:
- version "3.21.0"
- resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
- integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==
- dependencies:
- tslib "^1.8.1"
-
tunnel-agent@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"