Repository navigation
feat(worker): add native inference runtime - #163645
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here. Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update. Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it. |
|
Codex review: blocked before merge. Reviewed October 5, 2026, 8:12 PM ET / October 6, 2026, 00:12 UTC (Revision 7). ClawSweeper reviewWhat this changesAdds worker-side model inference with privately supplied credentials, workspace-bound model selection, guarded provider transport, and credential-safe streamed output. Merge readiness⛔ Blocked before merge - 1 item remains This remains useful work beyond the merged protocol foundation. No actionable introduced defect was found, and the earlier migration blocker does not apply to the transient startup contract. Priority: P2 Review scores
Verification
How this fits togetherThe worker runs an admitted agent turn using models and credentials supplied by its node host. Provider results feed the existing agent loop, while transcript and live-event updates return to the Gateway. flowchart TD
A[Node model configuration and credentials] --> B[Private worker startup pipe]
C[Gateway turn admission] --> D[Workspace and model checks]
B --> D
D --> E[Worker provider inference]
E --> F[Stream output guard]
F --> G[Agent loop and Gateway updates]
C --> H[Admission loss cancels inference]
H --> E
Before merge
Agent review detailsSecurityNone. PR surfaceSource +1084, Tests +1717, Other +1. Total +2802 across 33 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep one worker-owned inference path driven by canonical node configuration, with Gateway admission controlling its lifetime and existing Gateway inference preserved for other turns. Do we have a high-confidence way to reproduce the issue? Not applicable to a new capability; the reported fault-injection run and inspected production path provide a concrete validation scenario, but this review did not execute it. Is this the best way to solve the issue? Yes: the runtime reuses the existing AI adapters and worker lifecycle while keeping configuration and credentials with the node owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 14ac51581496. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
|
@clawsweeper review Exact head: |
|
🦞👀 Re-review progress:
|
cf4c0e5 to
89c26a2
Compare
342c075 to
fe04f32
Compare
89c26a2 to
7afde7f
Compare
fe04f32 to
2280543
Compare
7afde7f to
8db748e
Compare
2280543 to
312d263
Compare
8db748e to
86e1097
Compare
087c428 to
e3c787e
Compare
|
@clawsweeper re-review\n\nRebased onto merged #158902 and addressed the accepted authority-loss proof gap plus exact-head stream-boundary findings. Please review head |
|
🦞👀 I queued a lightweight read-only assist pass. It will post a separate answer comment and will not edit the durable ClawSweeper review comment or trigger close, merge, repair, label, or branch changes. Request: review\n\nExact head: |
|
ClawSweeper assist: Head Evidence:
Suggested next action: Request Source: #163645 (comment) |
|
@clawsweeper review\n\nExact head: |
|
ClawSweeper assist: This needs a full correctness review of head Evidence:
Suggested next action: Use Source: #163645 (comment) |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
38b94b7 to
ce9be73
Compare
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
ce9be73 to
09da1e5
Compare
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
* feat(worker): add native inference runtime * refactor(worker): derive inference from node models * fix(worker): harden native inference boundaries
What Problem This Solves
Adds the worker-owned native inference runtime on top of #158902.
models.providersconfiguration.workeras the sole public inference value; there is no compatibility path for the unshippedruntime-localspelling.Stack
Depends on merged #158902. Followed by #163646, #163647, and #158903.
Evidence
pnpm deadcode:fullOPENCLAW_CHECK_CHANGED_SKIP_DEADCODE=1 pnpm check:changedpnpm test src/worker/worker.runtime.test.ts --maxWorkers=1— 85 passed in 68.96spnpm test src/worker/native-runtime.test.ts src/worker/native-inference-startup.test.ts src/worker/native-runtime-transport.test.ts src/worker/native-inference-stream.test.ts --maxWorkers=1— 65 passed in 5.20s before the additional stream regressionspnpm test src/worker/native-inference-stream.test.ts --maxWorkers=1— 40 passedpnpm test test/scripts/eager-import-closure.test.ts --maxWorkers=1— 17 passed in 23.13s