Skip to content

fix(doctor): run health checks for the installed Codex plugin - #129276

Merged
steipete merged 3 commits into
openclaw:mainfrom
Finn763:fix/doctor-codex-external-health-surface
Aug 29, 2026
Merged

steipete merged 3 commits into
openclaw:mainfrom
Finn763:fix/doctor-codex-external-health-surface

Conversation

@Finn763

@Finn763 Finn763 commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #128826

Additional instructions

Allow edits from maintainers remains enabled. This refresh preserves Finn763's original contribution and commit credit.

What Problem This Solves

Fixes an issue where users running openclaw doctor --lint --json or openclaw doctor --only codex/managed-app-server --json would receive MissingPublicSurfaceError before any checks ran when the official Codex plugin was installed separately from core. A working Gateway turn did not imply that doctor could load the plugin's health check.

Why This Change Was Made

Doctor now resolves the canonical selected manifest and loads the public API from that plugin's root. Core intentionally excludes the external Codex plugin from its bundled distribution, so searching only core's bundled directory was the wrong ownership boundary. Registration supplies both current callbacks, getHealthCheck and registerHealthCheck.

Existing owner policy still decides whether Codex checks apply. Only bundled or explicitly trusted official installations can supply this surface, and the selected origin preserves the existing hardlink policy. Missing or broken APIs remain visible errors. There is no bundled-first fallback, catch-and-skip path, or automatic trust grant.

The canonical package scenario now uses its shared setup helper to explicitly accept the documented capabilities before non-interactive onboarding. This acceptance is confined to the test fixture; product consent behavior is unchanged. Real doctor execution assertions are separated from package metadata assertions so fixture-only metadata tests do not require a CLI binary.

User Impact

Operators with the selected trusted external Codex plugin can run ordinary lint and the targeted managed-app-server check. Disabled, missing, untrusted, and non-Codex cases retain their intended behavior. No configuration option, dependency version, release selector, schema, or protocol changes are included.

Evidence

  • The original installed beta.3 reproduction failed before checks for both doctor commands. Focused regression tests failed against the old loader and passed with the selected-root change; coverage includes owner policy, missing/untrusted plugins, hardlinks, current registration callbacks, and non-Codex paths.
  • Clean remote verification passed 103 production-focused tests, the full build, and core/core-test/scripts type lanes. Packaged execution checked the real Codex 0.150.1 launcher and managed native --version invocation, plus negative cases.
  • The complete canonical package/on-demand scenario first failed at explicit capability consent. After the bounded fixture setup repair, clean package run run_3400b5ca4215 completed with exit 0, including the new doctor assertions, 120 focused tests, and the staged changed-files gate. Ordinary lint reached 30 checks (two expected fixture warnings); targeted doctor returned ok: true, checksRun: 1, and no findings. No manual mid-scenario workaround was used.
  • At the earlier UI refresh, the two reviewed commits were mechanically refreshed onto main containing the independently merged UI startup-budget correction fix(ui): restore the Control UI startup JavaScript budget #132124. range-diff and all six changed-file hashes match the previously verified doctor source. The UI repair is not part of this PR's delta. The first refreshed CI run33214281203 failed only because Knip did not know the new shell-launched doctor check was executable. A third commit registers that exact file in the existing executable-root inventory, without suppressing findings. The complete production and full-tree unused-file scans and formatting then passed on clean Blacksmith Testbox (run33215965337). Final corrected-head CI is still required.
  • Direct upstream inspection used Codex tag rust-v0.150.1 (peeled commit 90854393966b21e9ebfd21b122334eb09a20c93d), including codex-cli/bin/codex.js:80 (native launcher selection) and codex-rs/cli/src/main.rs:104 (CLI version declaration).

Production LOC: +24/-7 (net +17); analyzer tooling: +1/-0. Unit tests: +143/-58; E2E support: +42/-3. Production growth carries the canonical selected manifest/root and its trust/origin policy into the existing public-surface loader; the redundant disabled branch is removed. The metadata assertions file has no net change from the reviewed baseline.

ClawSweeper rank-up disposition: exact registry tarball readback verified @openclaw/[email protected] and 2026.9.1-beta.1 both export the public API, but their registration callback contract is older than this candidate. Stable 2026.7.1-1 has no api.js. The exact candidate cohort is unpublished. Matching published-cohort update convergence therefore remains post-publication release proof and is deliberately skipped here; this PR does not publish packages or claim old/new callback compatibility. The complete candidate package scenario above is the relevant pre-merge artifact proof. Full release verification remains separate.

Current main integration

The prior corrected head f511217c24e51cd9dca20b848189f263b04f92cc failed the unrelated Linux QA cleanup gate. That owner defect is now fixed and merged in #132230. This branch is refreshed onto its actual main commit 80944da38fc8049ccafacb86d1860be85ab071ea; the new head is 6c16ea6e3c8bc0ee7ae0fd586fc8f4f3b6f2e308. Finn763's verified coauthor trailer remains in all three commits.

The doctor logic, registration tests and package harness bytes are unchanged. Main's #132166 public-loader repair is preserved: source artifacts use the canonical module loader, while built JavaScript keeps its existing loading path. Clean Linux integration run 33224709816 passed 140 tests across eight owner/sibling files, including the new main source-artifact/import-only/lifecycle regression, plus formatting and script syntax checks. The exact full tracked tree 4ab84f08a368c75a2f26c81cabe15af145693825 matched before/after; canonical dependencies were installed, the command exited 0, and its Testbox was stopped. Fresh isolated complete-PR P0 review found no actionable P0 findings.

This is focused proof of the main integration, not a rerun or relabeling of the complete earlier candidate package proof. Exact refreshed-head CI33224992862 completed successfully, including the required gate. Native landing gates are next. The matching published-cohort limitation above is unchanged.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@Finn763
Finn763 marked this pull request as ready for review August 25, 2026 11:31
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 25, 2026
@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 9:03 PM ET / August 29, 2026, 01:03 UTC.

ClawSweeper review

What this changes

The PR makes Doctor load the Codex health-check API from the configured trusted Codex plugin and adds a packaged Docker check for ordinary and targeted Doctor lint.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep this PR open for normal landing review: the selected trusted-plugin loading boundary addresses the linked Doctor failure, and no introduced correctness defect was found. Exact-head CI is still in progress; direct sibling Codex-source inspection was unavailable in this read-only, offline checkout.

Priority: P1
Reviewed head: 6c16ea6e3c8bc0ee7ae0fd586fc8f4f3b6f2e308

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with supplied packaged behavior proof and no actionable introduced defect; exact-head CI remains the normal landing gate.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The changed production owner is the Doctor registration branch in bundled-health-checks; the supplied clean packaged Docker run invokes the installed CLI after onboarding and reports successful ordinary and targeted Codex Doctor lint with the expected JSON result.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The changed production owner is the Doctor registration branch in bundled-health-checks; the supplied clean packaged Docker run invokes the installed CLI after onboarding and reports successful ordinary and targeted Codex Doctor lint with the expected JSON result.
Evidence reviewed 6 items Doctor entry point and owner boundary: Doctor lint registers extension checks before selecting requested checks; the introduced branch obtains the Codex manifest from the plugin registry, requires a bundled or trusted official owner, and loads api.js from that owner root.
Plugin API contract: The Codex public API accepts both registry callbacks and registers the managed-app-server check using the plugin-root path; the check is documented for installed or updated OpenClaw packages.
Loader trust boundary: The loader resolves within the selected plugin root and retains the bundled-versus-global origin when applying the hardlink policy, so the PR does not add a bundled-first fallback or trust bypass.
Findings None None.
Security None None.

How this fits together

Doctor registers plugin health checks before it evaluates a lint request. A configured Codex runtime now supplies its managed app-server check from the selected plugin installation, which then feeds Doctor’s JSON report.

flowchart LR
A[Codex runtime configuration] --> B[Doctor lint startup]
B --> C[Plugin owner policy]
C --> D[Selected Codex plugin]
D --> E[Public health-check API]
E --> F[Doctor JSON report]
Loading

Before merge

  • Resolve merge risk (P1) - The repair adds 17 net production lines; the selected-root lookup, owner trust rejection, and preserved origin are necessary to avoid inspecting a different plugin or weakening the hardlink boundary, so no smaller net-neutral absorption was evident.
  • Resolve merge risk (P1) - The local reviewer could not perform the repository-required direct sibling Codex source check because ../codex is absent and network access failed; this is a reviewer limitation, not missing contributor proof.
  • Complete next step (P2) - No repair lane is needed: the current branch already contains the focused fix, with exact-head CI as the remaining landing gate.
Agent review details

Security

None.

PR surface

Source +17, Tests +85, Other +40. Total +142 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 2 24 7 +17
Tests 2 143 58 +85
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 43 3 +40
Total 7 210 68 +142

Review metrics

Metric Value Why it matters
Production versus validation LOC production +24/-7 (net +17); tests +143/-58; E2E/analyzer support +43/-3 The production growth is limited to selected-plugin ownership and trust propagation; most added coverage is packaged and unit validation.

Stored data model

Persistent data-model change detected: migration/backfill/repair: config/knip.config.ts, migration/backfill/repair: scripts/e2e/codex-on-demand-docker.sh, migration/backfill/repair: scripts/e2e/lib/codex-on-demand/doctor-checks.mjs, migration/backfill/repair: src/flows/bundled-health-checks.ts, serialized state: scripts/e2e/lib/codex-on-demand/doctor-checks.mjs. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #128826
Summary: This PR is the explicit candidate repair for the external-Codex-plugin Doctor registration failure.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the selected trusted-plugin-root resolution after exact-head CI succeeds; retain the explicit failure for missing or untrusted Codex owners rather than restoring a bundled fallback.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the selected trusted-plugin-root resolution after exact-head CI succeeds; retain the explicit failure for missing or untrusted Codex owners rather than restoring a bundled fallback.

Do we have a high-confidence way to reproduce the issue?

Yes, source and the supplied packaged-run transcript provide a high-confidence path: install the trusted Codex plugin, configure the Codex runtime, and invoke ordinary or targeted Doctor lint.

Is this the best way to solve the issue?

Yes, the selected manifest root is the correct ownership boundary because core excludes the external Codex plugin while the plugin exports the required public health-check API.

AGENTS.md: unclear because the file could not be read completely.

Codex review notes: model internal, reasoning high; reviewed against 204faa53f69c.

Labels

Label justifications:

  • P1: This restores structured Doctor checks used by configured Codex operators and automation.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The changed production owner is the Doctor registration branch in bundled-health-checks; the supplied clean packaged Docker run invokes the installed CLI after onboarding and reports successful ordinary and targeted Codex Doctor lint with the expected JSON result.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed production owner is the Doctor registration branch in bundled-health-checks; the supplied clean packaged Docker run invokes the installed CLI after onboarding and reports successful ordinary and targeted Codex Doctor lint with the expected JSON result.

Evidence

What I checked:

  • Doctor entry point and owner boundary: Doctor lint registers extension checks before selecting requested checks; the introduced branch obtains the Codex manifest from the plugin registry, requires a bundled or trusted official owner, and loads api.js from that owner root. (src/commands/doctor-lint.ts:206, 6c16ea6e3c8b)
  • Plugin API contract: The Codex public API accepts both registry callbacks and registers the managed-app-server check using the plugin-root path; the check is documented for installed or updated OpenClaw packages. (extensions/codex/api.ts:13, 6c16ea6e3c8b)
  • Loader trust boundary: The loader resolves within the selected plugin root and retains the bundled-versus-global origin when applying the hardlink policy, so the PR does not add a bundled-first fallback or trust bypass. (src/plugins/public-surface-loader.ts:132, 6c16ea6e3c8b)
  • Introduced-fix provenance: Blame attributes the selected-root registration and trust check to the PR’s first commit; its message explicitly records the external-plugin Doctor repair and preserved contributor credit. (src/flows/bundled-health-checks.ts:131, e337059614ae)
  • Packaged behavior proof supplied with the PR: The PR body reports a clean packaged Docker run where ordinary lint reached 30 checks and targeted Codex lint returned one clean check; the introduced assertion executes those two installed-CLI commands and validates their JSON results. (scripts/e2e/lib/codex-on-demand/doctor-checks.mjs:4, 6c16ea6e3c8b)
  • Dependency-review limitation: The changed plugin declares @openai/codex as a runtime dependency and the managed check executes its native binary, so the repository policy’s Codex-source gate applies. The required sibling ../codex checkout is absent and network resolution prevented cloning or inspecting the cited upstream files. (extensions/codex/package.json:8, 6c16ea6e3c8b)

Likely related people:

  • steipete: Authored the current selected-plugin resolution commit and recent public-surface loader work. (role: introduced current repair; confidence: high; commits: e337059614ae, cf2ede24f128; files: src/flows/bundled-health-checks.ts, src/plugins/public-surface-loader.ts)
  • xingzhou: The current health-check flow predates this PR and blame attributes its surrounding registration structure to the feature-introducing commit. (role: original feature contributor; confidence: medium; commits: af74c9c0e004; files: src/flows/bundled-health-checks.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (7 earlier review cycles)
  • reviewed 2026-08-25T11:37:28.402Z sha f137657b081fd09d79953febd9c9c991eb2b6948 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-25T12:25:12.408Z sha f137657b081fd09d79953febd9c9c991eb2b6948 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-25T13:54:09.866Z sha af46faf674417a0ea69c52e55a2d542cd2b70316 :: needs changes before merge. :: [P2] Only fall back after direct bundled-surface resolution failure
  • reviewed 2026-08-25T15:19:27.003Z sha b7161b1ed106fcf56b687c71082ff84ed87cc6ca :: needs maintainer review before merge. :: none
  • reviewed 2026-08-26T19:30:31.932Z sha e0a822c :: needs maintainer review before merge. :: none
  • reviewed 2026-08-28T21:58:54.814Z sha e67bc56133aac32f61e5be04c49706fbaa7c41d8 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-28T22:23:58.944Z sha f511217c24e51cd9dca20b848189f263b04f92cc :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 25, 2026
@Finn763

Finn763 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Addressed the needs-changes finding: the fallback now triggers only on direct absence of the bundled codex/api.js surface. loadCodexManagedHealthApi loads through the single-candidate bundled loader, whose contract returns null only when resolution fails outright; a nested MissingPublicSurfaceError raised while loading a resolved bundled artifact now propagates unchanged (no registry lookup, no external load). The broad catch is gone entirely, and the production hunk is net-negative relative to the previous state.

Evidence: new regression re-throws a nested missing-surface error raised by a resolved bundled Codex artifact instead of falling back — RED on the old code (fallback was attempted and the wrong "Unable to resolve Codex doctor health API..." error surfaced), GREEN after the fix (the exact nested error propagates; loadPluginManifestRegistryForPluginRegistry/loadPluginPublicArtifactModuleSync never called). pnpm test src/flows/bundled-health-checks.test.ts 30/30. The protected public-surface-loader.test.ts regression (resolved candidate nested rethrow) still passes; that file has one pre-existing Windows-env baseline failure unrelated to this diff (fails identically with the diff stashed). pnpm tsgo:core green; the affected core-test graph typechecks clean.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 25, 2026
@Finn763

Finn763 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

CI triage — shard failures trace to main's red window (now recovered), not this diff

Completed CI runs don't auto-refresh, so a re-run of the failed jobs against current main should turn these checks green. No product failure is attributable to this PR's changes.

@Finn763

Finn763 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Hi @steipete @vincentkoc — follow-up on my CI triage comment above: main's red window is now closed.

push-to-main CI has been fully green since 12:38Z today:

This PR's head (b7161b1ed106) is unchanged since the failing run; every red check (checks-node-compact-large-3/4/9/10/11/17/29, small-20/22/23/36/45, ci-gate) traces to that window, not this diff. "PR context and evidence" passes on this PR.

As an external contributor I have no write access to rerun failed jobs myself — could you please rerun the failed jobs on this PR? Thanks!

@Finn763
Finn763 force-pushed the fix/doctor-codex-external-health-surface branch from b7161b1 to e0a822c Compare August 26, 2026 19:23
@Finn763

Finn763 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto the latest origin/main (adb3fb2) and force-pushed.

  • New head: e0a822cc767 — clean rebase.
  • Local: bundled-health-checks.test.ts 30/30 pass.

@steipete could you please re-run the failed CI jobs? Thanks!

@steipete steipete self-assigned this Aug 28, 2026
@steipete
steipete marked this pull request as draft August 28, 2026 21:49
@steipete
steipete force-pushed the fix/doctor-codex-external-health-surface branch from e0a822c to e67bc56 Compare August 28, 2026 21:50
@steipete steipete changed the title fix(doctor): doctor --lint/--json abort with MissingPublicSurfaceError for externalised codex plugin fix(doctor): run health checks for the installed Codex plugin Aug 28, 2026
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts docker Docker and sandbox tooling labels Aug 28, 2026
@steipete
steipete marked this pull request as ready for review August 28, 2026 21:50
@steipete

Copy link
Copy Markdown
Contributor

Refreshed the existing contributor branch onto main with both reviewed, credited adaptation commits. The current fix uses the selected trusted plugin root and both registration callbacks; the full canonical package scenario now explicitly accepts fixture capabilities and reaches the real doctor checks. Source patches and all six changed-file hashes match the clean remote proof cohort.

The updated PR body records the published-package rank-up disposition: published beta API exports were read back, but the exact current candidate cohort is unpublished. Matching published-cohort update convergence remains post-publication release proof; no old/new callback compatibility or release-wide green claim is made here. The complete candidate package scenario passed. Fresh isolated Codex P0 review reports no actionable findings. Exact refreshed-head CI is pending and will be required before native landing.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper

clawsweeper Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 28, 2026
@steipete
steipete marked this pull request as draft August 28, 2026 22:17
@steipete
steipete marked this pull request as ready for review August 28, 2026 22:17
@steipete

Copy link
Copy Markdown
Contributor

CI33214281203 exposed one missing analyzer entry: the Docker scenario executes scripts/e2e/lib/codex-on-demand/doctor-checks.mjs by path, but Knip's existing executable-root inventory did not include it. Commit f511217c24e51cd9dca20b848189f263b04f92cc adds that one exact entry. It adds no ignore rule, baseline allowance, dependency override, or product configuration.

The full production and full-tree unused-file scans now both report zero entries, and formatting passes on clean Blacksmith Testbox (run33215965337). Fresh complete-delta isolated Codex P0 review is clean. All six runtime/test files still match the previously passing canonical package proof; contributor credit is preserved. Corrected-head CI and native guard refresh remain required before landing.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Aug 28, 2026
@steipete

Copy link
Copy Markdown
Contributor

The corrected doctor head passes the Knip entry-point gate, but required CI remains red on the unchanged QA process-group lifecycle test. Exact failed job reports kill ESRCH in extensions/qa-lab/src/gateway-child-lifecycle.test.ts:31 during cleanup of the failed-replacement scenario.

The same main test also blocks #132090: its bounded retry failed the final process-group liveness assertion at line 288 after stop() reported confirmed-stopped. These are recorded CI blockers, not successful proof. No gate is being weakened or bypassed, and native preparation/landing will wait for a verified correction and green required CI.

steipete and others added 3 commits August 28, 2026 17:46
Resolve the managed Codex doctor API from the registry-selected bundled or
trusted official install root instead of assuming core bundles the plugin.
Preserve owner policy, hardlink boundaries, and both host registry callbacks;
report missing or broken health surfaces instead of silently dropping checks.

Extend selected-artifact regression coverage and the managed npm onboarding
package scenario to exercise ordinary and targeted doctor lint.

Fixes openclaw#128826
Adapted from openclaw#129276.

Co-authored-by: Finn763 <[email protected]>
Use the shared fixture consent flow before non-interactive onboarding in
Codex's complete package lane. Keep real doctor CLI checks in the Docker
scenario so metadata-only package fixtures remain independently runnable.

Co-authored-by: Finn763 <[email protected]>
The Docker scenario launches this check by path, so declare it in the existing executable-root inventory instead of suppressing unused-file findings.

Co-authored-by: Finn763 <[email protected]>
@steipete
steipete force-pushed the fix/doctor-codex-external-health-surface branch from f511217 to 6c16ea6 Compare August 29, 2026 00:56
@steipete

Copy link
Copy Markdown
Contributor

Exact refreshed head 6c16ea6e3c8bc0ee7ae0fd586fc8f4f3b6f2e308 is green in CI33224992862. Main integration also passed 140 focused owner/sibling tests, including the current source-loader regression, with exact tracked-tree identity. Fresh complete-PR isolated P0 review is clean. The full canonical candidate package proof remains linked in the body; it is not relabeled as a new run.

Both latest ClawSweeper rank-up items are addressed: exact-head CI passed, and I personally inspected the sibling Codex source at rust-v0.150.1, peeled commit 90854393966b21e9ebfd21b122334eb09a20c93d: codex-cli/bin/codex.js:80–117 for native launcher selection and codex-rs/cli/src/main.rs:104 for the version declaration.

The stored-data classification is a false positive for this patch: no SQLite schema, migration, backfill or runtime storage format changes. Knip lists a shell-launched executable; doctor JSON is asserted output; capability acceptance uses the existing documented fixture setup. Product consent, trust and hardlink policies remain unchanged.

The matching published candidate-cohort update proof remains deliberately deferred: the candidate is unpublished, and the inspected published beta callbacks differ. No publication or old/new callback compatibility claim is made. Finn763's verified original credit is preserved. Proceeding through native gates; full release verification remains separate.

@steipete
steipete merged commit ddf5b5a into openclaw:main Aug 29, 2026
264 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 29, 2026
…aw#129276)

* fix(doctor): load Codex health from the selected trusted plugin

Resolve the managed Codex doctor API from the registry-selected bundled or
trusted official install root instead of assuming core bundles the plugin.
Preserve owner policy, hardlink boundaries, and both host registry callbacks;
report missing or broken health surfaces instead of silently dropping checks.

Extend selected-artifact regression coverage and the managed npm onboarding
package scenario to exercise ordinary and targeted doctor lint.

Fixes openclaw#128826
Adapted from openclaw#129276.

Co-authored-by: Finn763 <[email protected]>

* test(e2e): accept Codex capabilities before onboarding

Use the shared fixture consent flow before non-interactive onboarding in
Codex's complete package lane. Keep real doctor CLI checks in the Docker
scenario so metadata-only package fixtures remain independently runnable.

Co-authored-by: Finn763 <[email protected]>

* test(e2e): register the Codex doctor executable with Knip

The Docker scenario launches this check by path, so declare it in the existing executable-root inventory instead of suppressing unused-file findings.

Co-authored-by: Finn763 <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Finn763 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: doctor --lint and --json abort with MissingPublicSurfaceError for externalised codex plugin

2 participants