Repository navigation
Bump KontextKit to 0.1.0; send network.type as null (fixes NWPathMonitor crash) - #128
Merged
Merged
Conversation
KontextKit 0.1.0 removes on-device network-type detection — the `NWPathMonitor` read whose non-one-shot `pathUpdateHandler` resumed a `CheckedContinuation` twice and crashed the app (EXC_BREAKPOINT) on flapping/constrained networks, on every `/preload`. This bump pulls that fix into sdk-swift. `NetworkInfoProvider.NetworkInfo.type` is now `String?` (always nil) and `.detail` is gone, so `DeviceCollector` is adapted: it forwards whatever type KontextKit reports (nil today) instead of coercing to `.other`, and no longer reads `detail`. `NetworkDTO.type` becomes optional so the wire carries no `network.type` rather than a misleading `"other"`. The ad server does not use `network.type` for ad selection, so this is behaviourally safe. `userAgent` — the field the server consumes — is unchanged. Version bumped to 4.0.2 (podspec + SDKInfo). No public API changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`timerAddedToCommonModeFiresDuringTracking` asserted `fireCount >= 2` off a single `RunLoop.main.run(mode:before:)` call, but one call handles only one run-loop pass and can return after zero or one timer fire depending on scheduler load — so it failed intermittently on loaded CI runners (`fireCount → 0`) while passing locally. Pump the tracking-mode run loop in short slices until the timer has fired enough times or a deadline passes. Same invariant, no longer timing-dependent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
Summary
Pulls the production crash fix into
sdk-swiftby bumping KontextKit0.0.4→0.1.0, and stops sendingnetwork.typeon the wire.The crash (
EXC_BREAKPOINTreported from Polybuzz / PolySpeak) was in KontextKit's on-devicenetwork.typedetection: it bridgedNWPathMonitor.pathUpdateHandlerinto aCheckedContinuation, but that handler is not one-shot — a second callback on a flapping/constrained network resumed the continuation twice and crashed the app. It ran insideDeviceCollector.collectAsync()on every/preload(every chat message). KontextKit 0.1.0 removes the detection entirely (kontextso/kontextkit-ios#5).Changes
Package.swift+ podspec: KontextKitexact 0.0.4→0.1.0.DeviceCollector: adapts to the newNetworkInfoshape —typeis nowString?(nil) anddetailis gone. Forwards whatever type KontextKit reports (nil today) instead of coercing to.other; dropsdetail.NetworkDTO.type: now optional, so the request carries nonetwork.typerather than a misleading"other". The ad server does not usenetwork.typefor ad selection (only maps it to OpenRTBconnectiontype), so this is behaviourally safe.userAgent— the field the server actually consumes — is unchanged.detailfield kept but always nil (no longer sourced), to keep the change minimal.4.0.2(podspecs.version+SDKInfo.sdkVersion).Tests
Full suite green on the simulator — 464 tests. Added
networkDTOOmitsNilType; updatednetworkDTOOmitsNilOptionalFieldsfor the now-optionaltype, the version assertions inSDKInfoTests, and theNetworkDTOdoc. ExistingDeviceCollector/encoding tests unchanged and passing.Rollout
Depends on KontextKit 0.1.0 (already published to CocoaPods). After merge: tag
4.0.2+pod trunk pushperRELEASING.md. This is the version Polybuzz updates to to get the crash fix.🤖 Generated with Claude Code