Commit Graph

2 Commits

Author SHA1 Message Date
Peter Steinberger 0b60846fa4 fix(workers): re-arm admission-deadline launches, terminalize dead-worker turns, defer debris cleanup (#130446)
* fix(workers): re-arm admission-deadline launches, terminalize dead-worker turns, defer debris cleanup

Three lifecycle repairs from the 50-worker campaign (#129979): the gateway
launch adapter re-arms a launch up to five times (exponential backoff with
jitter, caller-deadline capped, deterministic derived launch/turn ids so
adapter replays find the same journal rows) when the node journal proves the
child died on the admission deadline — credential/build rejections and
post-start failures stay terminal; stuck-turn recovery records a terminal
failure once a journal-terminal worker has no claim past a 30s cleanup grace
instead of skipping keep_lane forever; and startup recovery defers orphan
git cleanup for terminal placements into the first tracked background sweep
(50-placement fixture: 50 startup git scans to zero, ~556ms to ~5ms) while
pending-result recovery and ownership fences stay ahead of readiness.

* fix(workers): use the diagnosed admission-deadline message after #130435 rebase

WorkerConnection now formats the redacted last-failure diagnosis into the
deadline error itself, so the runtime's re-format (and its
lastConnectionFailure tracking) is redundant; errorText uses error.message.

* fix(workers): cap admission re-arms within the minted credential lifetime

Re-arms reused the credential minted before the first admission attempt,
so with five 120s windows plus backoff the final advertised retry could
start after the credential expiry and fail closed as credential-expired.
The launcher now threads credential.expiresAtMs through the tunnel launch
request, and the adapter re-arms only while the retried child still gets a
full admission window (WORKER_ADMISSION_DEADLINE_MS, now shared from the
connection contract) on the original credential; otherwise it returns the
terminal admission result. Expiry-boundary tests walk both sides.
2026-08-26 17:28:04 -07:00
Peter Steinberger 8a101ed5a5 docs(gateway): add Cloud Sessions overview page (#130301)
* docs(gateway): add Cloud Sessions overview page

Routes readers across paired devices, Crabbox cloud workers, automatic
device load balancing, and idle suspension with warm wakes; slots into
Scaling and operations ahead of Cloud Workers.

* docs(gateway): scope replacement and ranking claims by destination
2026-08-26 12:10:25 -07:00