Commit Graph
673 Commits
Author SHA1 Message Date
Neil af554dd1ab feat(cloud): KEK rotation re-wraps stored secrets (SEC-3)
Operator routes GET /v1/internal/secrets/kek and POST /v1/internal/secrets/rewrap
move every envelope-encrypted row (secrets, agent_credentials, github_user_tokens)
from a retired KEK to the active one: idempotent, resumable, conditional writes,
counts-only logs. A v2 row format behind SECRETS_SEAL_FORMAT=v2 (default v1)
keeps the KEK id out of the value layer's AAD so rotation re-wraps data keys
without decrypting values. Adds the KMS design doc.
2026-11-12 19:06:23 -08:00
Neil b16f430738 Merge pull request #589 from nwparker/cloud/w6-iat-backdate
fix(cloud): IAT-BACKDATE-GAP member-change/removal checks allow for auth's 30 s iat backdate
2026-11-12 17:08:32 -08:00
Neil 2f5e89cc35 Merge pull request #585 from nwparker/cloud/w6-vm-scripts-stamp
fix(sandbox-control): never install older VM scripts over a newer golden (VM-SCRIPTS-DOWNGRADE)
2026-11-12 17:04:27 -08:00
Neil 63c4d367ef fix(cloud): IAT-BACKDATE-GAP member-change and removal checks compare the mint time (auth backdates iat 30 s); harness mints like auth 2026-11-12 16:59:25 -08:00
Neil 018d81b096 fix(sandbox-control): never install older VM scripts over a newer golden (VM-SCRIPTS-DOWNGRADE)
The generator now emits VM_SCRIPTS_HASH and a monotonic VM_SCRIPTS_STAMP
(kept while the scripts are unchanged; max(previous + 1, now) on a change).
Provisioning records the stamp in /opt/orca/bin/.scripts-stamp (source
builds use the fetched commit's stamp), installEntryPoints writes the
Worker's, and ensureEntryPoints probes stamp + marker in one command and
skips images whose stamp is newer than the Worker's. Golden refreshes use
ensureEntryPoints too, so a lagging Worker cannot bake older scripts into
a refreshed golden.
2026-11-12 16:52:50 -08:00
Neil 34d86a539a fix(cloud): stale_token on create/secrets/GitHub allows for auth's 30 s iat backdate, so the desktop's one re-mint succeeds 2026-11-12 16:50:53 -08:00
Neil 006676a59b fix(cloud): ORG-TOKEN-STALE Worker backstop: x-orca-org mismatch -> 409 org_mismatch; role-changed token -> 401 stale_token on create, secrets and GitHub 2026-11-12 16:49:00 -08:00
Neil 4f2b3772ca fix(cloud): GitHub not-found on push/fetch says to check the name, or install the App if it's private (design-squad) 2026-11-12 16:14:15 -08:00
Neil cc62955616 test(cloud): resume-stuck waits for the resuming claim instead of a fixed 10 ms (flaked under load) 2026-11-12 16:09:57 -08:00
Neil 3de6f16d82 fix(cloud): VM git lines point to Settings › Account (true with or without billing; design-squad) 2026-11-12 16:05:27 -08:00
Neil 61d31da441 fix(cloud): PUSH-RAW-PROMPT a github.com push, pull or fetch with no credential never prompts; one plain line says what to do 2026-11-12 16:04:07 -08:00
Neil bac96ce153 Merge pull request #534 from nwparker/cloud/entitlements-g
fix(cloud): ENTITLEMENTS-G grants start when the subscription is live (test-clock shadow diff); includes #529
2026-11-12 11:32:36 -08:00
Neil 5a6cceca7d fix(billing): V3-06 Top workspaces names up to 5 live workspaces, then one deleted line, then others; billing sends the top 20 so deleted ones don't crowd out live ones 2026-11-12 11:01:01 -08:00
Neil cbb8c09008 fix(billing): serve the team subscription route from the main dispatcher (it sat inside handleCloudSetup, reached only for /cloud-setup paths) 2026-11-12 06:42:04 -08:00
Neil 49d26b647c cloud: internal routes for deleting a team (TEAM-DELETE)
billing: GET /v1/internal/accounts/:accountId/subscription -> {status, open}
(MEMBERSHIP_SYNC_TOKEN), so auth refuses to delete a team with an open subscription.

sandbox-control (auth's MEMBER_REMOVED_TOKEN, never the operator routes):
- GET /v1/internal/accounts/:accountId/delete-check -> {workspaces}: the team's
  workspaces in any state but destroyed.
- POST /v1/internal/accounts/:accountId/secrets/purge -> {purged}: deletes the
  team's org- and repo-scoped cloud secrets; 409 workspaces_exist while any remain.
2026-11-12 06:42:04 -08:00
Neil 3806afd978 Merge remote-tracking branch 'private/cloud/integration' into cloud/w6-shim-nudge 2026-11-12 06:27:30 -08:00
Neil cd02de307b test(cloud): runtime-bundles test uses a shasum-backed sha256sum (macOS now ships a BSD /sbin/sha256sum without -c --status) 2026-11-12 06:18:33 -08:00
Neil c5683dcbd1 fix(cloud): ENTITLEMENTS-G a live subscription's grants start when Stripe says it is live, not at a period start ahead of our clock
Found by the dev shadow run: Stripe test clocks put current_period_start a month ahead, so the
grant read as not started and the resolver denied (subscription_inactive) where legacy allowed.
starts_at is now min(period start, first sync) and stays stable across syncs.
2026-11-12 04:32:11 -08:00
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 965febdb34 fix(cloud): ENTITLEMENTS-E Enterprise contact and Team supportUrl are https://orca.dev/enterprise (the onorca.dev contact page 404s) 2026-11-12 02:35:22 -08:00
Neil 7c82189bd8 feat(cloud): ENTITLEMENTS-E Team v2 lists the sandbox size and ready-in-seconds; plans carry an optional supportUrl
- catalog: Team v2 (same entitlements and policy as v1, so v1 subscribers see no change) adds the
  sandbox_spec and ready_in_seconds features the desktop already localizes; currentVersion 2
- catalog plans take an optional supportUrl (https: or mailto: only) and GET /v1/plans returns it
  per plan; clients fall back to the Enterprise contact
2026-11-12 02:33:14 -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 0f98742050 feat(cloud): a commit under Orca Cloud's name says once per session how to use your own (Connect your GitHub in Account & billing; design-squad) 2026-11-12 02:02:59 -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