mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 10:58:10 +00:00
The wake phase "orcad ready" (W9) runs from orcad's spawn to the control plane having the pairing offer. After orca-sandbox-start exits, the control plane made a second Vercel round trip (files API, ~120 ms from here) to read the offer, because command stdout is kept as logs. startOrcad now passes a fresh 32-byte key per call in env (env is not kept). The start script adds "sealedOffer": "<iv>.<base64 AES-256-CTR(offer line)>" to the pointer line it already prints, so the logs only hold ciphertext and the control plane opens the offer locally. The key is unset first thing in the script and in the prelude, so nothing the script starts inherits it. If the offer is missing or does not open (older image, no openssl, wrong key), the control plane reads the file as before. Older Workers send no key, and current images then print the plain pointer. The ready poll in the start script drops from 50 ms to 10 ms (~20 ms mean), keeping the 60 s minimum timeout. Verified on a VM from snap_aQmW, driving the start script like the control plane: all four starts, including an idempotent second start, opened without the files API, and the stdout never held the pairing code.