Skip to content

refactor(gateway): deslop worker environments - #165341

Merged
steipete merged 3 commits into
mainfrom
deslop/fd1-worker-hosting-envs-20261004
Oct 5, 2026
Merged

steipete merged 3 commits into
mainfrom
deslop/fd1-worker-hosting-envs-20261004

Conversation

@steipete

@steipete steipete commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Distributed worker hosting carries avoidable callback plumbing, mirrored types, and repeated preparation and cleanup logic across its existing owners.

User Impact

No feature, configuration, persisted schema, wire shape, or tool surface changes. Large converged-deletion recovery avoids per-path threadpool overhead in its existing Git worker. Live placement, epoch, generation, turn-claim, and precommit authority checks remain in place.

Why This Change Was Made

  • Put local workspace archive, restoration, and expiry directly in the existing concrete projection-state owner, removing its callback adapter.
  • Share Stop/Move workspace teardown completion and exact pending-result transition construction.
  • Reuse manifest leaf admission and byte-budget accounting while preserving local and remote capture policies.
  • Bind inference queries and diagnostics to their existing execution/database owners instead of single-use forwarding objects.
  • Derive placement/provider types from their owners and consolidate phase projections, presence matching, and listener notification.
  • Share desktop cleanup, pinned SSH key rendering, worker claim creation, and ordered failed-turn cleanup.
  • Forward environment creation inputs directly and remove a one-use retention write callback.

Production changes: 66,484 → 65,976 lines, net −508 (0.764%). The exact worker-only inventory correction adds three tooling lines, so the complete PR removes 505 net lines. Tests/support remain 117,330 lines, with only six added/six removed helper-reference lines. Replacement files are included in those totals.

This is the final below-threshold batch after reading the complete subtree, including every production file over 200 lines. The proposed larger SSH/node workspace consolidation is already implemented: both transports share the manifest program, local reconciliation, and staged apply owners. Remaining branches preserve distinct local/remote capture policy, transport settlement, and crash recovery. The 1,000-line and 20% targets are not claimed achieved.

Evidence

  • Independent review: no actionable P0–P2 findings; core typechecking passes.
  • Both import-cycle checks report zero on the final candidate.
  • Blacksmith Testbox tbx_01m454wg3a6ncrkts9y8hz0g72: verified source tree b91fa3751efcc51659b91c533b818625a4fc37d8 from candidate 05085ef0ea8daf3b67674b148ee133d085708d65, then ran 88 focused files: 1,294 passed, one existing skip, across two Vitest shards (503.76 seconds). Testbox run.
  • The unchanged 25,001-record recovery test timed out at 30 seconds on the clean base. The repaired candidate passed 21 executions under the same timeout on macOS (311.503 seconds total), then 21 on Linux (11.720 seconds total).
  • A launcher replay hit its 120-second timeout on the overloaded Mac; the same case passed in 7.389 seconds as part of the complete Linux selection. No timeout or assertion was changed.
  • Remote commands: pnpm install --frozen-lockfile; node --import ./scripts/tsx.mjs scripts/check-madge-import-cycles.ts; node --import ./scripts/tsx.mjs scripts/check-import-cycles.ts; node scripts/run-vitest.mjs with the focused selection; and the unchanged large-inventory case with --repeats 20.

The prewarmed Testbox attempts finished before the slow local source freeze completed; the repository caps idle lifetime at 15 minutes. The supported one-shot route prepared source before allocation and completed successfully. AWS fallback was unavailable because of a coordinator failure and the shared fleet lease limit. Initial hosted CI passed all jobs except the database-worker inventory classification and the session-row golden serialization case. Both were attributable to this batch: the extracted transition helper needed its exact worker-only classification, and placement field construction needed the original JSON property order. Independent review passed both corrections. After a replacement Testbox remained queued for more than ten minutes, authorized reduced-priority local proof passed the SQLite ratchet, both zero-cycle checks, and three focused files (18 tests): the inventory ratchet, placement projector, and unchanged golden-row serialization test. Replacement hosted CI is pending on 1a6b4b71cb2d940cdff25ed19ee03dbeb007baba.

Fixes found along the way

The large-inventory regression exposed 75,003 serialized missing-path probes over three recovery preflights. Worker-local synchronous metadata checks preserve every pass and error distinction while removing threadpool round trips. The original test and timeout are unchanged.

