Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0da91fd0d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| state.active = state.inert; | ||
| state.pendingRegistrations.length = 0; |
There was a problem hiding this comment.
Reinitialize retained native hosts after retiring their policy
After a producer like the new fixture initializes both module graphs, a following file that consumes only the retained native openclaw/plugin-sdk/llm graph gets an inert host. Native src/llm/stream.ts retains its already-resolved ensureTransportRuntimeHost promise, and native configureAiTransportRuntimeHost() retains configured = true, so calling sdk.complete() does not reinstall the cleared policy. Later shared-worker SDK tests consequently lose guarded fetch, sentinel resolution, and plugin transport hooks; buildGuardedModelFetch instead falls back to globalThis.fetch. The new observer does not cover this case because it explicitly imports the transformed runtime host before invoking the retained SDK. Ensure native-only consumers can reinstall fresh policy after retirement and cover that sequence.
Useful? React with 👍 / 👎.
|
Codex review: needs maintainer review before merge. What this changesThis PR retires file-owned transport policy after test cleanup and reinstalls it before retained consumers prepare or invoke requests. Example: A retained native SDK prepares an OpenAI completion with chat_template_kwargs.enable_thinking=false after the preceding test file finishes.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a concrete shared-worker isolation defect. Both earlier code findings and the reported conflict are resolved; no new actionable defect was found, and current-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherOpenClaw installs application transport policy into the shared AI package host; SDK and agent consumers use that policy to prepare provider requests, while the non-isolated test runner owns retirement between files. flowchart TD
A[Test file cleanup] --> B[Retire active policy and installation]
B --> C[Retained SDK or agent consumer]
C --> D[Existing transport installer]
D --> E[Shared AI host]
E --> F[Prepared provider request]
Technical reviewBest possible solution: Keep the existing shared host and installers, retire file-owned policy after cleanup, and reinstall it at the actual preparation and invocation boundaries. Do we have a high-confidence way to reproduce the issue? Current-main source retains process-wide policy across file retirement, and the supplied ordered regression records the resulting failures and Node/Bun correction; this read-only review ran no target code. Is this the best way to solve the issue? The patch repairs the existing lifecycle owner, preserves shared identity and asynchronous scope, and replaces import-only initialization at the affected consumer boundaries without adding a competing policy path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against aa4d490a848b. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +15, Tests +144, Other -2. Total +157 across 17 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed November 16, 2026, 1:48 PM ET / 18:48 UTC (Revision 5). |
|
Addressed the sole open item from the review of c0da91f:
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fecba79474
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| async function ensureTransportRuntimeHost(): Promise<void> { | ||
| const runtime = await loadTransportRuntimeHost(); | ||
| runInDetachedAsyncContext(runtime.configureAiTransportRuntimeHost); |
There was a problem hiding this comment.
Reinstall native policy before preparing completion transports
After a shared-worker file initializes the native SDK graph and the runner retires its policy, a native openclaw/plugin-sdk/simple-completion-runtime consumer can still prepare its request before reaching this reinstallation. completePreparedModel() only awaits the cached runtime-host import (src/agents/simple-completion-execution.ts:95) before calling prepareModelForSimpleCompletion(). That preparation reads the now-inert host, skipping provider stream resolution and wrapSimpleCompletionStream, including configured extra_body and chat_template_kwargs. Reinstalling later in completeSimple() cannot repair the already-selected transport. The new per-call installer fixes the previously reported raw llm.complete() sequence, but the added regression does not exercise this earlier preparation boundary. Invoke the installer before native completion preparation as well and cover that cross-file flow.
AGENTS.md reference: AGENTS.md:L55-L55
Useful? React with 👍 / 👎.
|
The follow-up fixture correction preserves the real AI package exports while overriding only the probe completion runtime (fixture). The obsolete mock-baseline row was removed by the canonical prune operation. Both unchanged probe cases now pass under Node and pinned Bun; the original collection failure also reproduced on exact main parent
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
The extended existing native continuation regression checks the actual configured wire payload. On published @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Baseline-Refresh: e735c08cf493f40c248297209c344b80fbae01f1
The previous two code findings remain resolved. The scoped integration review is clean through P2; affected owner proof passes 54 Node 24.22.1 cases and 40 pinned Bun 1.4.4 cases. The current-base changed check completed in 802.58 seconds: 37 of 38 gates passed, with only the dead-export scan failing. Three production findings belong to #200183; eight additional findings trace to main’s @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…law#200101) * fix: isolate transport policy between shared-worker test files * fix: reinstall retired transport policy for native consumers * test(agents): preserve real transport exports in model probes * fix: restore transport policy before native request preparation * fix(agents): reinstall transport policy in extracted session streams
What Problem This Solves
Fixes order-dependent CI failures when transport policy from a completed test file remains active in the next file.
User Impact
Tests get their intended provider policy. Retained native SDK calls reinstall guarded transport and configured request preparation after test-file retirement. No configuration, schema, or public SDK changes are required.
Why This Change Was Made
#199956 correctly shared transport state across native and transformed modules, but the shared runner did not retire file-owned callbacks. This change retires policy in place after cleanup while preserving shared identity, asynchronous scope, and accepted-work custody. Base and runtime installation share the existing installation record; actual core-owned selection, preparation, and invocation boundaries call that installer after retirement. Explicit active overrides survive, and package-only consumers retain inert defaults until a real installer runs.
Captured current main
4a0e45492moved session streaming intosessions/session-stream.ts. The integration preserves that extraction and its admitted-caller assertions, and relocates the already reviewed installer invocation into the new owner. Peer diagnostics isolation and mock-baseline pruning are preserved.Production grows by 15 lines: nine for shared installation lifecycle and six for the actual consumer boundaries that prepare or invoke requests. The probe test now preserves the real AI namespace while overriding only its runtime factory. Three unit fixtures explicitly retain their existing provider-bootstrap isolation, and canonical pruning removes obsolete mock-baseline entries.
Evidence
92316c744because the real wire payload omits chat_template_kwargs; all three cases pass with the correction under Node and pinned Bun.472cd0a2, and one to feat(ui): redesign tool-call rendering, grouping, and lifecycle narration #198133. The exact main parent4a0e45492reproduces the identical 12 production and 107 full-tree diagnostics in hourly CI 43918534788 and a separate canonical parent scan, with zero set differences. The failed local invocation remains recorded as exit 1; these real main regressions are separately owned, and a later CI parent requires its own qualification.The unchanged warm prepared-completion driver compared published
92316c744with the pre-integration correction6f4e8546under pinned Node 24.22.1: three A1/B/A2 rounds each for timing and sampled allocation, 200 measured calls per process after 100 warmups. All request counts and 380,706-byte payloads matched. Baseline/candidate medians were 3.488/3.288 ms thread CPU and 2,191,258/2,189,050 sampled bytes per call. CPU paired changes were −15.8%, +36.4%, and −5.2%, with A/A variation of −14.7% to +16.5%; high observed host load and the outlier prevent a speedup or confident no-regression claim. Allocation differences were within A/A variation. This measures the prepared-completion owner, not DB/workspace scale or all six consumers.Final-head CI 43931486839 on
101d7ce315completed with 42 successful jobs, 28 skipped, and two failed jobs: the ClawRouter shard and its aggregate gate. Both original ClawRouter cases reproduce on the actual tested main parentec025eba2under Node 24.22.1 and pinned Bun 1.4.4. #200063 introduced the missed auth-profile fixture migration; #200183 owns its qualified repair. This is an attributed inherited-failure landing, not a green CI result. ClawSweeper reviewed the exact final head with zero findings and zero unchecked items.