fix(ci): unbreak the ktlint and SwiftLint gates that are red on main - #609
Merged
shubhammalhotra28 merged 2 commits intoJul 31, 2026
Conversation
…mpanion ktlintMainSourceSetCheck fails on main with: AndroidConnectTransport.kt:449:9 Declarations and declarations with comments should have an empty space between. (standard:spacing-between-declarations-with-comments) The KDoc on GENERATION_READ_TIMEOUT_MS follows the preceding const declaration with no blank line between them. Add the blank line so the kotlin-android job goes green again. Signed-off-by: ayaangazali <ayaangazali.work@gmail.com>
📝 WalkthroughWalkthroughUpdated Swift connection race handling to throw a network error when no handshake result exists. Added a blank line in the Kotlin connection transport companion object. ChangesSwift connection session
Android connection transport
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
The swift-spm job fails on main with: ConnectSession.swift:285:51: error: Force Unwrapping Violation: Force unwrapping should be avoided (force_unwrapping) Replace `try await group.next()!` with a guard that throws the same ConnectTransportError.network used by the timeout child task, so the race-the-handshake behaviour is unchanged on the real path and the error-level SwiftLint rule is satisfied. Signed-off-by: ayaangazali <ayaangazali.work@gmail.com>
Contributor
|
Thanks for the fix @ayaangazali |
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.
What
Two one-line lint fixes, both for violations that currently fail CI on
main. Both were introduced by #604 (merged 2026-07-30); nothing else in that PR's behaviour is touched.1.
kotlin-android—ktlintMainSourceSetCheckThe KDoc on
GENERATION_READ_TIMEOUT_MSsits directly against the precedingconst valin the companion object. Added the blank line ktlint asks for.2.
swift-spm— SwiftLint (error-level rule)try await group.next()!force-unwraps the first result of the connect/timeout task group. Replaced with aguardthat throws the sameConnectTransportError.networkthe timeout child task already throws, so the race-the-handshake behaviour is unchanged on the real path.Why
These are not branch-specific — they redden CI for every PR on current
main:main's ownpr-buildrun at3becbae5is failing.swift-spmis currently red on docs: revamp README with architecture diagram, eight SDKs, engines, and Console #600, Hybrid streaming voice agent (NPU LLM + CPU STT/TTS) #588 and fix(flutter): stop deleteAllModels from reporting success when listing fails #608;kotlin-androidon Hybrid streaming voice agent (NPU LLM + CPU STT/TTS) #588 and fix(flutter): stop deleteAllModels from reporting success when listing fails #608.Grouped in one PR because the concern is identical (unbreak the lint gates) and merging only half of it still leaves CI red.
Testing
./gradlew ktlintMainSourceSetCheckinsdk/runanywhere-kotlin(JDK 17) — BUILD SUCCESSFUL. Re-run with the change stashed — BUILD FAILED on exactly the line above, confirming this is the fix.kotlin-androidalready passed on this PR's first commit in CI.sourcekitdInProc. I verifiedswiftc -parseon the file is clean and that no force unwrap remains, and am relying on CI'sswift-spmjob for the authoritative lint check. Flagging that explicitly rather than implying a gate I did not run.🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Style