Repository navigation
feat(sdk-kmp): build against meshtastic-sdk main and let Dependabot bump it - #1545
Draft
danditomaso wants to merge 3 commits into
Draft
danditomaso wants to merge 3 commits into
danditomaso wants to merge 3 commits into
Conversation
Moves the pin from 206bcdc to 9f63c9c, the head of feat/storage-sqldelight-js. The SDK failed every handshake whose get_owner_response did not arrive within 10 s, so radios with a large NodeDB over HTTP, and managed radios (firmware drops local admin when is_managed is set), never connected: "Handshake timed out during stage: Seeding Session". The session now goes Ready at the Stage 2 completion, the passkey seed only warns on timeout, and the handshake logs the local node's is_managed flag. A late Stage 1 completion from the want_config retry no longer fails Stage 2 as a nonce mismatch. The new head also adds SendFailure.QueueFull, mapped here to "queue-full".
Moves the SDK to meshtastic/meshtastic-sdk@5e81355 (main), which carries the browser storage work and the non-fatal session seed (meshtastic#286) the fork branch was holding. - Map the new connection states: Disconnecting, Failed (with its cause's message and kind) and DeviceSleeping, as "disconnecting", "failed" and "sleeping". - The SDK now retries even the first connect unless the transport reports a non-recoverable error. The client passes a per-attempt provider and the browser transports report a failed connect as non-recoverable on attempt 0 only, so a connect the user starts still fails at once when the transport cannot open, as before. A handshake that stalls or fails after the transport opened is now restarted by the SDK, as for a live session, up to the attempt cap, and the connection shows the reconnect attempts meanwhile. - useConnections reads the give-up from "failed" instead of inferring it from "disconnected" after "reconnecting": the attempt cap reports reconnectFailed, any other cause goes through connectFailure. A "disconnected" that follows "disconnecting" was asked for and settles on disconnected rather than connection lost. A sleeping radio shows as connecting while the SDK waits for it.
Point the submodule at meshtastic/meshtastic-sdk main instead of the fork branch, and bring back Dependabot's weekly gitsubmodule update. CI builds the facade against each bump, so one that changes an API the facade uses fails there and gets its facade changes on the Dependabot branch.
|
@danditomaso is attempting to deploy a commit to the Meshtastic Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
This branch has not been deployed
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.
Description
The SDK submodule follows a fork branch (
danditomaso/meshtastic-sdkfeat/storage-sqldelight-js), which moves only when someone pushes to it. Because of that the web client doesn't pick up SDK changes, and Dependabot's submodule bumps were turned off after #1534. Upstreammainnow carries the browser storage work, so this PR moves the facade onto it and turns automatic bumps back on.Draft. It depends on:
build-and-packagecheck can't run in the merge queue.mainstill lacks: ignoring a stale Stage 1config_complete_idduring Stage 2, and the handshake'sis_managedlog line. Merging this before that lands would regress both.Changes Made
Architecture: sdk-kmp facade
main). The storage sources are identical to the fork's, so existing OPFS databases open the same way.Disconnecting,Failed(with its cause's message and kind) andDeviceSleepingto"disconnecting","failed"and"sleeping".connect()as non-recoverable on attempt 0 only. So a connect whose transport can't open (API missing, device not permitted, LNA denied) still fails at once, and drops of a live session are still retried.Behaviour changes
useConnectionsnow reads the SDK giving up fromfailed. It used to infer that fromdisconnectedarriving afterreconnecting.connectFailure.disconnectedthat followsdisconnectingwas requested, so it settles on disconnected instead of "connection lost".GOT_NAKnow arrives as"GOT_NAK"(upstream js version bump #297) instead ofno-route, and the message status maps it by routing-error name.Chores
.gitmodulesnow points atmeshtastic/meshtastic-sdkmain.gitsubmoduleupdate is back. Dependabot reads the branch from.gitmodules.build-and-package. Fix it on the Dependabot branch instead of merging it red. Documented inpackages/sdk-kmp/README.md.Testing Done
pnpm --filter @meshtastic/sdk-kmp build, andjsNodeTestpasses (48 tests).pnpm vitest runpasses (2251 tests). Updated for the new states:serialClient.test.ts: a connect that can't find a port ends infailed.useConnections.kmp.test.ts: cap exhaustion, a non-retryable cause, a cause between attempts, a requested disconnect while reconnecting, and a sleeping radio.fakeClient.ts: a disconnect passes throughdisconnecting.apps/webvite buildpasses. Typecheck adds no errors beyond the ones already onmain.