Complete size-sorted READ coverage (123 production files over 200 lines)
Baseline LOC Candidate LOC File Coverage and disposition
747 741 placement-turn-authority.ts READ — Only the listener import/notification loop changed to notifyListeners; recovery and validation guards match the pinned baseline.
743 738 provider-lifecycle.ts READ — Removed forwarding adapter and redundant catalog option reconstruction.
738 738 node-worker-tunnel.ts READ — Retained distinct launch/workspace settlement and exact retired-owner stop authority.
737 737 bootstrap.ts READ — Retained shell locking, bounded upload, bundle integrity, replay admission, and recovery ordering.
727 727 worker-turn-rpc.ts READ — Retained credential, placement, and ACK-fence owners; reverted sidecar inlining because it breached the line-cap gate.
725 693 worker-turn-launcher.ts READ — Shared claim creation/local fallback routing while preserving distinct recovery rules.
722 698 prepared-pool.ts READ — Shared option contracts and exact presence matching; retained independent admission and cleanup flows.
721 721 inference.ts READ — Retained admission, reconnect, bounded provider overlap, terminal custody, and uncertain-write fences.
720 307 local-workspace-projection.ts READ — Consolidated state/archive ownership; admission and lease handling stay with the projection owner.
716 699 service.ts READ — Simplified request forwarding; retained distinct admission, timeout, provider settlement, and shutdown lifecycles.
715 715 placement-dispatch-pending-results.ts READ — Retained unaccepted/accepted/missing/staged replay and repository authority distinctions.
709 709 worker-turn-execution.ts READ — Retained preparation, lifetime owners, and post-await execution authority.
699 699 placement-dispatch-startup.ts READ — Retained prepared binding, node eligibility, sync, activation, and shutdown recovery.
688 688 node-launch-adapter.ts READ — Retained rearm, transport retry, cancellation, and deadline lifecycles.
680 668 computer-transport.ts READ — Shared captured desktop-controller lookup while preserving authority and cleanup ordering.
680 680 workspace-quiescence-scripts.ts READ — Retained process identity, watchdog, expiry recovery, Windows, and shared-host branches.
667 667 worker-session-tool-executor.ts READ — Retained durable election, replay, child incarnation, and scoped effects.
665 665 node-workspace-transfer-service.ts READ — Retained upload claims, transfer custody, and cleanup ownership.
663 663 workspace-sync.ts READ — Retained SSH ambiguity, rsync ownership, inbound quota, and late-writer fences.
656 656 environment-access.ts READ — Retained transport selection, policy checks, and post-await live-authority guards.
639 639 session-attachment-service.ts READ — Retained reserved-on-create cleanup, retry, identity, and lease-lifetime guards.
630 630 placement-turn-claims-store.ts READ — Retained worker command adaptation and uncertain-write publication.
628 628 node-worker-workspace-actions.ts READ — Retained distinct repository/local checkpoint publication and custody.
626 621 placement-turn-claim-events.ts READ — Uses canonical claim listener dispatch.
624 624 node-bootstrap-artifact-build.ts READ — Retained identity, archive limits, plugin closure, and prebuilt fallback.
604 604 live-events.ts READ — Retained ordered replay, capacity borrowing, run claims, media revalidation, and acknowledgment settlement.
596 596 provider-intent.ts READ — Reused the existing option type; retained immutable admission, replay, and retention checks.
596 596 workspace-result-finalize.ts READ — Retained distinct execution, result-settlement, and cleanup authority.
587 587 bundle.ts READ — Retained content-addressed archives, pinned package proof, archive validation, and cleanup ownership.
576 576 placement-move-intent.ts READ — Retained persisted normalization, exact compare-and-swap, and additive compatibility.
571 571 placement-dispatch-coordinator.ts READ — Retained claim-wait loans, predecessor tails, and provider foreground/settlement lifetimes.
546 546 workspace-reconcile-recovery.ts READ — Retained authenticated rollback and ambiguous-replacement rejection; an index bag added no sound simplification.
535 508 inference-runtime.ts READ — Removed the single-use usage-diagnostic parameter object, forwarding helper, and mirrored types.
532 532 store-projection.ts READ — Retained native commit receipts, uncertain-write handling, and owner-epoch visibility.
530 530 worker-turn-payload.ts READ — Retained independent replay fitting, token binding, result, and context contracts.
525 525 placement-turn-claims.ts READ — Retained atomic compare-and-swap, result settlement, and teardown waits.
523 523 placement-dispatch.ts READ — Retained admission and distinct failed, reclaimed, and local Stop paths.
519 483 placement-record.ts READ — Derived metadata types from canonical record contracts.
516 516 store.ts READ — Retained canonical worker-store publication, uncertainty, and epoch-fenced projection ownership.
512 512 workspace-sync-scripts.ts READ — Retained standalone shared manifest program and hashing/budget contracts.
499 499 workspace-accepted-remote-script.ts READ — Retained crash phases, namespace commit, permissions, and lock ownership.
498 498 workspace-result-staging.ts READ — Retained candidate, canonical, and cleanup references across distinct crash windows.
496 486 node-workspace-retain-coordinator.ts READ — One pending set now owns inventory and individual-node maintenance.
496 496 provider-owner-lifecycle.ts READ — Internal failure arguments now serve node callers directly; retained owner fencing.
468 468 placement-dispatch-failure.ts READ — Retained immutable terminal cause, abandoned-generation handling, and stale-build fences.
464 464 prepared-environment-store.ts READ — Retained capacity ordering and atomic prepared-environment consumption/attachment.
464 464 workspace-sync-helpers.ts READ — Retained transport validation, diagnostics, and quota settlement.
461 439 workspace-actual-manifest.ts READ — Shared file/symlink admission while preserving scan settlement and descriptor checks.
458 458 session-repository-checkpoints.ts READ — Retained immutable-ref publication, compensation, and independent optional-publication recovery.
439 439 node-enrollment.ts READ — Retained reservation, connection, resume, runtime, and exact setup-identity fences.
432 432 repository-project-admission.ts READ — Retained identity, visibility, REST/GraphQL, and post-await repository fences.
425 424 worker-turn-admission.ts READ — Shared canonical claim creation for worker turns and remote execution.
423 408 placement-reclaim.ts READ — Inlined a single-use teardown-completion closure; retained reclaim authority and settlement.
420 408 placement-turn-claims.worker.ts READ — Derived transition input types from canonical owner contracts.
418 418 placement-dispatch-recovery.ts READ — Retained distinct startup, runtime, and restart authority checks.
418 418 placement-store.ts READ — Retained distinct projection, retirement, and conflict handling.
416 416 credential-broker.ts READ — Retained distinct delivered, undelivered, and claim-bound credential grants.
407 389 project-preparation.ts READ — Shared exact preparation inputs and common seed admission flow.
404 404 placement-row-codec.ts READ — Retained persisted shape validation and activation projections.
401 386 node-desktop-carrier.ts READ — Shared owned-stream/launch stop path; removed single-use error wrapper.
399 399 placement-workspace-result.ts READ — Retained crash custody, replay, and atomic result acceptance.
393 393 inference-control-internal.ts READ — Retained captured identities and drain states protecting reentrant cancellation and accepted work custody.
384 376 desktop-tunnel.ts READ — Removed single-use desktop acquisition hook factory.
379 374 provider-node-provisioning.ts READ — Derived failure contract from teardown owner; retained enrollment/runtime lifetime checks.
375 375 node-worker-repository-preparation.ts READ — Retained clone, seed, prepared binding, and diagnostic contracts.
361 361 placement-move-service.ts READ — Retained restart expiration and source-completion custody.
361 355 workspace-manifest.ts READ — Shared byte-budget checks and removed redundant sorted-path duplicate lookup.
357 357 store-transitions.ts READ — Retained canonical state transitions and credential/owner-epoch mutation fences.
354 354 workspace-manifest-worker.ts READ — Retained off-thread execution, transfer limits, and distinct capture payloads.
351 322 inference-store.kernel.ts READ — Consolidated database/query ownership and removed single-caller forwarding helpers.
343 343 session-placement-lifecycle.ts READ — Retained distinct mutation, retirement, and stop lifecycles.
342 342 transcript-commit.kernel.ts READ — Retained distinct active-prefix/abandoned-DAG recovery and transactional revision checks.
336 319 ssh.ts READ — Consolidated pinned-host-key validation and rendering.
330 327 workspace-inventory-computation.runtime.ts READ — Inlined one-use append closure; preserved bounded parsing, deduplication, budgets, and flush ordering.
318 318 transcript-commit-store.worker.ts READ — Retained sequence-head ownership, exact pending discard, and durable commit receipts.
316 316 transcript-commit.runtime.ts READ — Retained lazy runtime, incognito/native DB binding, redaction, and cleanup-versus-commit errors.
315 315 node-workspace-upload-reader.ts READ — Retained framing, bounds, staging, and abort settlement.
312 312 placement-workspace-journal.ts READ — Retained exact owner checks and crash-safe pack validation.
308 308 node-worker-bundle-installer.ts READ — Retained per-caller authority, shared progress, and retry lifecycles.
307 294 placement-projector.ts READ — Shared canonical phase projections while preserving exact serialized property order.
306 283 workspace-accepted-sync.ts READ — Shared normalized command outcome handling.
305 305 workspace-mutation-lock-remote-script.ts READ — Retained inode compare-and-swap, receiver-group liveness, and stale reclaim authority.
302 302 store.kernel.ts READ — Retained canonical intent, enrollment, credential delivery, and lease-bound mutation ownership.
302 302 workspace-sync-inventory.ts READ — Retained streamed subprocess output, cancellation, and error settlement.
299 299 worker-turn-media.ts READ — Retained current/replay failure distinction, staging budgets, and canonical projection.
298 298 workspace-reconcile-apply.ts READ — Retained preflight, journal, mutation, publication, and acceptance ordering.
297 297 placement-session-tool-operations.kernel.ts READ — Retained idempotency, capacity, authority, and child settlement.
292 292 service-contract.ts READ — Retained canonical request-facing and leaf dispatch contracts; leaf separation prevents a runtime import cycle.
289 289 skill-resource-transfer.ts READ — Retained bounded transport, directory identity, cleanup authority, and catalog projection.
280 283 prepared-pool-presence.ts READ — Shared exact demand matching across supersession, eligibility, and pruning.
278 278 placement-worker-gate.ts READ — Retained recovery refresh, worker incarnation, and acknowledgment fences.
278 278 workspace-result-inventory.runtime.ts READ — Retained singleton/batch diagnostics and September v1/v2 persisted-reference recovery.
272 272 local-workspace-template.ts READ — Retained source immutability, dependency containment, fallback, and clone custody.
269 269 tunnel-contract.ts READ — Retained canonical workspace, turn, and reconciliation transport contracts.
268 268 store-row-codec.ts READ — Retained persisted-row decoding and canonical environment/credential fact projection.
268 268 worker-gateway-tool-runtime.ts READ — Retained issued IDs, operation ordering, cancellation, and replay contracts.
264 264 worker-turn-prompt.ts READ — Retained canonical core-context composition and prompt ownership.
262 262 project-setup-script.ts READ — Retained completion witnesses, stable paths, setup process settlement, and command budgets.
252 252 artifact-transfer-http.ts READ — Retained range handling, revocation checks, and descriptor cleanup.
252 252 node-workspace-transfer-http.ts READ — Retained distinct compression, pack, and verified-blob guard timing.
251 249 portal-node-carrier.ts READ — AbortSignal now owns portal closure instead of duplicate terminal state.
246 246 worker-turn-run-owner.ts READ — Retained diagnostics, cancellation, and forced settlement.
243 243 placement-session-tool-operations.ts READ — Retained subscribe-before-clear ordering and canonical admission.
243 243 worker-turn-attachments.ts READ — Retained inode/checksum identity, transfer budgets, and precommit fences.
243 243 workspace-hash-memo.ts READ — Retained placement-scoped lifecycle and standalone serialized-source contract.
242 242 session-attachment-store.ts READ — Retained identity/generation checks and atomic attachment reservation, closure, and environment cancellation.
239 239 repository-workspace-mutation.ts READ — Retained exact session/placement admission and durable mutation recovery custody.
238 238 workspace-reconcile-fs.ts READ — Retained distinct empty-directory, symlink, residue, and outage predicates.
236 236 service-validation.ts READ — Retained service-boundary validation and admission checks.
235 235 artifact-transfer-service.ts READ — Retained attempt identity, exclusivity, and artifact serving budget.
233 233 computer-service.ts READ — Retained distinct claim, socket, environment, and shutdown custody.
232 232 placement-transitions.worker.ts READ — Retained distinct atomic compare-and-swap transitions.
232 234 workspace-reconcile-preflight.ts READ — Uses lstatSync with throwIfNoEntry:false in the existing Git worker to avoid serialized missing-path async probes; preserves per-pass checks and deletion convergence.
230 230 admission.ts READ — Retained live credential, current dialect, session, and owner-epoch admission fences.
227 227 worker-session-tool-source.ts READ — Retained hooks, access, and current-authority checks.
218 218 node-worker-workspace-fallback.ts READ — Retained eligibility, seed optimization, and HTTPS fallback.
211 211 placement-disk-space.ts READ — Retained bounded probes, byte parsing, and owner-scoped cache.
210 210 store-validation.ts READ — Retained external/persisted input normalization and credential/bootstrap validation.
209 0 local-workspace-archive.ts READ — Deleted; archive staging, restoration, and expiry moved into the existing concrete projection state owner.
207 204 store.worker.ts READ — Removed single-use retention write callback; existing transaction DB now feeds the retention owner directly.
204 204 workspace-reconcile-core.ts READ — Retained canonical acceptance/fencing; additional verifier abstraction did not yield a sound simplification.
203 203 workspace-git-base.ts READ — Retained plain, unborn, bare, linked-repository, and thin-pack donor-fallback contracts.
202 202 store-mutations.ts READ — Retained canonical credential mutation and attached-session reconciliation boundaries.

