Commit Graph
539 Commits
Author SHA1 Message Date
Neil 78fce9977d fix(sandbox-control): the orphan sweep no longer stops warm-pool VMs (their record is the pool row) 2026-11-09 19:49:24 -08:00
Neil d5e57508cf Merge pull request #152 from nwparker/cloud/activity-keepalive
feat(cloud): VM activity, not the desktop, keeps a sandbox's lease alive
2026-11-09 19:44:57 -08:00
Neil 4dee4cc7c6 feat(cloud): VM activity keeps a sandbox alive without a desktop - orcad publishes its work verdict, the cron renews busy leases and sleeps idle ones 2026-11-09 19:41:36 -08:00
Neil 893be16f77 perf(terminal): prove an idle Linux daemon shell from /proc so Enter skips the paste settle (#151)
terminal.send text+Enter to a daemon-backed shell always waited the 500 ms agent paste
settle: the daemon's shell-foreground answer is lifecycle ownership, which is only proven
after a recovery or full-screen exit, never for a fresh or plain-command shell. On Linux
the idle-prompt claim now also accepts the shell's own /proc stat (process group is the
terminal foreground group, i.e. ps '+'), scoped to the target PTY; other hosts unchanged.

The acceptance wake split uses one persistent paired connection per wake (the desktop's
transport) by default; transport=cli keeps the per-call socket the CLI dials.
2026-11-09 19:38:55 -08:00
Neil 05d43602c8 Merge pull request #149 from nwparker/cloud/delete-unconfirmed-fix
fix(cloud): P0 delete leak - never drop a row for an unconfirmed sandbox; creator can delete across teams; asleep delete without wake
2026-11-09 19:33:17 -08:00
Neil 5bdec31000 fix(cloud): address review - asleep delete needs Force delete and runs ownership checks, destroyed sandboxes forget their row, removed members get no cross-team delete, destroy errors always surface 2026-11-09 19:27:29 -08:00
Neil cb7d58bbc0 fix(cloud): deletes never drop a row for a sandbox Orca Cloud can't confirm; asleep cloud delete skips the wake; creator can delete across teams; picker sign-in selects Orca Cloud; signed-out create shows the sign-in card 2026-11-09 19:20:44 -08:00
Neil 1417e042fc feat(cloud): desktop acceptance covers the #127 fixes and runs on a remote Mac
- auth.signed-out-create (D-1/D-4), proj.cloud-name (D-3), life.delete-unconfirmed (D-2,
  team switch -> not_found), life.delete-after-oob-destroy; life.destroy now requires destroyed
  and records the asleep-delete refusal
- starts signed out (dev auth) with no sign-in-then-relaunch workaround; mock keychain so a
  fresh dev app identity does not block on a macOS Keychain prompt
