Repository navigation
fix(codex): candidate checks reject a mismatched app-server - #124137
fuller-stack-dev merged 19 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 16, 2026, 11:18 AM ET / 15:18 UTC. ClawSweeper reviewWhat this changesThis PR adds an opt-in Codex Doctor check that verifies the selected managed app-server binary and pinned version, plus a macOS Bash compatibility repair for PR-operation completion locks. Merge readinessKeep open for maintainer review: this adds a public, default-disabled deployment preflight and the required direct Codex source-contract check could not be performed because the sibling checkout is unavailable in this read-only environment. Priority: P2 Review scores
Verification
How this fits togetherThe Codex plugin selects an app-server command per agent route; the Doctor subsystem registers plugin checks and reports candidate readiness before a deployment cutover. The PR follows the route selector, resolves the managed package artifact, and returns an error finding on a missing or mismatched binary. flowchart LR
Config[Agent configuration] --> Runtime[Effective runtime selection]
Runtime --> Codex[Codex agent route]
Codex --> Command[Final app-server command]
Command --> Owner[Desktop or package ownership]
Owner --> Probe[Native version probe]
Probe --> Doctor[Doctor readiness result]
Decision needed
Why: It adds an operator-visible Doctor check and substantial production surface rather than repairing an existing runtime path alone; the current review environment also cannot satisfy the mandatory Codex source gate. Before merge
Agent review detailsSecurityNone. PR surfaceSource +264, Tests +391, Docs +27, Other +4. Total +686 across 10 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain a plugin-owned, explicitly invoked preflight only if maintainers sponsor the surface and independently verify the Codex native-version contract; no net-neutral implementation can expose this distinct readiness capability. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: the PR adds a focused mixed-runtime regression and the owner path is explicit, though this read-only environment did not execute it. Is this the best way to solve the issue? Unclear. Reusing the canonical runtime selector and final command resolver is the right shape, but the Codex launcher/version contract remains unverified by this reviewer. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3e0634f7ed94. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
256daf2 to
e9291a5
Compare
|
Addressed the desktop-first compatibility finding at exact head The check now classifies ownership from the actually resolved command. A recognized macOS desktop-app command is non-blocking; if desktop-first resolution falls back to the staged package, the package native binary still receives exact-pin validation. Focused regressions cover both branches, and the affected suites pass 32/32. Extension types, lint/format, and all Knip export scans are green. Fresh autoreview/TruffleHog is clean. Direct Codex-source gate: OpenAI Codex tag |
e9291a5 to
e9a7b27
Compare
e9a7b27 to
a795c94
Compare
|
Resolved the refreshed ClawSweeper P1 at exact head The doctor check now applies the same final per-agent selector as the live app-server spawn before resolving the managed command. It evaluates every configured agent and skips the package pin only when every selected command is desktop-owned; a mixed desktop/package configuration still validates the package artifact. Exact proof:
The direct sibling Codex inspection remains as recorded above; the only head movement since that evidence is this finding-specific selector repair plus unrelated canonical-base movement. |
…x-managed-preflight-20260815
…7-prep # Conflicts: # src/flows/bundled-health-checks.test.ts # src/flows/bundled-health-checks.ts
|
Resolved the remaining ClawSweeper moves at exact head
Production is +255/-4, tests +360/-4, and docs +27. The growth is the new plugin-owned preflight capability; it reuses the canonical selector and managed-binary resolver, adds no config/default surface, and keeps core provider-agnostic. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Exact head On macOS system Bash 3.2, the new lock owner failed before every native command because Proof:
This is +9/-5 operational tooling lines; lock policy, recovery rules, config, and product defaults are unchanged. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Addressed the exact-head mixed-runtime finding in Red/green proof: the new mixed desktop-Codex plus explicit OpenClaw-runtime regression failed on the prior head with a false |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Latest exact-head ClawSweeper review read; all remaining pre-merge items are resolved:
No rank-up move is skipped and no actionable finding remains. |
|
Merged via squash.
|
…#124137) * fix(codex): validate managed app-server candidates * docs(codex): document managed binary preflight * test(codex): review managed preflight execution * docs(codex): document managed app-server check * fix(pr): support macOS system Bash operation locks * fix(codex): scope managed preflight to Codex agents
What Problem This Solves
Fixes an issue where deployment managers could validate a candidate OpenClaw gateway without discovering that its managed Codex app-server binary was missing or the wrong version. Gateway readiness does not start Codex, so the first Codex turn after cutover could fail even though preflight passed.
Why This Change Was Made
OpenClaw now exposes a named, default-disabled
codex/managed-app-serverdoctor check when effective agent configuration selects the Codex runtime. The Codex-owned check resolves the actual managed binary, executes that native artifact directly with--version, and requires the exact plugin-pinned version. Explicit custom commands and non-stdio transports remain operator-owned and are not executed by preflight. A selected macOS desktop-app command remains app-owned and non-blocking; a package fallback selected from desktop-first mode is still validated.This is intentionally separate from #124124, which already landed the canonical loader-root fix that makes managed turns select the owning plugin package. This PR provides the read-only validation contract that a deployment manager can invoke before transactional cutover; it does not implement deployment sequencing.
User Impact
Operators and deployment managers can run:
openclaw doctor --lint --only codex/managed-app-server --jsonagainst a staged Codex-selected candidate and fail before cutover when the managed package app-server cannot be resolved, executed, or matched to OpenClaw's pinned version. Non-Codex configurations do not advertise the check, custom/non-stdio runtimes are not executed, supported desktop-owned routing remains compatible, and ordinary doctor behavior is unchanged.
Evidence
9a175aab: a Codex-selected configuration did not register the named check.e9291a5f512: 32 focused tests pass across the Codex check, bundled health selection, owner-root resolver, custom-command/non-stdio controls, non-Codex selection, plugin policy, desktop-owned selection, and desktop-first package fallback.{"ok":true,"checksRun":1,"checksSkipped":55,"findings":[]}. The copied configuration SHA-256 remained45733b0838102864a8fb227e20dd5f708a365350eba79a18f0aee5eef51e947a, and a clean state directory remained empty.agentRuntime.id = codexand preserves explicitmodel_context_window=1000000,model_auto_compact_token_limit=700000, andmodel_auto_compact_token_limit_scope=totalarguments exactly.checksRun: 0).rust-v0.147.0(be6e8eac029b183056b7e4402879f15d2c85f61b) confirms the npm launcher resolves/spawns the native binary with original arguments, the native CLI exposes Clapversion, and the workspace version is0.147.0.Production LOC: +236/-4 (net +232). The new capability requires a plugin-owned health check, one canonical resolved-command ownership predicate, and the existing lightweight bundled-public-artifact registration boundary; no shared generic process policy or deployment behavior was added. Tests: +264/-1.
AI-assisted: yes. I reviewed the root cause, Codex source contract, owner boundaries, generated diff, and validation output.