Additional changes in smaller production modules

placement-pending-failure.ts and placement-teardown.ts share terminal completion/compare-and-swap construction; provider-runtime-refresh.ts derives its callback type; terminal-environment-retention.ts accepts the existing transaction database directly; tunnel-ssh-runner.ts carries one terminal fact; and worker-turn-failure.ts shares ordered cleanup while retaining authority checks before every operation. These modules are included in the production totals even though they are below the mandatory coverage-table size.

The node-worker-abort.ts substitution was reverted because the generic abort race changed synchronous abort precedence. RPC type-sidecar inlining was reverted to satisfy the existing line-cap gate. The final placement-turn-authority.ts diff contains only the listener-notification import/call; its recovery and validation guards match the pinned baseline.

Focused performance repair evidence

The unchanged 25,001-deletion test timed out at 30 seconds on the clean PR baseline. The repair replaces 75,003 serialized asynchronous missing-path probes across three passes with synchronous nonthrowing lstat calls inside the existing Git worker; it does not cache filesystem facts across passes. The candidate passed 21 executions (--repeats 20), totaling 311,503 ms (about 14.83 seconds per execution). Assertions and the timeout were unchanged. The final candidate also passed 21 executions on Linux in 11,720 ms total; the full focused selection, core typecheck, review, and both import-cycle checks passed as recorded above. The replacement hosted CI state is recorded in Evidence above.

