Repository navigation
fix: allow environment-only agent runs without a native harness - #138449
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: blocked before merge. Reviewed September 4, 2026, 2:02 PM ET / 18:02 UTC. ClawSweeper reviewWhat this changesThe branch lets an implicit unavailable Codex harness preference fall back to OpenClaw’s built-in runtime for environment-only OpenAI agent runs, adds built-distribution live coverage, and documents the behavior. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 1 item remains Keep this maintainer-labelled PR open: current main still rejects the implicit unavailable Codex preference before selection, while the patch restores the selector-owned fallback and preserves explicit-runtime failures. No introduced correctness or security defect was found. Priority: P1 Review scores
Verification
How this fits togetherAgent exec resolves runtime policy, prepares any required plugin harness, then selects the runtime that executes the turn. The selector already owns the implicit Codex-unavailable fallback; this patch prevents preflight from stopping the turn before that decision. flowchart LR
A[Agent exec command] --> B[Runtime policy]
B --> C[Harness plugin preflight]
C --> D{Explicit runtime or pin?}
D -->|Yes| E[Require registered harness]
D -->|No| F[Harness selector]
F --> G[OpenClaw runtime fallback]
E --> H[Agent run]
G --> H
Before merge
Agent review detailsSecurityNone. PR surfaceSource +1, Tests +156, Docs +4, Other +6. Total +167 across 7 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep implicit fallback in the existing selector and retain preflight validation for concrete overrides, pins, and authored model/provider policies; no net-neutral formulation was identified that avoids duplicating runtime normalization. Do we have a high-confidence way to reproduce the issue? Yes. Current main’s preflight throws for the implicit missing Codex runtime, while the existing selector already maps that exact implicit-unavailable state to OpenClaw. Is this the best way to solve the issue? Yes. The patch removes duplicate policy enforcement at preflight so the existing selection owner can apply its established fallback, without adding a CLI-only override. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b6a4d0dad430. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Unmodified main b6a4d0d fails the startup gzip check at 350377 B in Linux CI; a pristine source build measures 350363 B. Record the measured main baseline while retaining the fixed cap and existing growth and variance allowances.
e47c732 to
1445526
Compare
|
Resolved the ClawSweeper review disposition: the +1 production line is accepted because it preserves the explicit-versus-implicit ownership distinction without repeating normalization or weakening configured runtimes/session pins. The review found no correctness or security defect and no simpler net-neutral formulation. No Rank-up moves were listed. The final revision also reconciles an independently reproduced stale Control UI baseline: unmodified main's CI job measured 350377 B, while a pristine-main build measured 350363 B. Fixed cap and existing allowances are retained. The UI budget check and 43 budget-policy tests pass, and independent Codex review remains clean through P2. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
Reuse the canonical startup baseline from #138449, terminal-parent QA acknowledgment from #137342, and handle-scoped reclamation fixture from #138481. Keep the Watch, Rust and Gateway/provider production sources unchanged from the verified 907 native and real-provider checkpoint. The four-file delta has a clean independent review. Source binding retains all 148 native inputs, 10 Rust pins and 3,095 Gateway/auth facts; tests and baseline proof remain source-specific. No required check, timeout or size allowance is disabled. Co-authored-by: Ayaan Zaidi <[email protected]>
…claw#138449) * fix: allow environment-only agent runs without a native harness * chore(ui): reconcile measured main startup baseline Unmodified main eebbf9f fails the startup gzip check at 350377 B in Linux CI; a pristine source build measures 350363 B. Record the measured main baseline while retaining the fixed cap and existing growth and variance allowances.
* feat(watch): add native standalone realtime voice Add opt-in Talk on Watch with provider-direct WebRTC/Opus, scoped Gateway control and explicit call/audio ownership. Preserve phone-mediated voice. Resolve native endpoints consistently across ICE and Network.framework, fence late resolver/media work after cancellation, and release received Opus promptly after packet loss while dropping late speech. Keep recoverable provider notices visible without closing the session; make setup actionable. Source review passes all eleven sections through P3. Native engine RED/GREEN passes eleven final cases; real Watch Simulator resolver classification and held-result cancellation pass fifteen and sixteen cases respectively. Full device/provider/current-base CI verification remains a landing gate. Uses the already-landed app-local companion journal; adds no database schema or protocol-version change. Physical Watch microphone/speaker, background and endurance behavior remains unverified. * fix(watch): use OS entropy for ICE credentials Supply fresh ICE credentials through the native engine's existing owner API instead of relying on the pinned library's non-cryptographic defaults. Fail engine creation closed if operating-system entropy is unavailable. The actual C-ABI regression repeats dependency RNG state: credentials repeat before the repair; all twelve engine cases pass afterward. The existing locked getrandom package owns the platform entropy call; no resolved packages, configuration, database schema, or Gateway protocol are added. * test(qa): follow canonical ClawHub documentation ownership * test(ios): retain websocket frames across receive registration * test(qa): align Watch branch with landed documentation reference * test(ios): include websocket regressions in selected lifecycle suite * fix(watchos): remove unused audio startup result Remove the unused audio-format result through the audio, media-session and controller path. Periphery exposed obsolete fields in a value the sole caller discarded; activation, cancellation and codec policy stay unchanged. Include the separately reviewed Apple fixture synchronization fixes from #138207 while that prerequisite lands. No Gateway runtime, protocol, configuration or persistence changes. * chore(watch): sync landed CI prerequisites Reuse the canonical startup baseline from #138449, terminal-parent QA acknowledgment from #137342, and handle-scoped reclamation fixture from #138481. Keep the Watch, Rust and Gateway/provider production sources unchanged from the verified 907 native and real-provider checkpoint. The four-file delta has a clean independent review. Source binding retains all 148 native inputs, 10 Rust pins and 3,095 Gateway/auth facts; tests and baseline proof remain source-specific. No required check, timeout or size allowance is disabled. Co-authored-by: Ayaan Zaidi <[email protected]> * fix(gateway): compose device reply ownership with watch voice teardown Use the canonical committed-mutation response owner from #138492 for device remove, rotate and revoke, preserving immediate fencing and scoped teardown. Include the separately reviewed #138625 cleanup fix so a retired caller cannot skip removed-device worker reconciliation. Keep setup/bootstrap on their existing retirement helper and retain the Watch HTTP invalidation owner. Validation: 194 owner, Watch and authorization tests passed with zero skips; fresh scoped managed review found no P0-P3 findings. Full changed checks and new published-head native/Gateway live proof remain separate landing gates. * test(watch): isolate platform metadata regressions --------- Co-authored-by: Ayaan Zaidi <[email protected]>
* feat(watch): add native standalone realtime voice Add opt-in Talk on Watch with provider-direct WebRTC/Opus, scoped Gateway control and explicit call/audio ownership. Preserve phone-mediated voice. Resolve native endpoints consistently across ICE and Network.framework, fence late resolver/media work after cancellation, and release received Opus promptly after packet loss while dropping late speech. Keep recoverable provider notices visible without closing the session; make setup actionable. Source review passes all eleven sections through P3. Native engine RED/GREEN passes eleven final cases; real Watch Simulator resolver classification and held-result cancellation pass fifteen and sixteen cases respectively. Full device/provider/current-base CI verification remains a landing gate. Uses the already-landed app-local companion journal; adds no database schema or protocol-version change. Physical Watch microphone/speaker, background and endurance behavior remains unverified. * fix(watch): use OS entropy for ICE credentials Supply fresh ICE credentials through the native engine's existing owner API instead of relying on the pinned library's non-cryptographic defaults. Fail engine creation closed if operating-system entropy is unavailable. The actual C-ABI regression repeats dependency RNG state: credentials repeat before the repair; all twelve engine cases pass afterward. The existing locked getrandom package owns the platform entropy call; no resolved packages, configuration, database schema, or Gateway protocol are added. * test(qa): follow canonical ClawHub documentation ownership * test(ios): retain websocket frames across receive registration * test(qa): align Watch branch with landed documentation reference * test(ios): include websocket regressions in selected lifecycle suite * fix(watchos): remove unused audio startup result Remove the unused audio-format result through the audio, media-session and controller path. Periphery exposed obsolete fields in a value the sole caller discarded; activation, cancellation and codec policy stay unchanged. Include the separately reviewed Apple fixture synchronization fixes from openclaw#138207 while that prerequisite lands. No Gateway runtime, protocol, configuration or persistence changes. * chore(watch): sync landed CI prerequisites Reuse the canonical startup baseline from openclaw#138449, terminal-parent QA acknowledgment from openclaw#137342, and handle-scoped reclamation fixture from openclaw#138481. Keep the Watch, Rust and Gateway/provider production sources unchanged from the verified 907 native and real-provider checkpoint. The four-file delta has a clean independent review. Source binding retains all 148 native inputs, 10 Rust pins and 3,095 Gateway/auth facts; tests and baseline proof remain source-specific. No required check, timeout or size allowance is disabled. Co-authored-by: Ayaan Zaidi <[email protected]> * fix(gateway): compose device reply ownership with watch voice teardown Use the canonical committed-mutation response owner from openclaw#138492 for device remove, rotate and revoke, preserving immediate fencing and scoped teardown. Include the separately reviewed openclaw#138625 cleanup fix so a retired caller cannot skip removed-device worker reconciliation. Keep setup/bootstrap on their existing retirement helper and retain the Watch HTTP invalidation owner. Validation: 194 owner, Watch and authorization tests passed with zero skips; fresh scoped managed review found no P0-P3 findings. Full changed checks and new published-head native/Gateway live proof remain separate landing gates. * test(watch): isolate platform metadata regressions --------- Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes an issue where users running
openclaw agent exec --auth-env-only --model openai/gpt-5.6-solwould fail before inference with an unavailable Codex harness on a fresh configuration. The default runtime preference was treated as an explicit installation requirement before model-specific runtime preparation.Closes #138421.
Why This Change Was Made
Implicit runtime preferences now reach the existing harness selector, which can select the prepared native runtime or use the built-in OpenClaw runtime when the optional harness is unavailable. Explicit runtime configuration, overrides, and session pins still require their selected registration; execution failures never trigger replay in another runtime. This removes a duplicate policy decision from registration preflight instead of adding a CLI-only runtime override.
The regression came from commit 6c9b388 (#117587), authored by Peter Steinberger on 2026-08-01 and committed by GitHub. Its parent-relative patch replaced the absent-owner return with an unconditional prepared-registry error. The behavior is present in stable v2026.9.1.
User Impact
Environment-only OpenAI API-key runs work on clean installations without requiring an optional native harness. Stable/full release verification now includes a real OpenAI Code Mode regression in
native-live-test: a fresh HOME/state/workspace, no authored configuration or runtime override, dependent filesystem calls, and an exact output artifact. A skipped test cannot satisfy that lane's passing-evidence gate.Evidence
agent exec.tbx_01m1pnxg4tzcbzqaq7ah2p2edq: run. The final live regression failed on original base0d2bc80eee0c2bcec52fc01e3727844e4c823759with the unavailable Codex error and passed on the candidate in 6.7 seconds, requiring actual Code Mode engagement, at least two nested calls,DONE, and exact read/write bytes. All 37,539 source entries matched the local candidate fingerprint.codeModeEngaged: falseis distinct from OpenClaw Code Mode.codex-rs/login/src/auth/manager.rs(API-key authentication) andcodex-rs/core/src/tools/code_mode/execute_spec.rs(native Code Mode contract).The first CI run also exposed a pre-existing Control UI startup-budget failure on main. Unmodified main CI measured 350377 B against a stale 350141 B enforcement limit; a pristine-main build measured 350363 B and the candidate 350380 B. The canonical updater reconciles the recorded baseline to 350377 B, retaining the fixed 358400 B cap, 512 B growth allowance, and 64 B variance allowance. The UI check and all 43 budget-policy tests pass. This is the only incidental CI repair; UI product code is unchanged.
ClawSweeper review disposition: accepted the one-line production increase because it expresses the concrete-versus-implicit runtime distinction without duplicating normalization or weakening explicit pins. The review identifies no correctness/security finding and no simpler net-neutral formulation. The original fix remains patch-identical after rebasing onto current main.
Final published revision
1445526171469010ef5ebcf1d7566d19e906660dalso passed the same live OpenAI Code Mode test in 7.0 seconds on a fresh Blacksmith Testbox run, leasetbx_01m1ptp0f4fr6ssem0h5a2qevy. All 37,646 source entries matched the local published revision before execution.