Commit Graph
219 Commits
Author SHA1 Message Date
OrcaWinandOrcaWin e748732cad test: remove redundant relay workflows and shutdown probe (#42142)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-13 13:49:08 -08:00
OrcaWinandOrcaWin b22328d476 test: remove low-value cell and host-session coverage (#42140)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-13 13:40:50 -08:00
OrcaWinandOrcaWin dd9f8e3994 test: remove low-value relay coverage and stale fixtures (#42139)
* test: remove redundant rehome cases and backend replays

* test: remove redundant credential and diagnostic coverage

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-13 13:28:36 -08:00
OrcaWinandOrcaWin 21c946621c test: remove low-value task recordings and assignment checks (#42135)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-13 13:09:32 -08:00
OrcaWinandOrcaWin a850101549 test: remove low-value relay and contract test coverage (#42053)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-13 07:32:26 -08:00
OrcaWinandOrcaWin 0cdffd823f test: remove low-value credential and database cases (#42049)
* test: remove low-value credential and database cases

* test: brace the simplified lost-reply proxy condition

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-13 07:16:53 -08:00
OrcaWinandOrcaWin cd4a4a9fb1 test: remove low-value connection and lease cases (#42047)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-13 06:55:09 -08:00
OrcaWinandOrcaWin 29778c785b test: remove low-value reservation and seat suites (#42042)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-13 06:42:07 -08:00
OrcaWinandOrcaWin e7aebd873c test: remove low-value regional rehome and simulation suites (#42037)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-13 06:19:41 -08:00
OrcaWinandOrcaWin b18029ef48 test: remove low-value relay startup and JWKS checks (#42034)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-13 06:02:00 -08:00
OrcaWinandOrcaWin 41c301bb6a test: remove low-value cloud tests and unused support (#42029)
* test: remove low-value push and relay coverage

* test: delete orphaned fixture and closure support

* test: trim runner and mobile recording matrices

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-13 05:57:41 -08:00
OrcaWinandOrcaWin ac019ef8df test: remove low-value relay assignment coverage (#42031)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-13 05:53:13 -08:00
OrcaWinandOrcaWin b5619045e2 test: remove low-value relay suites and probes (#42017)
* test: remove relay diagnostic and marker suites

* test: remove timing-based migration probes

* test: remove reserve plumbing and migration work counters

* test: remove admission estimator and rehome work probes

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-13 05:03:06 -08:00
Neil d634063ef2 refactor: organize mobile cloud relay by lifecycle owner (#41681) 2026-11-12 14:36:07 -08:00
OrcaWinandOrcaWin 895cd026c0 test: remove low-value fixture, relay, and recovery cases (#41591)
* test: remove low-value fixture suites and custom scenarios

* test: prune relay and recovery matrices and refresh retained host journey

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-12 08:32:10 -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 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
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
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
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 3d9be7c269 relay: an edge fence refused as a same-epoch conflict goes once more one epoch above (#40946)
At 1% the edge answered fences 'conflict': it holds the fence's own epoch for another placement
(a move onto the edge whose push landed though the director counted it failed, then a placement
elsewhere minted the same epoch). Retries go to the host's current row at that same epoch, so they
kept failing until the host moved again; meanwhile the edge object claims the host and its phones
get HOST_OFFLINE instead of re-resolving. No later move can produce a same-epoch conflict (it would
answer stale), so the fence now goes once more one epoch above, which lands; a later move onto the
edge re-mints above it. Stale answers are never bumped.
2026-11-10 16:58:38 -08:00
Neil bda5b082db relay: the edge evacuation sweep leaves region scope to the assign path (#40898)
The assign path judges edge cohort membership with the region the desktop asks for; the sweep used
the stored region preference, which can miss or lag it. A host whose two disagreed was placed on the
edge, drained by the sweep, and placed back on its next ask: at 1% this drained 12 of ~31 moved
hosts within 10 minutes, and each director would repeat it every cooldown. The sweep now ignores
region scope (it still drains hosts that left the cohort by mode, deny or share); a host that asks
for a region outside the scope leaves on that ask.
2026-11-10 15:01:40 -08:00
OrcaWinandOrcaWin 88aa9fa82a test: remove 154 low-value tests and redundant relay checkpoints (#39814)
* test: remove 155 low-value tests and two relay checkpoints

* test: retain schema drift protection and remove dead imports

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-08 03:06:41 -08:00
Neil 5df115db15 fix(relay): runtime edge control on the director, safer skipped exports, faster evacuation (#39773)
- Directors with an edge read director/edge.json from the relay-control bucket through the shared
  flag channel: mode on/off/down and rolloutPermille (0..1000). Boot defaults are mode on and the
  env percent; every cohort decision reads the applied flags. Off empties the cohort and hosts
  leave normally; down also skips the export at once (reason mode_down). The permille bucket keeps
  every host of P percent in at P x 10 permille. A control change re-arms the evacuation sweep
  within 5 s.
- A skipped export (120 s outage clock or mode down) removes the host's relay_devices rows before
  placing it, so revokes made on the edge are never undone; logs a count only.
- Evacuation: 100 drains per tick with 10 in flight, each pass starting at a random point of the
  keys and wrapping around; pages stay 500 rows and an idle pass reads each edge row once.
- Fence retries: 56 attempts (last about 25.5 h after the failure), 50 per sweep with 10 in
  flight; fence_abandoned now carries outcome, cell and epoch like fence_failed.
2026-11-07 23:38:33 -08:00
Neil d5ef05a973 relay: edge fence failures (stale/conflict) recorded and retried from the evacuation sweep; cap pushes under row lock at 8 in flight (2 s); jti on edge admin tokens (#39740) 2026-11-07 22:53:05 -08:00
Neil 340c917429 relay: edge export skip on outage, cohort-exit drain sweep, region-scoped account allow (#39707)
* relay: edge export skip on sustained outage, evacuation drain sweep, account allow scoped by region

- Leaving hosts skip the edge export once it has been unavailable for 120 s
  (ORCA_RELAY_EDGE_EXPORT_SKIP_AFTER_MS), keeping Postgres devices and
  fencing best effort, instead of 503ing until the edge is back.
- Directors drain edge hosts that left the cohort (POST /__admin/drain,
  20 per jittered 60 s tick) so connected desktops re-ask and move off.
- Account-allowlisted hosts must also be in the edge regions.
- Tests for the invite-socket edge branch.

* relay: export skip needs continuous failures; evacuation sweep runs soon after start, then every 10 min

Failures more than 30 s apart restart the unavailable clock, so one old failure cannot skip an
export. The sweep reads the edge rows (cell_id has no index): first pass 45-75 s after start (a
cohort change is a new revision), every 45-75 s while hosts are queued, else every 7.5-12.5 min.
2026-11-07 20:09:41 -08:00
Neil 568567f7ad relay: director edge cohort for the relay edge (dark by default) (#39362)
* feat(relay): director edge override for moving hosts to the relay edge (dark by default)

Directors with ORCA_RELAY_EDGE_CELL_URL seed an existing-only 'edge' cell (registered
with the admission selector so deploy workflows carry it) and answer a host cohort
(hash bucket, allow/deny lists, region scope) on the edge before the reserve and
database lanes. The epoch rises only on a cell change; a host still holding units on
its old cell is told to retry. Phone resolve and the invite move answer edge rows
without moving anything; old cells answer WRONG_CELL to phones of moved hosts.
Unset URL keeps today's behaviour.

* feat(relay): director pushes host data to the relay edge on a move and takes it back before any move away

With ORCA_RELAY_EDGE_ADMIN_SIGNING_KEY set (its own key, never the assignment lease key), a move
onto the edge pushes the host's relay_devices and a location hint under the row lock and commits
only after the edge accepts; an edge holding a newer epoch is re-minted above once. Before any
lane may re-place an edge row, the director exports (refused while the desktop is connected; the
edge freezes the host), replaces the host's Postgres devices, places it as today, then fences the
edge with the new cell and epoch. Idle regional rehome skips edge rows. Unset key: unchanged.

* fix(relay): a deferred edge move keeps the host on today's path instead of a 503 loop

A host still holding old-cell units (a pairing invite holds one for its 10 min TTL) or whose push
the edge did not take now stays where it is and moves on a later ask. 503 stays for a held row
lock and for a desktop still connected to the edge on the way out.

* relay: director refuses an edge URL without the edge admin key

The deployed edge keeps host data in its objects; without the key the director could
not push it and hosts would land on an edge holding none of their devices.

* relay: edge cohort by account (ORCA_RELAY_EDGE_ALLOW_USERS)

Every host of a listed account (relay token sub) joins the edge cohort, in any region;
a denied host still stays off. For the team's own accounts before any share rollout.

* relay: edge modules follow main's relay module moves

* relay: satisfy the changed-lines lint gate in the edge cohort code

Braces on every if, T[] arrays, type aliases, one ternary, and a justified max-lines header on
edge-relay.ts. No behaviour change: relay unit 845 passed.

* relay: move edge cohort config and row helpers to edge-relay-cohort.ts

Keeps edge-relay.ts under the 300-line limit without a max-lines disable. Code moved verbatim;
edge-relay.ts re-exports what other modules import. Relay unit 845 passed.
2026-11-07 18:40:06 -08:00
OrcaWinandOrcaWin bd9483483c test: remove 395 low-value tests (#39568)
* test: remove 396 low-value tests

* test: remove 395 low-value tests

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 11:20:25 -08:00
OrcaWinandOrcaWin ff416c2f6c test: remove 181 low-value mobile, CI and runtime tests (#39351)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-06 23:39:35 -08:00
AdolaniumandNeil d2e4402623 fix(relay): authorize reserve routes before reading request bodies (#36346)
* fix(relay): bound internal reserve request bodies

* fix(relay): authorize before reading reserve bodies

Hono reads a chunked body inside the body limit before next(). A caller who fails the director check can no longer stall the refusal, and an oversized body from that caller is not reported as 413.

* test(relay): cover an unavailable demote body

The missing-route check only posted to /internal/reserve. Demote now gets the same oversized request and must stay 404.

---------

Co-authored-by: Neil <neil@stably.ai>
2026-11-06 16:24:06 -08:00
OrcaWinandOrcaWin d7069dbaa9 test: remove 125 low-value relay and build-script tests (#38692)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-05 14:38:47 -08:00
OrcaWinandOrcaWin 73e9124399 test: remove 92 low-value relay tests (#38685)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-05 14:23:15 -08:00
OrcaWinandOrcaWin 9af8f63538 test: remove 79 low-value cloud, hook and search tests (#38642)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-05 11:58:24 -08:00
OrcaWinandOrcaWin 7c1fd62f37 test: remove low-value relay SQL and lifecycle test inventories (#38580)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-05 07:30:50 -08:00
OrcaWinandOrcaWin 4fee14f89b test: remove low-value host control and connection test inventories (#38578)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-05 07:12:53 -08:00
OrcaWinandOrcaWin 167cb81e60 test: remove low-value cell test inventories and duplicate suites (#38577)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-05 07:05:26 -08:00
OrcaWinandOrcaWin afe06c366a test: remove low-value relay test inventories and mocked worker suite (#38572)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-05 06:42:22 -08:00
OrcaWinandOrcaWin dd4db9351c test: remove low-value relay admission simulations and guard examples (#38568)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-05 06:22:51 -08:00
OrcaWinandOrcaWin 4d0d42c854 test: remove paced relay load benchmarks and trivial guard examples (#38562)
* test: remove paced relay load benchmarks and trivial guard examples

* test: add required braces to relay fixture cleanup

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-05 06:06:56 -08:00
Neil 46fa97a6b4 refactor(relay): group route, forwarding and connection owners (#38374)
* refactor(relay): group route, forwarding and connection owners

* refactor(relay): use explicit defining-owner type imports
2026-11-04 21:59:50 -08:00
OrcaWinandOrcaWin e1edc018f2 test: remove 228 low-value test declarations (#38004)
* test: remove 228 low-value test declarations

* test: brace retained phone fixture branch

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-03 17:59:29 -08:00
OrcaWinandOrcaWin 249faa46c3 test: remove 145 low-value tests and nine suites (#37982)
* test: remove 145 low-value test declarations

* test: clean up remaining type-only relay imports

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-03 16:59:13 -08:00
OrcaWinandOrcaWin f22231dc29 test: remove 28 low-value test declarations (#37972)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-03 16:01:49 -08:00
Kelvin Amoaba 904e5c05d6 fix(relay): admit reassigned combined hosts (#37687)
* fix(relay): admit reassigned combined hosts

Keep epoch-one bootstrap only when no durable assignment exists.

Fixes #37679

* chore(relay): brace admission conditionals
2026-11-03 18:00:24 +00:00
OrcaWin e95b0ca056 test: remove 58 low-value test declarations (#37853) 2026-11-03 08:53:10 -08:00
Neil d3f7d64431 test(relay): send the repeated SIGTERM only after shutdown has started (#37636) 2026-11-02 19:51:40 -08:00