- cloud vs local rows disambiguated by badge (Move to this computer reuses the name)
- upload/download helpers for staging and collecting a run on a paired Orca environment
2026-11-09 19:08:55 -08:00
Neil f2df1de717 feat(cloud): acceptance wake-delivery split benchmark, persistent-connection downloads, golden status helper 2026-11-09 19:08:55 -08:00
Neil d7552c51a0 feat(cloud): acceptance remote-desktop check (ticketed websockify upgrade on the VM loopback) 2026-11-09 19:08:55 -08:00
Neil 75f7919107 docs(cloud): acceptance findings — desktop fixes #127 awaiting UI re-run 2026-11-09 19:08:55 -08:00
Neil 2a075764a7 fix(sandbox-control): golden builds retry apt downloads and wait for the dpkg lock (provision_exit_100) (#147) 2026-11-09 19:06:04 -08:00
Neil 126597343f chore(sandbox-control): operator rotation prints the build's log tail on failure (#145) 2026-11-09 18:55:32 -08:00
Neil 4c1b26e67e Merge remote-tracking branch 'private/cloud/integration' into w6-agent-firstrun
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
2026-11-09 18:45:39 -08:00
Neil 0a625740cc perf(orcad): skip the disposable startup preflight on Orca Cloud boots (#141)
On every Orca Cloud start and wake, orcad ran its disposable startup preflight child. That child is a
second full load of the 15 MB bundle plus the SQLite and node-pty probes, and it ran before main().
The cloud slot could never be qualified: qualification needed the managed-activation env, and the
marker lives in the slot directory, which is root-owned in the image. In-VM profiles showed the main
thread idle for about 580 ms waiting on that child.

- ORCA_ORCAD_STARTUP_QUALIFICATION_DIR names a writable directory for the startup-qualified marker
  and opts the slot into qualification. The key is unchanged: artifact version, file stat identity,
  runtime, ABI, kernel and launch env. It survives a stop and resume: inode, mtime and ctime are
  identical after resume, and the first launch after resume skipped the preflight.
- The image creates /opt/orca/startup-qualification. The provisioning smoke run records the marker,
  and orca-sandbox-start passes the env.
- Agent-state-rules live updates and speech-model warm-up now start after the ready line instead of
  before it.
- Once the ready line is published, a terminal list warms the terminal path (worktree catalog,
  daemon inventory) before the reconnecting desktop asks for it.

Real 4-vCPU VMs, readyMs median of 5: idle 1475 -> 903 ms; with 3 busy cores 1921 -> 1200 ms.
2026-11-09 18:44:16 -08:00
Neil d98b730df9 fix(cloud): agents start working from the phone/API — Claude Code first-run screens and Codex trust/sandbox pre-answered in the sandbox, no self-update mid-session; 'Open terminal to sign in' opens the terminal (paneView rides with paneKey) 2026-11-09 18:42:25 -08:00
Neil a2dee979c9 feat(sandbox-control): rebuild org environments on the new golden after every golden swap (#140)
Environment snapshots are built on a golden, so workspaces from them kept that golden's orcad and VM
scripts after rotation (e.g. no files.archiveStart). Each 5-minute tick, after the golden tick, every
environment whose active build's base_snapshot_id is not the current golden gets a background rebuild
of the active build's config (only the base image changes), attributed to system:golden-refresh and
billed like any build. The active build serves until the new one succeeds, then the newest-success
activation swaps it atomically; the old snapshot stays for rollback; a failed rebuild keeps the active
build, shows the usual failed build, and is not retried for that golden. At most 2 starts per tick
and 3 builds in flight overall. startBuild accepts an explicit config for this.
2026-11-09 18:33:09 -08:00
Neil 8ef12e5729 fix(cloud): desktop P2 review — unarchiving state, dismissible progress, late/thrown wake failures, one failure message 2026-11-09 18:12:17 -08:00
Neil 724e8bce0b feat(cloud): remote desktop P2 — Unarchive action, wake then open, light reconnect card, palette entry 2026-11-09 18:12:13 -08:00
Neil 63377c810d fix(sandbox-control): source-built goldens provision with the built commit's image files, not the Worker's copies (#137)
The Worker-started source build used the VM scripts, provision script and manifest pins embedded in
the Worker that started it, so a golden built from a newer commit could miss that commit's new VM
scripts (seen live: snap_HTsU from 19f900e has #122's orcad but not orca-desktop-proxy or
orca-desktop-page.js). source-build.sh now sources image/commit-provision-env.mjs from the fetched
checkout (no dependencies; mirrors provisionEnv, enforced by a test), so the image ships exactly that
commit. Tests also require every image/vm file to be a declared VM script and installed by provision.
2026-11-09 18:10:35 -08:00
Neil e998a5ce96 W8 follow-ups: removal and role loss reach phones; role-aware plan-denial copy (#135)
* fix(w8): removing a member revokes their phones; role changes move phones too; a phone's stored role never re-syncs keys

* fix(w8): one removal path revokes keys, phones, grants and routines; stale desktop tokens can't re-sync roles or vouch phones; a grant revoked mid-issue stays revoked

* fix(w8): a removed member's unexpired desktop tokens stop working; changes count from auth's time; desktop re-mints and retries enroll on stale_token

* feat(w8): role-aware plan-denial copy on the phone (owners and admins get the fix, members who to ask)

* fix(w8): W10 copy (per-seat team limit, choose a plan) and FE review (3 s abortable role read, Android live region, more copy cases); no casts
2026-11-09 18:02:56 -08:00
Neil c68f06864a fix(cloud): name the VM project after its repo (orca repo add --display-name); golden builder uses wait=true exit probe; image-only merges rebuild (#133)
* feat(cli,sandbox-control): orca repo add --display-name; cloud sandboxes name the project after its repository

The VM checkout lives at /vercel/sandbox/project, so boot-time registration (#104) named the repo
'project'. repo.add already accepts displayName; the CLI now exposes it as --display-name and
orca-sandbox-start passes the repository basename from ORCA_REPO_URL.

* fix(sandbox-control): golden builder polls detached builds with a bounded wait=true read; image-only merges trigger a rebuild

The provider reports a detached command's exit code only to a wait=true read (W1's finding, #123):
stepBuild's plain GET is what kept finished golden builds 'running' until the deadline. stepBuild and
the operator rotation now use the same bounded wait probe (4 s); the exit-file marker stays as a
fallback. golden-source's VM path list now includes cloud/apps/sandbox-control/image/ (VM scripts,
provision, manifest), so a script-only merge (e.g. orca-desktop-proxy) rebuilds the golden too.
2026-11-09 17:56:20 -08:00
Neil b7eae3fec8 Merge pull request #131 from nwparker/cloud/w9-eval
fix(cloud): acceptance cleans up staging teams via cleanup-teams.mjs
2026-11-09 17:54:23 -08:00
Neil fb332cc4ca Merge pull request #87 from nwparker/cloud/w2-final
feat(cloud): W2 final pass: glossary, control-plane idle minutes, rollover restarting state, Move to this computer flow
2026-11-09 17:51:09 -08:00
Neil fe4ae20d78 fix(cloud): acceptance deletes staging teams via cleanup-teams.mjs (#130), skips team checks when cleanup is unavailable 2026-11-09 17:50:02 -08:00
Neil d81bb25943 Merge pull request #130 from nwparker/cloud/staging-cleanup-teams
chore(cloud): staging cleanup-teams.mjs
2026-11-09 17:46:51 -08:00
Neil 56315c1f2b Merge pull request #129 from nwparker/cloud/w9-eval
feat(cloud): acceptance — headless downloads, staging team checks, poll-mode env builds
2026-11-09 17:46:40 -08:00
Neil d421cd1583 chore(cloud): cleanup-teams.mjs for staging throwaway teams; PropelAuth key file fallback; test-env guard 2026-11-09 17:46:38 -08:00
Neil 8b05b95c98 docs(cloud): acceptance findings — downloads pass on the #115 image 2026-11-09 17:46:24 -08:00
Neil 84b02d6761 Merge remote-tracking branch 'private/cloud/integration' into cloud/w2-final
# Conflicts:
#	src/renderer/src/components/worktree-creation/vm-build-failure.test.ts
2026-11-09 17:43:38 -08:00
Neil eedb151a46 feat(cloud): acceptance headless download check, staging team create/invite, findings 2026-11-09 17:41:37 -08:00
Neil 60377d3364 feat(cloud): remote desktop Beta — single-use tickets, fit, clipboard, keyboard release (W10 RD-1..6) (#122)
* feat(cloud): remote desktop single-use tickets, fit, clipboard and keyboard release

- VM: Xvnc on a 0600 socket with no VNC auth plus an X cookie; orca-desktop-proxy (websockify
  subclass) admits one WebSocket per unused 60 s ticket from the same localhost origin, refuses
  rebinding Hosts, scrubs tickets from logs, serves the page with connect-src 'self'.
- Worker: POST /desktop mints a fresh ticket per call (schemaVersion 2).
- Desktop: no secret in the tab URL; main hands the page tickets on load and reconnect (backoff,
  floor, pause with Reconnect), only for the exact URL of a live forward it opened; keyboard stays
  in the desktop until Ctrl+Cmd / Ctrl+Alt; a paste key pushes this computer's clipboard; sandbox
  copies reach this computer after a copy gesture.
- UI: keyboard hint, asleep/starting neutral tone and mapping, persistent error toasts, Beta badge.

* fix(cloud): remote desktop review fixes

- Security review: noVNC host/port/encrypt pinned to the page's origin, CSP connect-src 'self',
  exact-URL + live-forward trust, mint floor and per-minute cap, copy gate on copy gestures only,
  X display cookie.
- Design review: archived is its own neutral state, starting covers waking, page messages say
  "Wake it in Orca", pause overlay is a status for calm states and focuses Reconnect, hint wraps
  and hides from assistive tech when faded.
- FE review: paste follows the keyboard layout, AltGr never releases, page calls settle on
  navigation, state notices only on change, hint once per load/release, paste always pushes,
  no committed bytecode, session tests.

* fix(cloud): remote desktop archived page message, hint layout, fixtures

* fix(cloud): remote desktop copy gate counts double-clicks (pointer events have no click count)

* chore(cloud): remote desktop lint (exhaustive pause reasons, no test casts or wall clock)
2026-11-09 17:36:19 -08:00
Neil 87da8eb16a Merge remote-tracking branch 'private/cloud/integration' into cloud/w2-final 2026-11-09 17:36:10 -08:00
Neil a2a92474c0 fix(cloud): acceptance polls env builds by default (verifies server-side progression); findings update 2026-11-09 17:36:05 -08:00
Neil 04e6a800d8 fix(cloud): env builds finish without a reader: bounded wait=true exit probe (#123)
* fix(sandbox-control): read the orgRole claim that Orca Cloud auth mints (#29)

Auth mints the live org role as orgRole on sandbox tokens (same claim as billing
tokens, stablyai/orca-cloud#695); the verifier read org_role, so admins would
never have been recognized.

* wip(cloud): environment builds control plane

* wip(cloud): environment build boot path, staleness, routes

* wip(cloud): env build tests, anonymous staleness fallback

* wip(cloud): migration 0008 (claimed), quieter recovered clone errors

* fix(cloud): env build review: interrupted-snapshot recovery, bounded log reads, secret redaction, activation guard, hook/prelude fixes

* fix(cloud): wait briefly for the build exit code after its log ends; print the base image and package manager

* wip(desktop): org environments client, IPC, CLI, settings UI, orcad disk usage + low-disk banner

* perf(cloud): smoke-boot each environment build before activating it; skip the redundant prelude fetch

* fix(cloud): a GitHub token error fails the build as github_unavailable instead of cloning anonymously

* perf(cloud): warm pool VMs per hot environment build, so a create from an org environment skips the provider boot

* wip(desktop): cloud environment UI round-3 fixes

* fix(cloud): pool-per-build review: smoke race safety, provider hiccups skip smoke, usage-based hot builds with caps, bounded boots, index

* fix(desktop): Configure with an agent hands the prompt over at launch (trust dialog swallowed the pasted Enter); CLI builds table widths

* polish(desktop): W10 P2s — InlineError action slot, shared focus-ring, copy

* feat(cloud): build event stream heartbeat every 20 s

* fix(desktop): FE review — stable virtualizer, shadow-buffer replays, heartbeat-aware build watch, CLI follower restarts, repo import path checks, poll races

* feat(cloud): meter environment build sandbox time to the member who started it; no setup-script nudge for workspaces booted from an env build

* fix(cloud): environment builds progress server-side on a Durable Object alarm, not only while someone streams their log

* fix(cloud): advance env builds with a bounded wait=true exit probe (Vercel reports exit codes only to waiting readers)
2026-11-09 17:33:04 -08:00
Neil 4220d3f837 Merge pull request #121 from nwparker/cloud/w9-eval
feat(cloud): real-VM acceptance harness (W9) — parity checks, benchmarks, desktop run, evaluation report
2026-11-09 17:29:03 -08:00
Neil 2fca518200 Merge pull request #120 from nwparker/cloud/w6-precedence-test
W6: test + doc that the egress swap uses the same precedence as plain injection
2026-11-09 17:28:53 -08:00
Neil d84196a177 docs(cloud): acceptance findings — W6 precedence confirmed 2026-11-09 17:28:51 -08:00
Neil e95a147837 fix(cloud): env builds progress server-side on a Durable Object alarm, not only while streamed (#118)
* fix(sandbox-control): read the orgRole claim that Orca Cloud auth mints (#29)

Auth mints the live org role as orgRole on sandbox tokens (same claim as billing
tokens, stablyai/orca-cloud#695); the verifier read org_role, so admins would
never have been recognized.

* wip(cloud): environment builds control plane

* wip(cloud): environment build boot path, staleness, routes

* wip(cloud): env build tests, anonymous staleness fallback

* wip(cloud): migration 0008 (claimed), quieter recovered clone errors

* fix(cloud): env build review: interrupted-snapshot recovery, bounded log reads, secret redaction, activation guard, hook/prelude fixes

* fix(cloud): wait briefly for the build exit code after its log ends; print the base image and package manager

* wip(desktop): org environments client, IPC, CLI, settings UI, orcad disk usage + low-disk banner

* perf(cloud): smoke-boot each environment build before activating it; skip the redundant prelude fetch

* fix(cloud): a GitHub token error fails the build as github_unavailable instead of cloning anonymously

* perf(cloud): warm pool VMs per hot environment build, so a create from an org environment skips the provider boot

* wip(desktop): cloud environment UI round-3 fixes

* fix(cloud): pool-per-build review: smoke race safety, provider hiccups skip smoke, usage-based hot builds with caps, bounded boots, index

* fix(desktop): Configure with an agent hands the prompt over at launch (trust dialog swallowed the pasted Enter); CLI builds table widths

* polish(desktop): W10 P2s — InlineError action slot, shared focus-ring, copy

* feat(cloud): build event stream heartbeat every 20 s

* fix(desktop): FE review — stable virtualizer, shadow-buffer replays, heartbeat-aware build watch, CLI follower restarts, repo import path checks, poll races

* feat(cloud): meter environment build sandbox time to the member who started it; no setup-script nudge for workspaces booted from an env build

* fix(cloud): environment builds progress server-side on a Durable Object alarm, not only while someone streams their log
2026-11-09 16:26:55 -08:00
Neil 721d726c4a chore(cloud): register the acceptance harness test runner 2026-11-09 16:26:37 -08:00
Neil 5f4e84fd6d test(sandbox-control): egress swap and plain injection resolve keys with the same precedence (team > repository > personal for agent keys) 2026-11-09 16:19:02 -08:00
Neil 36ef6c1f65 test(cloud): acceptance harness unit tests 2026-11-09 16:17:06 -08:00
Neil be86278bb5 feat(cloud): acceptance desktop import, build event-stream wait, routine creds, key revocation, summary 2026-11-09 16:16:40 -08:00
Neil 86390320c8 feat(cloud): desktop Electron acceptance run (create, keystroke, ports, ssh, sleep/wake, transfer, destroy) 2026-11-09 16:16:39 -08:00
Neil 947813d4fc fix(cloud): acceptance check fixes (seat true-down, repo object, ssh probe, ports bound, kid from key file, load notes) 2026-11-09 16:16:39 -08:00
Neil f0192658c8 feat(cloud): acceptance checks for W1 builds, W2 lifecycle, W3 shares/ssh/ports, W4 team, W5 API/MCP/routines, W8 devices 2026-11-09 16:16:39 -08:00
Neil d904c66d96 feat(cloud): acceptance seat proration and dunning checks (test clocks) 2026-11-09 16:16:38 -08:00
Neil 8433de5032 feat(cloud): acceptance checks for agents, findings, 3DS, kill switch on a slept box 2026-11-09 16:16:38 -08:00
Neil 664a5206df feat(cloud): real-VM acceptance harness skeleton (checks, benchmarks, ledger, report) 2026-11-09 16:16:38 -08:00
Neil 8fec6ef31e feat(sandbox-control): role changes re-cap keys and MCP grants; Idempotency-Key on workspace create; teammate names in API views and the sender envelope 2026-11-09 16:12:43 -08:00