Skip to content

fix(qa): preserve Doctor health discovery in packaged fixtures - #134944

Merged
steipete merged 3 commits into
mainfrom
codex/qa-mcp-doctor-bootstrap
Sep 1, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/qa-mcp-doctor-bootstrap

Conversation

@steipete

@steipete steipete commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem and repair

Packaged release-verification fixtures failed before reaching their session, node, or real model/tool checks. Their environment disabled bundled artifact discovery even though Doctor needs the plugins' public health APIs. Preserve discovery and use the existing plugin activation configuration for isolation. The custom-plugin control-plane case retains its exact allowlist/load path and disables the memory slot explicitly.

The QA command harness also preferred stderr over stdout on failure, hiding the updater's structured failure behind Doctor's stderr panels. Join both streams before the existing redactor and 2,048-character bound. Successful stdout, process ownership, shutdown, and exit handling remain unchanged.

Live verification then exposed two obsolete assumptions in the MCP fixture. Its manually built configuration disabled the Codex plugin needed by the default official OpenAI route. Use the canonical live-frontier setup with that owner enabled and no authored transport override. Assert the completed agent response identifies the executed Codex runtime. Configured Gateway MCP is owned natively by Codex and appears in persisted history as gatewayLive.parity_probe; the node tool remains the dynamic nodeLive_parity_probe. The prompt and history assertion now match those exact owner contracts. Both real tool calls, their markers/results, and the exact final response are still required. Missing-call diagnostics include bounded synthetic history.

This is a QA harness/fixture repair. No production loader, readiness, model routing, tool transport, retry, timeout, configuration surface, or storage change is introduced. No release publication is included.

Proof

  • The original packaged fixture failed with a missing memory-core/doctor-health-api.js public surface despite the built artifact existing. Removing only discovery suppression passed bootstrap with runtime plugins still disabled and children cleaned up.
  • The mixed-stream real-child regression failed before the repair. The repaired command/redaction/output suites passed 107 tests, with one existing macOS platform skip; they verify both streams, secret redaction, the size bound, and cleanup.
  • Exact published head dcb142a passed its native Linux changed-scope gate and build, then all 12 deterministic cases across eight files with zero skips. This includes the optional provider timing proof. These unchanged sibling-case results are retained, not relabeled as a new full-release run.
  • Its first native live attempt failed before model execution because Codex registration was disabled. After fixing the owner setup, a real Codex turn completed but the old Gateway tool-name assertion failed. Both failures are retained; neither was a passing live proof.
  • Final native Linux proof passed: one real live case, zero skips, on a wrapper-materialized snapshot of the reviewed working tree over dcb142a. Node 24.19.0, build 48.3 seconds, live phase 64.2 seconds (case 34.5 seconds). It asserts actual Codex execution, both completed MCP calls/results, and the exact final token. All source hashes remained unchanged, no owned processes remained, and the lease was stopped. Redacted receipts are retained. This is source-bound working-tree proof, not an assertion that the old public head passed or a full-release certificate.
  • Independent managed reviews passed for the initial five-file repair, the combined eleven-file change, and the final live-fixture change, with no accepted findings. The final review includes the native MCP naming and transcript contracts. Direct upstream Codex source checked: codex-rs/app-server-protocol/src/protocol/v2/item.rs (MCP server/tool fields and conversion), dynamic-tool handling, and API-key login/storage owners.

The original PR CI failed only the unrelated cold-source Doctor readiness fixture. That repair has since landed in #134812 (113805d6): its Node 24.19 hosted shard passed all 11 Doctor process cases and 310 total tests, with runtime preparation before workers. This PR is refreshed over main fd6bb229 at head 197e6ec9. All eleven reviewed QA file hashes are unchanged. Main also changed startup, auth, session lookup, retry ownership, and dependencies, so final-head validation rebuilt and ran the live MCP case, session scope continuity, and quiet-provider timeout recovery. All passed on exact 197e6ec9: build 42.0 seconds; two deterministic cases, zero skips (580.1-second phase, including the unchanged 405-second provider hold); real Codex MCP case, zero skips (70.1-second phase). All 36,070 tracked blobs/modes and the refreshed lock matched, source remained unchanged, no owned processes remained, and the test lease was stopped. Exact-head CI 33490154830 passed 129 jobs with 16 skips; required gate 99801910773 succeeded.

Production delta: +1/-1, net zero. Test delta: +87/-77, net +10. Removed the redundant discovery suppression, the stderr-only failure selection, and the live fixture's handcrafted provider/model configuration. Existing deterministic/session/recovery/transport contracts and original live deadlines remain intact.

ClawSweeper's refreshed review on exact 197e6ec9 found no introduced correctness/security defects. Its before-merge and rank-up requests are now satisfied by the successful exact-head CI and focused integration proof above. Redacted proof receipts are retained. Related: #134824.

@clawsweeper

clawsweeper Bot commented Sep 1, 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 added P2 Normal backlog priority with limited blast radius. 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. labels Sep 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 5:17 AM ET / 09:17 UTC.

ClawSweeper review

What this changes

The branch preserves packaged-fixture health discovery, retains both output streams in redacted child-command failures, and updates a live Codex MCP fixture to assert canonical runtime and tool-history names.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

