Add an opt-in SwiftPM job limit to coordinated builds and tests#523
Open
morluto wants to merge 5 commits into
Open
Add an opt-in SwiftPM job limit to coordinated builds and tests#523morluto wants to merge 5 commits into
morluto wants to merge 5 commits into
Conversation
- `configured_swift_jobs` validates and parses the env var; `append_swift_jobs_arg` appends `--jobs N` only to coordinated SwiftPM invocations. - Request env is authoritative: when an env dict is provided we do not fall back to the daemon's `os.environ`, preventing cross-job leakage. - Integer validation matches the shell scripts exactly: positive decimal integer with no leading zeros and no sign (`^[1-9][0-9]*$`). - Wired into `swift-build`, `test`, `provider-test`, `swift_build_all`, and the `package_app.sh` / `build_swiftpm_release_products.sh` packaging paths. - Added `REPOPROMPT_SWIFT_JOBS` to `CONDUCTOR_ENV_KEYS` and echoed the effective limit in daemon logs and `run_operation_command` output. - Added focused tests for env authority, fingerprint reuse, unaffected non-Swift ops, packaging-script regex parity, and shell/Python validation consistency. - Documented the contract in `AGENTS.md`. Closes repoprompt#476
Only parse/validate the Swift jobs limit in DaemonState._run_job for swift-build, test, and provider-test operations. Packaging/build scripts and non-Swift lanes (sleep, diagnostics, etc.) must not be blocked by an invalid REPOPROMPT_SWIFT_JOBS value. Add daemon-level regression tests proving that invalid values do not affect sleep while swift-build product=all rejects the job in the daemon runner.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Conductor serializes heavy jobs across worktrees, but one admitted Swift build can still use many compiler workers. Global heavy slots and SwiftPM worker limits solve different problems: one bounds concurrent conductor jobs; the other bounds parallelism inside one job.
This PR adds the second control without changing default behavior.
Closes #476.
What changes
Adds:
When set, coordinated SwiftPM build, test, provider-test, packaging, run, and release-product paths receive
--jobs <N>.Contract
This is developer workload control, not application state, so it remains an environment contract at the coordinated command boundary.
Review order
Verification