"""Refuse startup outside the explicitly approved first-use window (no network).""" import json import sys import time from pathlib import Path path = Path(sys.argv[1]) window = json.loads(path.read_text()) if not path.with_name('window-active').is_file(): raise SystemExit('first-use window is inactive') if not window.get('approved') or time.time() >= int(window['deadline_epoch']): raise SystemExit('first-use window has expired or is not approved')