No introduced correctness or security defect was found. This PR remains open because its exact-head check and focused post-refresh integrations are still in progress.

Priority: P2
Reviewed head: 197e6ec9630946c92d34ae5596594b7b2f6122a1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused owner-boundary repair and supplied live proof are strong, with final exact-head validation still pending.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): The PR supplies a source-bound Linux Gateway run using the changed live fixture, a real Codex agent turn, both MCP calls, and the final response; it covers the changed runtime selection and history assertions, while refreshed-head follow-up validation remains in progress.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): The PR supplies a source-bound Linux Gateway run using the changed live fixture, a real Codex agent turn, both MCP calls, and the final response; it covers the changed runtime selection and history assertions, while refreshed-head follow-up validation remains in progress.
Evidence reviewed 6 items Child-error owner and regression coverage: The introduced failure path combines stderr and captured stdout, then passes the result through the existing bounded redaction owner; its regression covers both streams, redaction, and the 2,048-character limit.
Fixture isolation retains discovery: QA setup resolves provider-owner plugins and applies fixture configuration before starting the child; the changed fixtures use canonical activation configuration rather than the environment discovery kill switch.
Codex MCP naming contract: The Codex runtime keeps MCP namespace and callable name distinct, and OpenClaw projects an MCP item as server.tool; this supports the introduced gatewayLive.parity_probe assertion.
Findings None None.
Security None None.

How this fits together

QA Lab creates isolated Gateway fixtures to validate installed plugins, provider routing, and release scenarios. The child-command runner returns failures to the harness, while the live fixture performs an agent turn and reads Gateway chat history for its tool activity.

flowchart LR
  A[Packaged fixture] --> B[QA Gateway setup]
  B --> C[Plugin discovery and activation]
  C --> D[Live agent turn]
  D --> E[MCP tool history]
  B --> F[Child command runner]
  F --> G[Redacted failure diagnostic]
Loading

Before merge

  • Resolve merge risk (P1) - Exact-head check and the focused post-refresh integration cases described in the PR are still running; do not merge until they complete successfully.
  • Complete next step (P2) - This PR already owns the bounded repair; only current-head validation remains.
Agent review details

Security

None.

PR surface

Source 0, Tests +10. Total +10 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 10 87 77 +10
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 88 78 +10

Review metrics

Metric Value Why it matters
Production vs test LOC production +1/-1 (net 0); tests +87/-77 (net +10) The sole runtime change improves the existing error owner, while the remaining changes update fixture configuration and regression coverage without adding a product surface.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Complete current-head validation, then land the existing canonical fixture repair without restoring a separate discovery-suppression path.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Complete current-head validation, then land the existing canonical fixture repair without restoring a separate discovery-suppression path.

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

Yes, from source and supplied evidence: a nonzero child emitting both stderr and stdout lost the stdout diagnostic on current main, and packaged fixtures suppressed the discovery prerequisite they need.

Is this the best way to solve the issue?

Yes. The patch moves fixture isolation to existing activation configuration while retaining canonical discovery, and repairs the diagnostic at its producing child-command owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 8870e4a5ea5f.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR supplies a source-bound Linux Gateway run using the changed live fixture, a real Codex agent turn, both MCP calls, and the final response; it covers the changed runtime selection and history assertions, while refreshed-head follow-up validation remains in progress.

Label justifications:

  • P2: This is a bounded QA and release-validation reliability repair with no demonstrated user-facing outage or security regression.
  • 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 (logs): The PR supplies a source-bound Linux Gateway run using the changed live fixture, a real Codex agent turn, both MCP calls, and the final response; it covers the changed runtime selection and history assertions, while refreshed-head follow-up validation remains in progress.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR supplies a source-bound Linux Gateway run using the changed live fixture, a real Codex agent turn, both MCP calls, and the final response; it covers the changed runtime selection and history assertions, while refreshed-head follow-up validation remains in progress.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Dallin Romney: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Wait for the exact-head check and focused post-refresh integrations before merging.

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 (1 earlier review cycle)
  • reviewed 2026-09-01T07:20:58.675Z sha dcb142a :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/qa-mcp-doctor-bootstrap branch from dcb142a to 197e6ec Compare September 1, 2026 09:02
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The live fixture now uses the canonical Codex owner and asserts the executed runtime and exact native MCP history names. Its source-bound Linux live proof passed with both real tool calls and the final response; retained failure attempts are described in the body. The unchanged deterministic siblings passed all 12 cases. Head 197e6ec mechanically refreshes onto main containing the Doctor prerequisite repair. Exact-head CI and three targeted integration cases are running before landing; no gate is being bypassed.

@clawsweeper

clawsweeper Bot commented Sep 1, 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 the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 1, 2026
@steipete
steipete merged commit ae47b34 into main Sep 1, 2026
208 of 209 checks passed
@steipete
steipete deleted the codex/qa-mcp-doctor-bootstrap branch September 1, 2026 09:26
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 2, 2026
…law#134944)

* fix(qa): preserve Doctor discovery during MCP bootstrap

* test(qa): preserve plugin isolation in packaged Gateway fixtures

* test: use the canonical Codex runtime for live MCP proof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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.

1 participant