Consolidate workspace archive state, teardown completion, manifest admission, inference query ownership, and repeated provider and transport plumbing. Preserve existing worker surfaces, persisted shapes, live-authority fences, and recovery ordering.
Keep every recovery preflight while checking already-absent paths synchronously inside the existing Git worker. The unchanged 25,001-record recovery test timed out on the clean base and passes 21 candidate executions under its existing timeout. Restore the turn-claim authority helper to its original scope after integration.
@clawsweeper

clawsweeper Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 1a6b4b71cb2d940cdff25ed19ee03dbeb007baba
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/worker-environments/placement-turn-authority.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@steipete
steipete enabled auto-merge (squash) October 5, 2026 04:45
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 5, 2026
@clawsweeper

clawsweeper Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 5, 2026, 1:22 AM ET / 05:22 UTC (Revision 2).

ClawSweeper review

What this changes

The PR consolidates Gateway worker workspace, placement, inference, and transport plumbing and speeds recovery of already-deleted workspace files.

Merge readiness

✅ Ready for maintainer review

Keep open: the work remains distinct from current main, and no actionable introduced defect was found. The verified repository-admin author also excludes automatic closure.

Priority: P2
Reviewed head: 1a6b4b71cb2d940cdff25ed19ee03dbeb007baba

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, coherent refactor with no supported blocking defect; validation claims remain distinguished from independently observed execution.
Proof confidence 🌊 off-meta tidepool Not applicable: The verified repository-admin author is exempt from ordinary contributor runtime proof. Reported tests exercise workspace recovery and placement owners, but are supplemental validation; the diff does not materially change authority or stored-data contracts.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The verified repository-admin author is exempt from ordinary contributor runtime proof. Reported tests exercise workspace recovery and placement owners, but are supplemental validation; the diff does not materially change authority or stored-data contracts.
Evidence reviewed 8 items Introduced patch reviewed: Reviewed all 43 introduced file patches from the pinned merge base to the exact original head, separately from base-branch drift. The checkout remained clean.
Still useful on current main: Current main still performs awaited filesystem probes for each absent deletion. The PR replaces those probes with synchronous metadata checks inside the existing worker, preserving missing-path error handling and independent preflight passes.
Latest release comparison: The latest supplied release also retains the asynchronous absent-deletion probes; this performance change is not already represented by that release.
Findings None None.
Security None None.

