Repository navigation
fix: avoid nesting dedicated Linux workers - #124636
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs changes before merge. Reviewed August 16, 2026, 11:20 AM ET / 15:20 UTC. ClawSweeper reviewWhat this changesUpdates changed-file validation to run suitable trusted checks on detected dedicated Linux workers, adds Merge readiness⛔ Blocked by patch quality or review findings - 5 items remain Keep open: the prior P1 remains on the unchanged head. A ready dedicated worker bypasses the missing-ref prerequisite for release-metadata validation and can run it in a sparse checkout instead of delegating to the hydrated backend. Priority: P2 Review scores
Verification
How this fits togetherChanged-file validation classifies modified paths into check lanes, then chooses whether to run the resulting checks locally or through a hydrated remote backend. This routing feeds maintainer automation and determines whether checkout-dependent validation has the refs and dependencies it needs. flowchart LR
A[Changed paths] --> B[Classify check lanes]
B --> C[Check required refs and dependencies]
C --> D[Classify execution host]
D --> E{Run location}
E --> F[Dedicated Linux worker]
E --> G[Hydrated remote backend]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceTests +54, Docs +50, Other +37. Total +141 across 14 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep direct execution for capable workers, but evaluate missing release-metadata refs before the worker bypass and lock that ordering with a focused regression. Do we have a high-confidence way to reproduce the issue? Yes—source provides a high-confidence path: use a prepared dedicated Linux worker, a release-metadata-only path such as Is this the best way to solve the issue? No—the worker-routing approach is viable, but the existing missing-ref prerequisite must run before the new fast path. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5a0fe2232b46. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
|
Land-ready after review fixes on
LOC: tooling +37/-0, tests +60/-6, policy/docs +120/-70. Removed paths: none; the existing remote fallback remains the canonical path when prerequisites or capabilities are unavailable. Known proof gap: hosts without detectable virtualization need the documented generic override; ambiguity safely remains workstation routing. |
|
Merged via squash.
|
The doctor migration for the retired key kept its "Preserved for remediation" change text and describe; both now state plain removal, with the retired tests updated. peekStoredDeviceIdentityId lost its only production consumer with the deleted banner loader and is removed with its test mock. Also fixes the unrelated no-unnecessary-boolean-literal-compare lint break that #124636 landed on main in scripts/check-changed.mts (truthiness is equivalent for the boolean-or-undefined TTY probe).
…#124667) * refactor(gateway): delete the retired Control UI device-auth migration window The one-time remediation window for the retired gateway.controlUi.dangerouslyDisableDeviceAuth break-glass threaded a pending state machine through the connect pipeline, startup bootstrap, lifecycle, request context, device management, security audit, the hello frame, and a Control UI banner flow — steady-state runtime carrying a retired-shape shim the architecture reserves for doctor. The window is closed: the retired key is now fully inert, doctor still detects and removes it, and a browser that never completed the migration pairs through the normal device flow (one approval, no data loss). Deleted with it: the config-machine-state import of the legacy flag, the hello deviceAuthMigration field (optional; clients validate envelopes only, so older gateways emitting it stay compatible), the migration-bound device management authz states, the requireNoPairingCapableOperator approval mode, the effective-operator pairing event emitter whose only subscriber was the migration completion, and the Control UI banner, loader, overlay wiring, i18n strings, and e2e scenario support. Swift and Kotlin protocol models regenerated. Live-verified on an isolated gateway with the retired key present in config: clean boot with no migration warning, silent CLI pairing and silent local scope widening unaffected, and doctor reporting the key as retired-and-inert. Net -1111 production LOC. * fix(ci): finish migration-window cleanup surfaced by the gates The doctor migration for the retired key kept its "Preserved for remediation" change text and describe; both now state plain removal, with the retired tests updated. peekStoredDeviceIdentityId lost its only production consumer with the deleted banner loader and is removed with its test mock. Also fixes the unrelated no-unnecessary-boolean-literal-compare lint break that #124636 landed on main in scripts/check-changed.mts (truthiness is equivalent for the boolean-or-undefined TTY probe). * fix(ui): drop the retired-key device-auth reader from the security summary Review findings on the migration-window removal: the Control UI security summary still derived its "Device auth" row from the retired dangerouslyDisableDeviceAuth key, rendering device auth as disabled on configurations that merely retain the inert key. Device auth is now unconditionally enforced, so the row and its derivation are removed rather than pinned to a constant. The build-admission test also tracks and removes its temporary device-identity databases after each run.
* fix: avoid nesting dedicated Linux workers * fix: preserve worker routing prerequisites --------- Co-authored-by: Amp <[email protected]>
…openclaw#124667) * refactor(gateway): delete the retired Control UI device-auth migration window The one-time remediation window for the retired gateway.controlUi.dangerouslyDisableDeviceAuth break-glass threaded a pending state machine through the connect pipeline, startup bootstrap, lifecycle, request context, device management, security audit, the hello frame, and a Control UI banner flow — steady-state runtime carrying a retired-shape shim the architecture reserves for doctor. The window is closed: the retired key is now fully inert, doctor still detects and removes it, and a browser that never completed the migration pairs through the normal device flow (one approval, no data loss). Deleted with it: the config-machine-state import of the legacy flag, the hello deviceAuthMigration field (optional; clients validate envelopes only, so older gateways emitting it stay compatible), the migration-bound device management authz states, the requireNoPairingCapableOperator approval mode, the effective-operator pairing event emitter whose only subscriber was the migration completion, and the Control UI banner, loader, overlay wiring, i18n strings, and e2e scenario support. Swift and Kotlin protocol models regenerated. Live-verified on an isolated gateway with the retired key present in config: clean boot with no migration warning, silent CLI pairing and silent local scope widening unaffected, and doctor reporting the key as retired-and-inert. Net -1111 production LOC. * fix(ci): finish migration-window cleanup surfaced by the gates The doctor migration for the retired key kept its "Preserved for remediation" change text and describe; both now state plain removal, with the retired tests updated. peekStoredDeviceIdentityId lost its only production consumer with the deleted banner loader and is removed with its test mock. Also fixes the unrelated no-unnecessary-boolean-literal-compare lint break that openclaw#124636 landed on main in scripts/check-changed.mts (truthiness is equivalent for the boolean-or-undefined TTY probe). * fix(ui): drop the retired-key device-auth reader from the security summary Review findings on the migration-window removal: the Control UI security summary still derived its "Device auth" row from the retired dangerouslyDisableDeviceAuth key, rendering device auth as disabled on configurations that merely retain the inert key. Device auth is now unconditionally enforced, so the row and its derivation are removed rather than pinned to a constant. The build-admission test also tracks and removes its temporary device-identity databases after each run.
What Problem This Solves
Automated changed-file gates running on an already isolated, disposable Linux worker delegated trusted heavy checks to another remote Linux worker. That duplicated the execution environment, added startup latency, and coupled routing assumptions to an interactive-workstation model that does not hold across automation systems.
Why This Change Was Made
The changed-check owner now classifies a dedicated worker from generic host properties: Linux, headless, noninteractive, and virtualized/containerized.
AGENT_HOST_ROLE=workercovers equivalent hosts that cannot be detected, whileAGENT_HOST_ROLE=workstationopts out. Explicit remote requests still win, and proof requiring another OS, device, trust boundary, credentials, desktop/browser capability, or release environment still routes remotely.Direct worker execution requires successful diff classification and a ready dependency install. Missing classification or dependencies preserve the existing hydrated remote fallback.
The repository policy and affected testing/QA skills now use the same source-trust → execution-host → capability decision order. Detection does not depend on a session vendor, agent product, hostname, or provider-specific environment variable.
User Impact
Trusted tests, builds, Docker/package checks, and typecheck/lint fan-out can run directly on an existing capable Linux worker instead of provisioning a redundant one. Developer workstations and capability-specific or clean-room workflows retain their existing remote routing.
Evidence
npx -y node@24 /usr/local/lib/node_modules/pnpm/bin/pnpm.cjs test test/scripts/changed-lanes.test.ts— 152 tests passed.git diff origin/main...HEAD --checkpassed.runs-current-worker.patch is correct(confidence 0.98).LOC: tooling +37/-0 (net +37), tests +60/-6, policy/docs +120/-70. The tooling growth owns the generic host classification and explicit override contract; no product/session-specific detection paths were added.