feat(tools): Add check, format and test tools for the macOS app - #1011
Open
JeanMertz wants to merge 3 commits into
Open
feat(tools): Add check, format and test tools for the macOS app#1011JeanMertz wants to merge 3 commits into
JeanMertz wants to merge 3 commits into
Conversation
JeanMertz
force-pushed
the
pr/swift-tools
branch
from
August 19, 2026 20:03
12e6704 to
4be378d
Compare
JeanMertz
force-pushed
the
pr/swift-tools
branch
from
August 19, 2026 20:06
4be378d to
98ebc04
Compare
JeanMertz
force-pushed
the
pr/swift-tools
branch
from
August 19, 2026 20:35
98ebc04 to
3d7cd90
Compare
JeanMertz
force-pushed
the
pr/swift-tools
branch
from
August 19, 2026 21:05
3d7cd90 to
b099d9d
Compare
JeanMertz
force-pushed
the
pr/swift-tools
branch
from
August 19, 2026 21:41
b099d9d to
d93b6b1
Compare
JeanMertz
force-pushed
the
pr/swift-tools
branch
from
August 20, 2026 11:18
d93b6b1 to
b95bf90
Compare
JeanMertz
force-pushed
the
pr/swift-tools
branch
from
August 21, 2026 06:31
b95bf90 to
06f64a2
Compare
JeanMertz
force-pushed
the
pr/swift-tools
branch
from
August 21, 2026 17:30
06f64a2 to
f7a48b7
Compare
JeanMertz
force-pushed
the
pr/swift-tools
branch
2 times, most recently
from
August 21, 2026 21:57
292d31c to
cef7312
Compare
The Rust side of this repository can be built, linted, formatted and tested from inside a conversation. The Swift side could not, which made the app the one place where a change had to be handed back to a human to find out whether it even compiled. These close that gap: each shells out to a toolchain binary from the repository root and reports diagnostics rather than raw build logs, the way the `cargo_*` tools do. Every tool that builds brings its own inputs up to date first — the `jp_ffi` static library, its generated header, and the Xcode project — so there is no setup step to forget and no failure mode where the tools disagree with what `just` would have produced. `xcodebuild` repeats the failing command line in full for every error, so a broken build's tail is almost entirely noise; diagnostics are capped and the head is what survives. `swift_check` builds the app, `swift_format` formats or reports without rewriting, and `swift_test` runs the unit tests and the `jpdrive` package. `swift_test_ui` is separate and requires test names. A UI test takes over the screen for as long as it runs, so the whole bundle is CI's job rather than something a conversation should trigger by accident; asking for the suite by name is the guard. It stops at the first failure and closes the app the run left behind, unless `CI=1` says to finish and report everything. Stopping early needs the process interrupted rather than killed, which `run_until` on the shared runner now supports. `SIGINT` gives `xcodebuild` the chance to tear down its test session, and tearing down that session is what stops the app the test was driving; killed outright, it leaves that app sitting on the screen. Five seconds to unwind, then a kill. A failure copies the screenshots the run recorded into `tmp/uitests/`, because a UI test that failed on something visual is unreadable from its assertion alone. Signed-off-by: Jean Mertz <git@jeanmertz.com>
Signed-off-by: Jean Mertz <git@jeanmertz.com>
JeanMertz
force-pushed
the
pr/swift-tools
branch
from
August 22, 2026 20:08
cef7312 to
ed5f26f
Compare
Signed-off-by: Jean Mertz <git@jeanmertz.com>
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.
The Rust side of this repository can be built, linted, formatted and
tested from inside a conversation. The Swift side could not, which made
the app the one place where a change had to be handed back to a human to
find out whether it even compiled. These close that gap: each shells out
to a toolchain binary from the repository root and reports diagnostics
rather than raw build logs, the way the
cargo_*tools do.Every tool that builds brings its own inputs up to date first — the
jp_ffistatic library, its generated header, and the Xcode project —so there is no setup step to forget and no failure mode where the tools
disagree with what
justwould have produced.xcodebuildrepeats the failing command line in full for every error,so a broken build's tail is almost entirely noise; diagnostics are
capped and the head is what survives.
swift_checkbuilds the app,swift_formatformats or reports without rewriting, andswift_testruns the unit tests and the
jpdrivepackage.swift_test_uiis separate and requires test names. A UI test takesover the screen for as long as it runs, so the whole bundle is CI's job
rather than something a conversation should trigger by accident; asking
for the suite by name is the guard. It stops at the first failure and
closes the app the run left behind, unless
CI=1says to finish andreport everything.
Stopping early needs the process interrupted rather than killed, which
run_untilon the shared runner now supports.SIGINTgivesxcodebuildthe chance to tear down its test session, and tearing downthat session is what stops the app the test was driving; killed
outright, it leaves that app sitting on the screen. Five seconds to
unwind, then a kill.
A failure copies the screenshots the run recorded into
tmp/uitests/,because a UI test that failed on something visual is unreadable from its
assertion alone.
Signed-off-by: Jean Mertz git@jeanmertz.com