-
Notifications
You must be signed in to change notification settings - Fork 618
Open
Labels
effort-smallQuelques heures, 1 fichierQuelques heures, 1 fichierenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Summary
swift build is in the hook rewrite registry (src/discover/registry.rs), but swift test is not. This means the PreToolUse hook rewrites swift build → rtk swift build automatically, but swift test passes through unfiltered.
Since swift-build.toml already exists as a built-in TOML filter, and swift test output is structurally similar (build noise + test results), adding swift test to the rewrite registry would allow project-local or user-global TOML filters to handle it.
Context
swift testproduces very verbose output (~76KB for ~580 tests using Swift Testing framework)- A custom TOML filter achieves 99.4% token savings (76KB → ~200 bytes)
- But without a rewrite rule, the hook doesn't intercept
swift test, so the filter never runs automatically - Currently requires manually patching
rtk-rewrite.sh, which breaks integrity verification
Proposed Change
Add swift test to the rewrite registry in src/discover/registry.rs, similar to how swift build is already registered.
Optionally, a built-in swift-test.toml filter would be valuable — Swift Testing framework output follows a consistent pattern:
◇ Test/Suite ... started.(noise)✔ Test ... passed after N seconds.(noise)✘ Test ... failed/skipped(keep)✔/✘ Test run with N tests passed/failed(summary, keep)
Environment
- macOS, Swift 6.x, SPM (no Xcode)
- Swift Testing framework (not XCTest)
- rtk v0.31.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
effort-smallQuelques heures, 1 fichierQuelques heures, 1 fichierenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers