Skip to content

Extract process support into a focused SwiftPM module and test target - #522

Open
morluto wants to merge 4 commits into
repoprompt:mainfrom
morluto:agent/416-process-canary
Open

Extract process support into a focused SwiftPM module and test target#522
morluto wants to merge 4 commits into
repoprompt:mainfrom
morluto:agent/416-process-canary

Conversation

@morluto

@morluto morluto commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Why

swift test --filter narrows execution, not target compilation. Small process-lifecycle tests still compile the broad RepoPromptApp and 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

  • Adds the internal RepoPromptProcessSupport SwiftPM target.
  • Moves the process runner, launcher, termination, environment, framing, and required concurrency primitives into it.
  • Makes RepoPromptApp depend on the lower-level module.
  • Adds RepoPromptProcessTests and moves the lifecycle canary out of the root test target.
  • Uses package access instead of widening the module to public API.
  • Updates imports, the curated test ledger, formatting paths, source-layout guardrails, Sentry in-app classification, and Xcode workspace generation.

Boundary

RepoPromptApp
    ↓
RepoPromptProcessSupport
    ↓
RepoPromptShared

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

  1. Package.swift
  2. Sources/RepoPromptProcessSupport
  3. Tests/RepoPromptProcessTests
  4. access/import changes
  5. ledger and guardrails
  6. Xcode generator contract

Most changed lines are file movement. Review the target graph and module boundary first.

Verification

  • source-layout guardrails
  • test-suite optimizer contract tests
  • Xcode generator topology test
  • SwiftFormat checks
  • package manifest resolution
  • contribution commit/push preflights

@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.

morluto added a commit to morluto/repoprompt-ce that referenced this pull request Jul 14, 2026
morluto added a commit to morluto/repoprompt-ce that referenced this pull request Jul 30, 2026

@baron baron left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@morluto
morluto force-pushed the agent/416-process-canary branch from 098a5cd to 3ac5445 Compare August 9, 2026 18:57

@baron baron left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants