chore(swift-sdk): reduce swift-sdk test time in CI - #3869
Conversation
|
Warning Review limit reached
Next review available in: 48 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughgrovedb-family git revision pins are bumped from ChangesRust grovedb rev bump and dev-dep cleanup
Swift SDK build and test refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Final review complete — no blockers (commit 971c3f8) |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/swift-sdk/build_ios.sh`:
- Line 85: The help text returned by the show_help() function omits the newly
added --target value "tests" even though the script accepts it (see the case
branch that sets BUILD_SIM=true; BUILD_MAC=true for tests); update show_help()
to list "tests" among valid --target options and update any related usage lines
that enumerate targets so CLI users and CI see the new tests option consistent
with the case handling for BUILD_SIM/BUILD_MAC.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d6da8bea-fa00-449a-95b4-53d4465a29d5
📒 Files selected for processing (4)
Cargo.tomlpackages/swift-sdk/SwiftExampleApp/SwiftExampleApp/Views/CreateIdentityView.swiftpackages/swift-sdk/build_ios.shpackages/swift-sdk/run_tests.sh
💤 Files with no reviewable changes (1)
- Cargo.toml
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
PR introduces a real regression in the published PR artifact: run_tests.sh now invokes build_ios.sh --target tests, which only builds the simulator and macOS slices, yet swift-sdk-build.yml continues to zip the resulting DashSDKFFI.xcframework as the PR artifact and recommends it as a SwiftPM .binaryTarget — consumers targeting physical iOS devices cannot link it. Two minor follow-ups: build_ios.sh show_help() does not advertise the new tests target, and the SwiftExampleAppTests/UITests targets are no longer exercised anywhere in CI.
🔴 1 blocking | 🟡 1 suggestion(s) | 💬 1 nitpick(s)
1 additional finding(s) omitted (not in diff).
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `packages/swift-sdk/run_tests.sh`:
- [BLOCKING] packages/swift-sdk/run_tests.sh:7: PR-artifact XCFramework no longer contains the iOS device slice
run_tests.sh now calls `build_ios.sh --target tests`, which only sets BUILD_SIM=true and BUILD_MAC=true (build_ios.sh:85). The downstream `xcodebuild -create-xcframework` step (build_ios.sh:236–240) is driven by IOS_LIB/SIM_LIB/MAC_LIB, so the resulting DashSDKFFI.xcframework contains only `ios-arm64-simulator` and `macos-arm64` — no `ios-arm64` device slice. swift-sdk-build.yml then zips that same xcframework and uploads it as the PR artifact (lines 89–107) and posts a PR comment instructing consumers to wire it up as a SwiftPM `.binaryTarget` (lines 143–158). Any consumer following those instructions and linking the artifact into an app targeting a physical iOS device will fail to link, and device-only FFI build breakages will no longer be caught at PR time (release builds still use `--target all`, so production releases are unaffected, but the PR-level deliverable is silently incomplete). Either build the iOS device slice in CI before the upload step (e.g. invoke `build_ios.sh --target ios --profile dev` after `run_tests.sh`, or split the PR upload step off `--target all`) or update the PR comment template to declare the artifact as simulator+mac only.
- [SUGGESTION] packages/swift-sdk/run_tests.sh:6-9: SwiftExampleAppTests/UITests have zero CI coverage after this change
Removing the `xcodebuild test -scheme SwiftExampleApp` invocation eliminates the only place SwiftExampleAppTests (KeyManagerTests, StateTransitionTests, ValidationTests, CreateIdentityResumableTests, ShieldedSyncGenerationTests, WalletTests/*, etc.) and SwiftExampleAppUITests were exercised. `swift test` only runs the SwiftPM-defined test targets, not Xcode app test bundles. The PR description acknowledges this and promises a follow-up migration PR, but until that lands these tests will silently rot and regressions will not be caught. Land the migration in the same PR, or keep a slimmed `xcodebuild test` invocation (e.g. with `-skip-testing` filters on the slow cases) so coverage is not dropped to zero in the interim.
|
✅ DashSDKFFI.xcframework built for this PR.
SwiftPM (host the zip at a stable URL, then use): .binaryTarget(
name: "DashSDKFFI",
url: "https://your.cdn.example/DashSDKFFI.xcframework.zip",
checksum: "08697fb7c90de689d57fae0dc5b6e55a5a3faf5193491f637b44d051682ca0df"
)Xcode manual integration:
|
LuuOW
left a comment
There was a problem hiding this comment.
Technical audit: Implementation verified for system consistency and engineering integrity.
28ce415 to
971c3f8
Compare
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
Cumulative review at 971c3f8 (Swift SDK CI/test speedup PR). Prior 'SwiftExampleApp tests have zero CI coverage' is now resolved — run_tests.sh re-introduced an xcodebuild test invocation at lines 23-27. Prior 'XCFramework missing iOS device slice' was misframed (run_tests.sh produces test artifacts, not the PR/release framework, which uses --target all) and is dropped. One prior nitpick still stands: build_ios.sh show_help() does not document the new 'tests' target. New reviewer findings (grovedb rev bump, SwiftPM clean removal, tokio-metrics on dev-ios) are speculative/out-of-scope.
💬 1 nitpick(s)
1 additional finding(s) omitted (not in diff).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v4.1-dev #3869 +/- ##
=============================================
+ Coverage 65.42% 87.51% +22.09%
=============================================
Files 26 2667 +2641
Lines 2707 337077 +334370
=============================================
+ Hits 1771 295005 +293234
- Misses 936 42072 +41136
🚀 New features to boost your workflow:
|
Resolved grovedb pin conflicts in favor of v4.1-dev's v5.0.1 tag, which supersedes this branch's rev bump. Regenerated Cargo.lock so the unused dev-dependency removals (tempfile, predicates) are reflected on top of the base lockfile. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ci was being slowed down when trying to execute the build and test step of the swift-sdk, to improve the job execution time I changed:
All of this made the test script 4x faster
Checklist:
For repository code-owners and collaborators only