Commit Graph
778 Commits
Author SHA1 Message Date
Neil 3091a87385 Merge stablyai/orca main (52b618339f) into cloud/integration
Resolve 104 conflicts toward upstream's regrouped layout (rpc, profile-state, orca-profiles,
renderer lib/runtime moves) with cloud behaviour re-applied; repoint cloud imports at moved modules.
2026-11-12 03:30:25 -08:00
Neil d3b6609ac9 refactor(rpc): group root modules by defining owner (#41475)
* refactor(rpc): group root modules by defining owner

* test(orcad): include JSON CLI failures in launcher diagnostics
2026-11-12 02:18:19 -08:00
Neil c856b945f1 feat(cloud): ENTITLEMENTS-B2 metadata.orca_plan on Stripe prices is the catalog join key
Neil's Q1 answer: a plan id on the Stripe Price/Product maps to the repo catalog's entitlements.
seatPriceMatch reads price.metadata.orca_plan (after env ids and price history, before lookup key
and product); the catalog sync logs a lookup-key/tag mismatch; stripe-test-setup tags every price.
2026-11-12 01:44:10 -08:00
Neil fe2db1b352 Merge pull request #507 from nwparker/cloud/entitlements-b
feat(cloud): ENTITLEMENTS-B Stripe lifecycle for grants, reconciliation, GET /v1/plans and GET /v1/entitlements (fixes the planForPrice orphaning bug)
2026-11-12 01:44:05 -08:00
Neil c2f5b1fbb7 Merge remote-tracking branch 'private/cloud/integration' into cloud/n02-reland
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
2026-11-12 01:25:37 -08:00
Neil 4b7456cada Merge pull request #520 from nwparker/cloud/w6-bind-identity
fix(cloud): binding the GitHub App through OAuth also connects the binder's GitHub identity (commits as you)
2026-11-12 01:25:14 -08:00
Neil ec96b185d8 test(cloud): install redirect with an OAuth code (request-auth-on-install) stores the identity 2026-11-12 01:03:41 -08:00
Neil 380b6056ea Merge pull request #506 from nwparker/cloud/reland-485
fix(cloud): re-land #485 zsh history hook (REG-11 was a test artifact)
2026-11-12 01:03:39 -08:00
Neil cdb5f57625 fix(cloud): binding the GitHub App through OAuth also connects the binder's GitHub identity (commits as you) 2026-11-12 00:59:44 -08:00
Neil ec99d02d1c Merge pull request #504 from nwparker/cloud/entitlements
feat(cloud): ENTITLEMENTS-A plans catalog, entitlement grants and resolver (billing, shadow on dev)
2026-11-12 00:50:48 -08:00
Neil f8beff3dc5 Merge remote-tracking branch 'private/cloud/integration' into cloud/reland-485
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
2026-11-12 00:31:18 -08:00
Neil 8fd67bbd3d Merge remote-tracking branch 'private/cloud/integration' into cloud/n02-reland
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
2026-11-12 00:31:11 -08:00
Neil 3dbb36aa21 feat(cloud): ENTITLEMENTS-B Stripe lifecycle for grants, reconciliation, GET /v1/plans and GET /v1/entitlements
- planForPrice fix: seat prices map through the configured ids, the price history (plan_prices),
  the plan's lookup key, or the plan's Stripe product; a known subscriber on an unmappable price
  still gets status/period/cancel applied, so a price change can never leave a canceled
  subscriber with access (test: lifecycle.test.ts, all modes)
- catalog prices synced from Stripe by lookup key (cron + price.*/product.* webhooks); every seat
  price a subscription is on is kept as history; Checkout sells the lookup-key holder when on and
  refuses (409 plan_unavailable) rather than guess a price
- webhook: one processStripeEvent for webhooks and replay; customer.deleted revokes; the mirror
  upsert ignores older Stripe reads
- reconcile.ts (cron): Stripe event replay from a cursor, rolling re-sync of stale subscriptions
  (404 = canceled), catalog price refresh; grant backfill after it
- GET /v1/plans (public, ETag/304, prices only from Stripe, entitlements, features, policy) and
  GET /v1/entitlements (effective values, access, grants); legacy offers built from the catalog
  when on (identical for the launch catalog, plus warnAtPercent)
- seats and overage read the price history and plan policy (seat bounds, true-down window)
2026-11-12 00:30:39 -08:00
Neil 2d0a817de8 fix(cloud): ENTITLEMENTS-A billing vitest projects inherit the collected include (test-file-runners check) 2026-11-12 00:30:35 -08:00
OrcaWinandOrcaWin dac6392709 test: remove low-value CLI, shortcut, and relay checks (#41452)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 00:26:04 -08:00
Neil cfbcf5409a fix(acceptance): read the Vercel token only from tok.json (token, then bearerToken); drop the personal Vercel CLI auth.json fallback 2026-11-12 00:07:17 -08:00
Neil 347444e0e9 Merge pull request #511 from nwparker/cloud/w6-resume-stuck
fix(cloud): RESUME-STUCK a resume whose client quits mid-wake no longer leaves the workspace stuck resuming
2026-11-11 23:08:07 -08:00
OrcaWinandOrcaWin 0a0f8d5a9f test: remove low-value approval and cloud push suites (#41420)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 23:00:12 -08:00
Neil 60c0565147 fix(cloud): RESUME-STUCK a resume whose client quits mid-wake no longer leaves the workspace stuck resuming 2026-11-11 22:42:54 -08:00
Neil a44f0c39fd Merge remote-tracking branch 'private/cloud/integration' into cloud/w6-terminal-identity
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
2026-11-11 22:21:55 -08:00
Neil e28c042de2 Revert "Merge pull request #502 from nwparker/cloud/revert-485"
This reverts commit 0d53168422, reversing
changes made to e81a96e7ad.
2026-11-11 22:18:34 -08:00
Neil 4ec3b71798 fix(cloud): ENTITLEMENTS-A seat bounds stay plan policy (drop the duplicate max_seats entitlement) 2026-11-11 22:14:49 -08:00
Neil ec8cfe5dac feat(cloud): ENTITLEMENTS-A plans catalog, entitlement grants and resolver in billing D1 (shadow on dev)
- migration 0008: plans, immutable plan_versions, plan_prices (Stripe mirror), entitlement_grants,
  entitlement_audit, entitlement_shadow_diffs, stripe_sync_state; subscriptions.seat_price_id
- catalog/catalog.json (catalog-as-code: Team, Enterprise, Trial; no prices) + scripts/catalog-apply.ts
- typed entitlement registry (entitlement-keys.ts) with sum/max/union/or aggregation
- grants.ts: idempotent projection of each subscription (Stripe mirror) and trial into grants,
  hold/release/revoke, out-of-order guard, terminal revocation, audit; manual/promo grants
- entitlements.ts: one builder fed by legacy terms or grant terms; ENTITLEMENTS_MODE off|shadow|on;
  shadow records every disagreement; lazy re-projection; cron backfill
- trial hours come from the catalog's trial plan when on (granted trials keep their hours)
- the whole suite runs in legacy, shadow (zero diffs enforced) and on modes
2026-11-11 22:11:18 -08:00
Neil e7059d8a0e Revert "Merge pull request #485 from nwparker/cloud/cr-cmd-quiet-zsh"
This reverts commit da67a5ca80, reversing
changes made to 337e3e6929.
2026-11-11 21:57:11 -08:00
Neil a834170b8f feat(cloud): commits and pushes in a plain cloud terminal use the typist's GitHub identity; fallback email on orca.dev
- orcad: a delivered keystroke frame from a paired device records that device as the terminal's driver (the same registry agent prompts use), so the VM git shim's orca-git-as answers for plain terminals too. The device is the transport-attested caller, never the client id. Local windows never record.
- desktop: typing in an Orca Cloud terminal reports "I'm driving" (noteCloudSend, throttled), so the egress honors the typist's GitHub identity. Only xterm user input counts; query replies, focus and mouse reports, replay and resubscribes don't.
- Fallback author email cloud@users.noreply.onorca.dev becomes cloud@users.noreply.orca.dev; existing workspaces on the old default follow on next boot.
2026-11-11 21:45:40 -08:00
Neil 8cffa568f5 chore(links): point private-only website links at orca.dev
Help menu docs/changelog, the telemetry privacy link, the share page's
"Get Orca" link and the MCP server's website URL now use orca.dev. The site
moved there; the old onorca.dev hosts redirect. Service hosts are unchanged.
2026-11-11 20:47:55 -08:00
Neil c1963562d9 fix(cloud): CR-cmd-quiet zsh: keep Orca's staged launch line out of zsh history (VM session env hook) 2026-11-11 19:59:57 -08:00
Neil 4bcf815aa7 fix(cloud): a boot whose member identity install fails records it too (VM git-setup.failed + gitSetup), so Restart can't hide a failure
Boot-time installs were swallowed and the boot cleared gitSetup, so a restart whose install failed again dropped the desktop strip while git still lacked identities. Every boot install now goes through settleMemberGit: failure marks the VM and the row, a later success (or a boot with nobody to install) clears them. The git shim refuses on a failed mark even with nothing pending. Restart is the retry (it re-runs the install before it answers).
2026-11-11 19:29:18 -08:00
Neil 8bb65d69b0 copy(cloud): git shim hold messages per design-squad (orca: prefix, git <cmd>, sidebar > Restart, newline-terminated) 2026-11-11 19:29:18 -08:00
Neil d441463abb perf(cloud): a create answers at ready; member git identities install after it (CREATE-GIT-ASYNC)
POST /v1/sandboxes kept the response open ~2.3 s after orcad was ready while syncMemberGit ran (and again inside boot when the creator had GitHub connected). A create now records the owner device, answers, and installs member identities in ctx.waitUntil. The VM is told the setup is pending (ORCA_GIT_SETUP=pending -> ~/.orca-sandbox/git-setup.pending); its git shim holds commit/push/merge/... up to 15 s until orca-sandbox-members writes git-setup.ready, and on a failed or stalled setup stops them with what to do instead of committing as the workspace identity. Read-only git and fetches never wait: the boot already routes the workspace credential. A failed install is kept on the row (0053 git_setup_failed_at) and shown as sandbox.gitSetup 'failed' to clients sending feature git-setup; any later boot or successful sync clears it. Wake, resume, restart and grants are unchanged (synchronous).
2026-11-11 19:29:18 -08:00
Neil a82468b023 chore(deps): safely update vetted dependencies across workspaces (#41291)
* chore(deps): safely update vetted dependencies across workspaces

* fix(deps): deduplicate rolldown to 1.2.16 for electron-vite tsc parity
2026-11-11 17:58:44 -08:00
Neil 901e40a62b fix(cloud): ARCHIVE-REACH archive, unarchive and delete from this desktop re-read Home's archived count at once (no cached 0 for 5 min); server test: desktop archive is in archived=only 2026-11-11 17:42:21 -08:00
OrcaWinandOrcaWin b9d91d7fa4 test: remove low-value renderer launch and Windows checks (#41305)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 17:22:41 -08:00
Neil a79d836d04 fix(cloud): one definition of an archive snapshot (until its kept-until date, then deleted; no sandbox hours), on every Archive control; /v1/config exposes archiveTtlDays 2026-11-11 14:13:19 -08:00
Neil 33a3cd3b1f refactor(cloud): organize push service by concrete owners (#41261)
* refactor(push): organize provider, delivery, and host authentication owners

* style(push): brace moved fixture guards and cleanup
2026-11-11 14:03:10 -08:00
Neil a7b4937fa0 fix(cloud): N-02 re-land: host keeps a local terminal's depth in the VM; overflow recovery stays at 1000 rows 2026-11-11 13:17:09 -08:00
Neil 6f904ba5c3 copy(cloud): Run on's Orca Cloud subtitle reads "Sandbox · 8 vCPU · 16 GB", not "Hosted sandbox" (JA-25, glossary) 2026-11-11 11:41:22 -08:00
OrcaWinandOrcaWin 8250fc33a8 test: fix relay fence type-only import (#41197)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 09:40:18 -08:00
OrcaWinandOrcaWin 9576e55773 test: remove 1,144 low-value declarations (#41177)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 09:11:06 -08:00
c9ef81809f test: remove 198 low-value test registrations (#41175)
* test: remove 198 low-value test registrations

* ci: fail over unavailable Ubuntu package mirrors (#41174)

* ci: fail over unavailable Ubuntu package mirrors

* fix(ci): recover package retries across headless jobs

* fix(ci): allow complete fallback package index downloads

* fix(ci): recover dpkg locks and bound WebKit setup retries

* fix(ci): run apt deadlines inside sudo sessions

* fix(ci): invoke installed Playwright without root pnpm

* fix(ci): allow large fallback dependency downloads to finish

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-11-11 16:59:03 +00:00
OrcaWinandOrcaWin 5796c30c97 test: remove 161 low-value cases and 12 suites (#41151)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 05:16:06 -08:00
Neil 8a60eb6ef4 relay: skip the edge row read for hosts above the edge leave ceiling (#41150)
* relay: skip the edge row read for hosts above the edge leave ceiling

With the edge on, every assign of a host outside the cohort ran leaveEdge (a
relay_assignments read) and every resolve ran edgeAssignment, on the director's
3-connection pool, ahead of the in-memory lanes. At 1% this saturated the pool at
peak: acquire timeouts and 503s for GCE hosts, and some cell heartbeats.

New optional edge.json flag leaveCeilingPermille: the highest rollout ever applied.
A host above it, the current rollout and the env percent, on no allow or deny list,
cannot have an edge row, so both reads are skipped. Absent: today's behaviour.
The evacuation sweep reports orca_relay_edge_row_above_ceiling if it finds an edge
row above the ceiling (set too low).

* relay: edge leave ceiling: void a ceiling below the rollout; document operating rules; test reads under it
2026-11-11 04:43:40 -08:00
Neil 134fc24436 feat(cloud): boot-time orcad refresh so environment and older-image workspaces get VM fixes (ENV-STALE)
Golden source builds publish their orcad + in-VM CLI as a commit-pinned bundle (R2, uploaded by the build VM over a signed PUT; the Worker computes the stored sha256). On every boot and wake, before orcad starts and inside the existing orcad phase, a sandbox whose /opt/orca/runtime/orcad/SOURCE_COMMIT differs from its region's active golden fetches that bundle from the control plane's own host (already on the egress allowlist) with a 10-minute signed URL, verifies the sha256 the control plane passes in, checks the commit and node runtime, and swaps orcad + orca-cli atomically. Any failure keeps the old orcad and boot continues; every outcome is logged (runtime_refresh: outcome, from, to, ms). RUNTIME_REFRESH=off is the kill switch. Dev R2 bucket orca-sandbox-runtime-dev.
2026-11-11 03:21:01 -08:00
OrcaWinandOrcaWin e5a98cf8a4 test: remove 127 low-value cases and unused observer harness (#41118)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 02:20:10 -08:00
Neil 215564db55 fix(cloud): signed-out Claude message matches the strip and glossary (design-squad) 2026-11-11 02:03:47 -08:00
Neil a206be57ef fix(cloud): a signed-out account answers like the provider, not 403 host_not_proxied (W-106)
Once an Orca account stops applying (revoked after a confirmed 401, expired, removed, turned off, shared, owner changed), requests still carrying the sandbox's account placeholder (shells and agents already running, a Vercel forward that hasn't caught up) now get Anthropic's own 401 authentication_error, saying the Orca sign-in for Claude needs renewing, instead of 403 host_not_proxied or a bare deny. Nothing is swapped on those routes.
2026-11-11 01:43:46 -08:00
OrcaWinandOrcaWin 0db6fe6c44 test: remove 337 low-value test definitions across 13 suites (#41071)
* test: remove 337 low-value test definitions across 13 suites

* test: brace relay assignment fixture conditionals

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 00:15:57 -08:00
Neil c1c1cb387f Merge remote-tracking branch 'private/cloud/integration' into cloud/read-snapshot-signed
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
#	cloud/apps/sandbox-control/image/vm/orca-sandbox-grant
2026-11-11 00:08:43 -08:00
Neil bfc8849b22 fix(cloud): grant sealer records the device only when the script provides the ledger path 2026-11-10 23:21:47 -08:00
Neil 766e0b23b6 Merge remote-tracking branch 'private/cloud/integration' into cloud/read-snapshot-signed
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
#	src/main/ipc/cloud-workspaces.ts
2026-11-10 23:20:55 -08:00