Repository navigation
fix(workers): skip shared-host quiescence sweeps - #120969
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 9, 2026, 4:47 AM ET / 08:47 UTC. ClawSweeper reviewWhat this changesThis PR records a worker provider’s shared-host isolation fact and uses it to skip uid-wide process freeze sweeps for QA Lab static-SSH workspace reconciliation. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep this PR open: the current head resolves the prior legacy-lease blocker and remains the needed fix for the open shared-host quiescence issue; it now needs normal exact-head CI completion before merge. Priority: P1 Review scores
Verification
How this fits togetherQA Lab worker providers supply SSH lease facts to the gateway, which persists them and starts a tunnel for workspace reconciliation. The tunnel selects dedicated or shared-host quiescence behavior before applying the remote workspace result. flowchart LR
A[Static SSH worker provider] --> B[Worker lease isolation fact]
B --> C[Gateway environment storage]
C --> D[Provider inspection on upgrade]
D --> E{Isolation known?}
E -->|Dedicated| F[Freeze worker UID processes]
E -->|Shared host| G[Skip process sweep]
F --> H[Reconcile workspace result]
G --> H
Before merge
Agent review detailsSecurityNone. PR surfaceSource +102, Tests +146, Docs 0, Generated +1. Total +249 across 23 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the provider-owned isolation fact, upgrade fence, and dedicated-host default, then merge after the exact head has completed required CI. Do we have a high-confidence way to reproduce the issue? Yes—current-main source has the unconditional same-UID sweep, and the PR’s focused owner-boundary tests model the shared-host path and pre-upgrade lease sequence. Is this the best way to solve the issue? Yes—the provider declares its own host-isolation fact, generic gateway lifecycle code persists and reconciles it, and the remote command consumes it without hardcoding static-SSH policy into core. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 29c442d48389. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
333465a to
3e75cb7
Compare
3e75cb7 to
da5cc0d
Compare
… module workspace-sync.ts crossed the 700-line lint budget by one; drop its re-export and point consumers at workspace-sync-helpers directly.
|
Merged via squash.
|
* fix(workers): skip shared-host quiescence sweeps Refs openclaw#120952. * test(workers): update shared-host fixtures Refs openclaw#120952. * fix(workers): reconcile shared-host lease metadata * fix(workers): fence unknown lease isolation * chore(plugin-sdk): refresh API baseline * fix(workers): fence tunnel isolation updates * docs(workers): clarify shared-host final fences * ci: invalidate Vitest cache for state schemas * refactor(workers): import stableWorkerPathComponent from its defining module workspace-sync.ts crossed the 700-line lint budget by one; drop its re-export and point consumers at workspace-sync-helpers directly.
What Problem This Solves
Workspace quiescence froze every process owned by the worker SSH uid. That is correct for dedicated cloud workers, but the QA Lab
static-sshprovider explicitly targets shared development hosts. There the sweep could stop unrelated developer processes and never converge, preventing the cloud turn's workspace result from being applied. This addresses #120952.Why This Change Was Made
Worker leases can now declare
sharedHost: true, and core validates and persists that provider-owned isolation fact through the durable environment record and tunnel workspace actions. Thestatic-sshprovider sets the flag.By workspace reconciliation time the remote worker runtime has already exited, so there is no stable runtime PID whose descendants can be scoped honestly. Shared-host quiescence therefore skips both the initial and renewal freeze sweeps while retaining the watchdog lease, orphan recovery, renewal, resume cleanup, and workspace manifest/finalization fences. Dedicated workers keep the existing uid-wide sweep unchanged.
This tradeoff can miss double-forked strays or late writers. It is accepted only when a provider explicitly declares that the host is shared and not owned by the worker lease; the remote quiescence command logs when it takes this path.
User Impact
Cloud turns using QA Lab
static-sshworkers can reconcile workspace results without freezing unrelated same-uid processes on the development host. Existing worker providers and dedicated hosts retain their current behavior because absent or falsesharedHostvalues use the uid-wide process sweep.Evidence
node scripts/run-vitest.mjs src/gateway/worker-environments/ extensions/qa-lab/src/static-ssh-worker-provider.test.tsnode scripts/run-oxlint.mjs <touched TypeScript files>passed.pnpm plugin-sdk:surface:checkpassed without baseline changes.pnpm plugin-sdk:api:checkpassed.pnpm db:kysely:checkpassed.pnpm docs:listcompleted.pnpm docs:check-mdxpassed for 769 files.oxfmt --checkpassed for all touched files.git diff --checkpassed.