Repository navigation
refactor(workers): separate runner consent from capacity - #124356
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
b722a7a to
b16dca4
Compare
|
Codex review: needs changes before merge. Reviewed August 16, 2026, 7:46 AM ET / 11:46 UTC. ClawSweeper reviewWhat this changesThe PR separates paired-node worker-host consent from available/full launch capacity, moves bundle-prewarm metadata into that declaration, and removes node-local build scanning. Merge readiness⛔ Blocked by patch quality or review findings - 4 items remain Keep open: the v3 inventory cutover leaves an independently upgraded node host unable to give an actionable recovery when its Gateway still accepts only v2 inventory. Priority: P1 Review scores
Verification
How this fits togetherPaired node hosts publish runner inventory to the Gateway, which selects hosts and installs Gateway-managed worker bundles before launching sessions. The inventory must distinguish consent, new-launch capacity, and the continued status/cancellation access needed by existing work. flowchart LR
A[Node host configuration] --> B[Runner inventory update]
B --> C[Gateway inventory validation]
C --> D[Host selection]
D --> E[Bundle installation]
E --> F[Worker launch or status]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource -201, Tests -212, Docs +1. Total -412 across 37 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep v3-only execution authority, but convert an older Gateway's v3 rejection into a clear update-Gateway-and-reconnect outcome instead of silently retaining a rejected inventory publication. Do we have a high-confidence way to reproduce the issue? Yes. A node built from this branch connected to the current v2 Gateway sends v3-only inventory, which the current parser rejects; the node-host publication loop then treats that as a rejected optional update. Is this the best way to solve the issue? No. The consent/capacity split is a sound direction, but deleting the mixed-version behavior without an explicit old-Gateway recovery makes the sequential-upgrade path opaque. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ee4bd4aa4737. 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)
|
e7bfa35 to
fb775bf
Compare
df2638d to
039c3a1
Compare
|
Merged via squash.
|
…4356) * refactor(workers): separate runner inventory state * docs(runners): track inventory cleanup * test(workers): use bundle-only launch wire * test(workers): update optional inventory fixture * test(workers): validate prewarm inventory capability * fix(workers): version runner inventory cutover
Related: #124037
AI-assisted maintainer work for milestone 7 of the runner plan.
What Problem This Solves
The paired-device runner inventory still overloaded one optional local-build object with three unrelated meanings: node-local consent, transient launch capacity, and executable build identity. Node hosts also scanned and hashed their local OpenClaw installation at startup even though #124037 made the installed Gateway bundle receipt the sole worker execution authority.
Why This Change Was Made
This deletes the obsolete local package scanner and removes the connect-time build claim from runtime authority. The current private runner inventory now declares node-local hosting consent and
available/fullcapacity as a closed state, while the shipped v1 connect/inventory envelope remains validation-only so older nodes receive the existing update-and-reconnect path without regaining authority.Status and cancellation proofs remain usable while a host is full; only new launches require
availablecapacity. No public protocol-version bump, config key, environment variable, SQLite schema-version change, or compatibility execution fallback is added.User Impact
Opted-in node hosts no longer perform a full local package scan at startup. Capacity transitions are explicit instead of being inferred from the presence or absence of a build object, which leaves the next installed-version and bundle-retention slices with one clear owner: the validated Gateway bundle receipt.
Evidence
pnpm docs:listpassed.-192lines; the removed scanner accounts for 141 lines, and its now-unused source-identity staging path is also deleted.Proof gap: Blacksmith was unavailable, while Daytona and AWS started raw boxes without hydrated workspace dependencies. Repository-approved trusted-source local fallback passed; this is not represented as remote proof.