← Back to brief

project box extractor migration

memory · project_box_extractor_migration.md

Goal: End Mac dependency + recurring macOS-Keychain "Chrome Safe Storage" prompts + HS-cookie staleness by running the credential/metrics extractors natively on the Hetzner box (178.156.250.227, key ~/.ssh/skyrun_cloud, user skyrun).

Why: Mac extractors hard-depend on (a) security find-generic-password Keychain (Chrome Safe Storage key for cookie-DB decrypt + SkyRun/cloudflare_api_token), (b) macOS Chrome profile paths, (c) AppleScript chrome_bridge. All break on Linux. The Mac launchd HS-cookie refresh was hourly but the shortest HS cookie TTL is ~20 min → cloud reconciler went 401/phantom-gap ~20 min into every hour (the symptom chased for days).

How to apply: Port pattern = replace cookie-DB-decrypt with live Playwright connect_over_cdp(http://127.0.0.1:9222)context.cookies() (no Keychain, no Linux-encryption reverse-eng), and replace security ... cloudflare_api_token with the box file ~/.config/skyrun/cf_api_token (chmod 600, skyrun — provisioned 2026-05-16 from Mac Keychain; that read is SILENT/non-prompting unlike Chrome Safe Storage). Keep payload schema + CF KV keys IDENTICAL so cloud Workers need zero changes. Wrap as skyrun-<x>.service + .timer, created DISABLED until explicit cutover (reference_cloud_box.md discipline — box timers stay off; do not flip without Joseph's call).

DONE (verified 2026-05-16):

TODO (same port pattern; all currently carry the macOS security dep → broken on box as-is):