Extract process support into a focused SwiftPM module and test target - #522
Extract process support into a focused SwiftPM module and test target#522morluto wants to merge 4 commits into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
baron
left a comment
There was a problem hiding this comment.
Two exact-head blockers remain at 098a5cd419095ba34491a17c761dd4839b2f3f45: (1) ProcessTerminationError is package-visible but its LocalizedError.errorDescription witness is only internal (ProcessTermination.swift:44,48-55), producing the hosted compiler failure; (2) test_xcode_workspace_generator.py:112-116 passes the corrected dependency set as assertEqual's message rather than the expected value, so the contract test still checks the incomplete set. Please fix both, resolve current-main conflicts, and rerun the build and Xcode-generator checks.
…rt canary target This is the first canary step to separate subprocess-lifecycle and task-coordination substrate from the RepoPrompt app target. The move makes the dependency boundary explicit: RepoPromptProcessSupport depends only on RepoPromptShared, and RepoPromptApp depends on it. - Move Infrastructure/Process and Infrastructure/Concurrency into Sources/RepoPromptProcessSupport/ and update Package.swift target wiring. - Move CLIProcessRunnerLifecycleTests to Tests/RepoPromptProcessTests. - Update test-suite-contract-ledger and source-layout documentation. - Add RepoPromptProcessSupport to Sentry inAppInclude. - Remove unused Darwin import from CursorIntegrationConfiguration. - Add a narrow source-layout guardrail for RepoPromptProcessSupport. - Run SwiftFormat on affected files. macOS validation (build/test/run) is intentionally retained as a gap because this environment cannot run Swift builds requiring the Apple SDK.
098a5cd to
3ac5445
Compare
baron
left a comment
There was a problem hiding this comment.
Blocking on replacement head 3ac5445bce18f5b0192e10e61281ffcce50cddb1.
The previous access-witness and Xcode-generator assertion findings are fixed, but the new module split does not compile: RepoPromptProcessSupport exposes/uses ChildProcessExitObserver from ProcessTermination.swift, while that type remains owned by the app target under Sources/RepoPrompt/Infrastructure/Process/ChildProcessExitObserver.swift. The lower-level module cannot see the app-owned type, and all app shards plus the Sentry build fail.
Move the observer contract into the owning lower-level module (or remove the cross-module exposure), add the appropriate module-boundary coverage, and rerun all exact-head build/test lanes.
Why
swift test --filternarrows execution, not target compilation. Small process-lifecycle tests still compile the broadRepoPromptAppand root test modules.This PR tests the architectural remedy on one bounded area. It extracts process execution and lifecycle support without attempting a repository-wide target rewrite.
Advances #416.
What changes
RepoPromptProcessSupportSwiftPM target.RepoPromptAppdepend on the lower-level module.RepoPromptProcessTestsand moves the lifecycle canary out of the root test target.packageaccess instead of widening the module to public API.Boundary
Existing features remain consumers. No compatibility wrapper or duplicate implementation is introduced.
Deliberate scope
This extracts one coherent canary only. It does not split every infrastructure area, redesign process APIs, or change conductor/cache behavior.
Review order
Package.swiftSources/RepoPromptProcessSupportTests/RepoPromptProcessTestsMost changed lines are file movement. Review the target graph and module boundary first.
Verification