Skip to content

refactor(doctor): compose system diagnostics from one host platform - #11096

Merged
morluto merged 1 commit into
mainfrom
refactor/host-platform-doctor-runtime
Nov 15, 2026
Merged

morluto merged 1 commit into
mainfrom
refactor/host-platform-doctor-runtime

Conversation

@morluto

@morluto morluto commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Summary

HostPlatform migration (W8), src/doctorRuntime.ts. createSystemDoctorHost composes doctor from one host (HOST_PLATFORM by default) and passes its platform to the selected-registration read, provider-setting fold, unresolved-provider checks, Kuna inspection and systemDoctorHost, instead of nine separate process.platform reads.

Problem and expected behavior

Each step of system doctor composition read process.platform on its own, and selectedProviderSettings defaulted to it, so the client layout, the environment-name fold and the provider checks had no single platform source. Expected: composition names the host once and threads it.

Change and scope

  • createSystemDoctorHost(environment, signal?, host = HOST_PLATFORM); it passes platform and architecture to systemDoctorHost.
  • selectedRegistrationEnvironment and selectedProviderSettings take a required platform.
  • Not included: the JADX doctor probe's host argument (refactor(android): take the host in JADX configuration, doctor and workspace roots #11086 adds it at this call site); other folders.
  • Baseline: the src/doctorRuntime.ts entry (9 reads) removed.
  • Scope: internal refactor; no target execution, injection, mutation or protection recovery.

Contract and boundary impact

  • Semantic owner and earliest changed stage: src/platform/HostPlatform; consumer is system doctor composition.
  • Contribution scope fit and linked maintainer decision: not applicable (approved cleanup plan, W8).
  • CLI and MCP/tool-catalog contract: unchanged.
  • Provider, bridge, target-format, or platform compatibility: unchanged.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): unchanged.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: none; no doctor runtime test redefined process.platform, and the type checker enforces the required parameters.
  • Base reproduction or other evidence: source-derived (refactor).
  • User-visible CLI/MCP output (if applicable): none.
  • Remaining proof gaps: Windows not run locally.

Validation performed

  • npx tsc --noEmit -p . — passed.
  • node scripts/verify/architecture-guards.mjs --shrink-baselines — passed; baseline lowered.
  • npm run test:focused -- src/doctorRuntime.test.ts src/setupEnvironment.test.ts tests/boundary/providers/kuna/kunaDoctor.test.ts tests/boundary/cli/cliStartupImports.test.ts — 4 files passed (77 passed, 1 skipped).
  • npm run check:fast — passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none (internal API).
  • Real Hopper/Ghidra, browser, or OS coverage: macOS only.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no change.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-15T12:15:53.520328Z
We couldn’t complete this review. Comment @codex review to try again.
69ebdee PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no actionable issues were found.

Summary

createSystemDoctorHost now takes one HostPlatform and passes its platform through client registration reads, provider settings, unresolved-setting checks, and Kuna inspection. It also passes the platform and architecture to systemDoctorHost.

  • System doctor uses one host to describe every platform-specific check.

Reviews (1) · Last reviewed commit: "refactor(doctor): compose system diagnos..." · Reviewed by Greptile

@morluto
morluto merged commit 4c375b8 into main Nov 15, 2026
7 checks passed
@morluto
morluto deleted the refactor/host-platform-doctor-runtime branch November 15, 2026 12:17
@morluto morluto added the area: setup Setup, packaging, upgrade, install, Doctor, and client registration label Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: setup Setup, packaging, upgrade, install, Doctor, and client registration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant