Repository navigation
Test CLI generation through the process runner instead of per-step closures - #195
Merged
Merged
Conversation
Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
…on starts Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
…on early exit Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis 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. |
Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
lynnswap
commented
Nov 20, 2026
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This was referenced Nov 20, 2026
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.
Summary
runPrivateHeaderKitCommandand the functions below it take oneCommandRunningin place of the closures for the generation client, Simulator resolution and cleanup, helper resolution, release metadata, and source discovery. The CLI tests that replaced those steps now run the real code against a recorded process runner and temporary directories. Command-line syntax, output text, and exit codes do not change.Details
GenerationHostfixture: a temporary directory with installed helpers, a macOS system root, and an iOS Simulator runtime, plus aRecordingCommandRunnerthat answerssimctl,sw_vers, and the helper commands. Helper resolution, Simulator sessions, target discovery, the generation executor, the state database, and publication all run for real in these tests.--resumeand--freshare covered by a new test that leaves an unfinished all-target run and reruns it each way./for the macOS source, so the tests that list sources take the expected seed flag from the Mac they run on.catchfor it is removed), and assertions on values that never leave the process on a macOS run, such as the Simulator helper URL in the request.GenerationLeasenow unlocks withflock(LOCK_UN)before closing its descriptor. A process spawned while the lease is held keeps a copy of the descriptor until it execs, so closing alone could leave the lock held for a moment and make an immediate re-acquisition fail with "generation lease is already held". The wizard takes the lease twice in a row for an all-target run, and the test process spawns real processes from other tests in parallel, which made the migrated tests fail about once in a hundred runs. The CLI itself does not spawn anything between the two leases.PrivateHeaderKitGenerationClientis removed. The file keeps its name and the functions stay free functions until Move the CLI commands into types that own their dependencies #193 moves them into command types.Testing
swift test: all six test bundles pass. The CLI bundle passed 100 consecutive runs after the lease change.origin/mainmerged in (Build the device helper without the generation engine #194), the full test scheme passes on the M6 mini XcodeRunnerKit host. The pull request was merged on that result and the local Codex review, without waiting for GitHub CI on the last head./usr/bin/truefailed 37 times before the change and 0 times after it, in two runs. The race cannot be staged deterministically, so no test was added for it.--freshto the default continuation, or skipping the deletion of the temporary Simulator device, each fails the migrated tests.Foundationdump on macOS 27.2.1 is identical to the output before this change (1,023 files).🤖 Generated with Claude Code