How this fits together

Gateway worker environments place session work on remote machines and reconcile completed workspace changes back to OpenClaw. Their lifecycle owners coordinate preparation, execution, recovery, and cleanup.

flowchart TD
  A[Session turn] --> B[Placement admission]
  B --> C[Worker environment]
  C --> D[Workspace results]
  D --> E[Reconciliation and recovery]
  E --> F[Accepted workspace]
  E --> G[Teardown and cleanup]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -508, Tests 0, Other +3. Total -505 across 43 files.

View PR surface stats
Area Files Added Removed Net
Source 39 1213 1721 -508
Tests 3 6 6 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 5 2 +3
Total 43 1224 1729 -505

Review metrics

None.

Technical review

Best possible solution:

Keep the consolidated lifecycle owners while preserving exact workspace custody, serialized placement output, and live-authority checks.

Do we have a high-confidence way to reproduce the issue?

Not applicable to the refactor itself. The reported recovery timeout was not independently reproduced in this read-only review.

Is this the best way to solve the issue?

Yes: consolidating existing owners removes forwarding plumbing while preserving the inspected contracts, and the metadata optimization remains inside the existing worker boundary.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 49fc679f9f68.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The bounded worker-lifecycle improvement includes recovery performance work without evidence of an urgent user-facing outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The verified repository-admin author is exempt from ordinary contributor runtime proof. Reported tests exercise workspace recovery and placement owners, but are supplemental validation; the diff does not materially change authority or stored-data contracts.

Evidence

What I checked:

  • Introduced patch reviewed: Reviewed all 43 introduced file patches from the pinned merge base to the exact original head, separately from base-branch drift. The checkout remained clean. (1a6b4b71cb2d)
  • Still useful on current main: Current main still performs awaited filesystem probes for each absent deletion. The PR replaces those probes with synchronous metadata checks inside the existing worker, preserving missing-path error handling and independent preflight passes. (src/gateway/worker-environments/workspace-reconcile-preflight.ts:131, 49fc679f9f68)
  • Latest release comparison: The latest supplied release also retains the asynchronous absent-deletion probes; this performance change is not already represented by that release. (src/gateway/worker-environments/workspace-reconcile-preflight.ts:133, fc23bc864e45)
  • Authority and security boundary: The authority-file patch only replaces an exception-isolated listener loop with the existing equivalent dispatcher. Workspace ownership checks, claim checks, transition compare-and-swap conditions, SSH key validation, and cleanup ordering remain intact; no material authorization expansion was identified. (src/gateway/worker-environments/placement-turn-authority.ts:100, 1a6b4b71cb2d)
  • Re-review corrections: The previous completed review retained no findings. GitHub's exact prior-head comparison shows the latest commit changes only worker inventory classification and placement projection property order. Local comparison could not read an older blob, so the read-only GitHub comparison supplied that evidence. (src/gateway/worker-environments/placement-projector.ts:277, 1a6b4b71cb2d)
  • Complete captured body and validation scope: Read the full live body and verified its SHA-256 matches captured source 3b678a12cc137a47aeb0ba1ff77000cb98b95060636086e10e720cd24b4847b6. It reports 1,294 focused passes on the previous candidate, repeated recovery checks, and 18 focused tests after the latest corrections. These are reported validation, not tests executed by this review. The linked Testbox workflow is cancelled overall, so its aggregate conclusion does not independently verify those reported passes. (05085ef0ea8d)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RomneyDa: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-05T04:48:54.306Z sha 05085ef :: needs maintainer review before merge. :: none

@steipete
steipete disabled auto-merge October 5, 2026 05:14
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Oct 5, 2026
@steipete
steipete enabled auto-merge (squash) October 5, 2026 05:17
@steipete
steipete merged commit ee122ba into main Oct 5, 2026
142 checks passed
@steipete
steipete deleted the deslop/fd1-worker-hosting-envs-20261004 branch October 5, 2026 05:25
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 6, 2026
Simplify distributed worker workspace, teardown, inference, placement, provider, and transport internals while preserving public surfaces, persisted formats, and live authority. Remove 508 net worker-environment production lines (505 net across the PR including the exact worker-inventory update); retain all existing assertions.

Use worker-local synchronous metadata checks for already-converged deletions, preserving all recovery passes. Validate with core typechecking, zero import cycles, independent review, 1,294 focused Linux tests, and 21 unchanged large-inventory regression executions on each of macOS and Linux.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts security-sensitive-changed size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant