Repository navigation
fix(doctor): run health checks for the installed Codex plugin - #129276
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 9:03 PM ET / August 29, 2026, 01:03 UTC. ClawSweeper reviewWhat this changesThe 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 provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep 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 Review scores
Verification
How this fits togetherDoctor 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]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +17, Tests +85, Other +40. Total +142 across 7 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
|
@clawsweeper re-review Addressed the needs-changes finding: the fallback now triggers only on direct absence of the bundled codex/api.js surface. Evidence: new regression |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
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. |
|
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 ( 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! |
b7161b1 to
e0a822c
Compare
e0a822c to
e67bc56
Compare
|
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 |
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
CI33214281203 exposed one missing analyzer entry: the Docker scenario executes 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. |
|
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 The same main test also blocks #132090: its bounded retry failed the final process-group liveness assertion at line 288 after |
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]>
f511217 to
6c16ea6
Compare
|
Exact refreshed head Both latest ClawSweeper rank-up items are addressed: exact-head CI passed, and I personally inspected the sibling Codex source at 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. |
|
Merged via squash.
|
…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]>
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 --jsonoropenclaw doctor --only codex/managed-app-server --jsonwould receiveMissingPublicSurfaceErrorbefore 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,
getHealthCheckandregisterHealthCheck.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
--versioninvocation, plus negative cases.ok: true,checksRun: 1, and no findings. No manual mid-scenario workaround was used.range-diffand 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.rust-v0.150.1(peeled commit90854393966b21e9ebfd21b122334eb09a20c93d), includingcodex-cli/bin/codex.js:80(native launcher selection) andcodex-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]and2026.9.1-beta.1both export the public API, but their registration callback contract is older than this candidate. Stable2026.7.1-1has noapi.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
f511217c24e51cd9dca20b848189f263b04f92ccfailed the unrelated Linux QA cleanup gate. That owner defect is now fixed and merged in #132230. This branch is refreshed onto its actual main commit80944da38fc8049ccafacb86d1860be85ab071ea; the new head is6c16ea6e3c8bc0ee7ae0fd586fc8f4f3b6f2e308. 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
4ab84f08a368c75a2f26c81cabe15af145693825matched 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.