Repository navigation
refactor(providers): move the native command runner into the shared provider core - #11462
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
[Low impact] This refactor appears safe to merge. SummaryMoves
No actionable issues found. Tests were not run during this review. The full PR was reviewed because the previous and current commits have different merge bases with the target commit. Live supersession status could not be checked because GitHub authentication was unavailable. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
N["Native provider"] --> R["Shared NativeCommandRunner"]
A["MachOSliceArtifactReader"] --> R
R --> C["OwnedCommandCleanup"]
R --> P["OwnedCommand and process supervision"]
Reviews (7) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile |
4afb13f to
e05d931
Compare
|
@greptileai review the latest commit (e05d931). It is the same move rebased onto main after #11460 merged. |
e05d931 to
6dc8434
Compare
8e04c42 to
01af385
Compare
|
@greptileai review the latest commit (01af385). It replays this PR's own commit on current main; the earlier head also contained merge commits from main. |
…e-command-runner-provider-core # Conflicts: # scripts/lib/module-layers.baseline.json
Summary
Moves
src/native/CommandRunner.tstosrc/providers/NativeCommandRunner.ts, the shared provider core, withgit mvand specifier rewrites. The file content is unchanged apart from its relative imports.The runner (
XcrunCommandRunner,NativeCommandRunner,NativeCommandFailure,resolveXcrunTool,failureCapture) runs allowlisted host Xcode tools under owned-process supervision. Two provider folders use it: native (otool, nm, codesign and others) and artifacts (MachOSliceArtifactReaderrunslipo -detailed_info). With the runner in the provider core, both import it inward, so:crossProviderartifacts -> native1 -> 0;artifacts <-> nativeleaves thecyclesbaseline (7 -> 6).Follows #11460, which moved the lipo parser to
src/domain/apple. Refs #11359. Part of plan W9.Problem and expected behavior
MachOSliceArtifactReaderimported the native provider's command runner, and native imported artifacts, so the two provider folders formed a cycle. Expected: code that two providers share lives below them.Change and scope
src/ports/: the runner's imports are already at or below the provider core (providers/OwnedCommandCleanup,process/*,platform,resources,domain), andNativeCommandFailuredepends onprocessInspectionFailurefromproviders/OwnedCommandCleanup. A port could not hold the failure type without a second failure model. The provider core already holds the runner's building blocks (runOwned,OwnedCommandCleanup).captured-output-copyre-keys the runner's entry (same count); the layer baseline losesartifacts -> nativeand theartifacts <-> nativecycle.Not included: native's remaining imports of artifacts (
withArtifactTargetIdentity,hashStableRootArtifact, the PE resource layout and parser, a test fixture). Those arenative -> artifactsedges, tracked in #11426 and #11359.Contract and boundary impact
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.
Evidence and regression coverage
Tests added or updated: specifier updates only.
Base reproduction or other evidence:
node scripts/verify-module-boundaries.mjsreportedcross-provider import artifacts -> native: 0, baseline 1andrecorded mutual import no longer present: artifacts <-> native.User-visible CLI/MCP output (if applicable): none.
Remaining proof gaps: none.
Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Validation performed
npm run check:fast: passed, including the architecture guards.node scripts/verify-module-boundaries.mjs: passed after lowering the baseline.npm run test:focused --withsrc/artifacts/MachOSliceArtifactReader.test.ts,src/native/{NativeCommandAnalysisError,NativeCommandDeadline,NativeCommandPreparation,NativeMachoCommandDiagnostics,NativeMachoInspection}.test.ts,tests/boundary/providers/native/{machoSliceReader,nativeCommandResolver,nativeCommandTermination,lldbPrelaunchCleanup,artifactProvider.machOSlices}.test.tsandtests/boundary/filesystem/ownedArtifactReaderCleanup.test.ts: 12 files, 135 tests passed (8.8 s).Compatibility, safety, and release
This is a pure move (
git mvplus specifier and baseline-key rewrites), so the squash commit goes in.git-blame-ignore-revsafter merge.Author readiness
Human owner:
Before merge
type(scope): outcome.