dev
fix/1250-play-completed
feat/1247-macos-manual
main
fix/1243-altool-check
release/1.8.1
fix/1238-gitattributes-eol
feat/1198-dm-path-ownership
fix/1236-redact-screenshots
docs/1232-region-scope-guide
fix/1186-ble-drop-reason
feat/1088-play-publish
docs/1086-a3-result
feat/1084-play-upload-tool
fix/1166-location-radio-truth
fix/1163-radio-switch-misfile
feat/1148-docs-notify
docs/1145-android-screenshots
feat/1109-macos-signing
fix/1128-channel-key-history
feat/1129-sponsor-prompt
fix/1118-factory-reset-delete-on-send
fix/1122-notify-logging
fix/1896-client-slot0-public
feat/1054-factory-reset
fix/1111-osm-identity
feat/523-land-indicators
feat/1108-macos-artifact
feat/1014-ios-app-review
feat/1013-ios-signed-lane
feat/1068-radio-channel-notify
docs/1091-epic-chain
docs/1053-play-automation
fix/1065-vercode-floors
feat/1012-ios-signing-toolchain
docs/958-ios-appstore-plan
fix/1033-scan-location-message
feat/693-offline-app-settings
fix/1009-release-linux-2404
release/1.7.0
epic/870-console-gating
feat/759-fake-radio-integration
feat/758-fake-radio-ci
feat/757-fake-radio-behaviors
feat/756-fake-radio-core
epic/870-remote-cli-permission
feat/842-sync-is-truth
feat/975-settings-restructure
feat/966-clear-stale-history
feat/965-stale-blob-sweep
docs/962-epic-chain
docs/962-reclamation-plan
fix/943-952-storage-migration
feat/940-isolation-integration
feat/939-scope-key-lifecycle
feat/938-blocked-per-radio
feat/937-storage-service-migration
feat/936-scoping-harness
docs/853-isolation-plan
fix/754-discovery-per-radio
feat/920-message-rows
chore/904-docs-proof
feat/919-blob-isolate
fix/927-ci-spike-flag
feat/917-storage-save-path
chore/904-docs-only-ci
docs/857-interop-plan
feat/844-per-radio-notify
fix/812-land-814-815-on-dev
epic/816-integration
epic/814-discover-regions
epic/813-region-protocol
epic/815-channel-scope
docs/812-region-scoping-plan
release/1.6.0
fix/793-log-composer-budget
feat/703-forced-resync
docs/755-plan-flash-fix
docs/755-fake-radio-plan
docs/750-contact-naming-plan
feat/702-lossless-serial
feat/668-contact-sync-guard
feat/610-contact-card-receive
fix/717-linux-web-mtu
feat/638-top-toast
fix/589-late-reply-log-only
fix/663-triage-internal-actors
fix/652-release-prerelease-flag
feat/619-contact-identity-uri
fix/581-ack-adoption
epic/568-export-import
fix/580-caplog-partial
release/1.5.0-beta.1
task/501-deviceui-logging
chore/542-assets2
chore/542-assets
docs/519-claudemd-web
release/1.4.0
feat/483-button-buzzer-ui
fix/497-mention-verbatim
fix/279-send-width
docs/478-docs-home-research
release/1.3.0
fix/443-battery-optimization-warning
fix/447-close-labeler
fix/445-windows-sqlite3-native-assets
feat/429-companion-sync
fix/395-dm-channel-send-wedge
feat/427-localize-log-share
feat/393-app-log-share
fix/share-icon-android
fix/389-back-nav
feat/385-storage-health
release/1.2.2
feat/367-store-consolidation
chore/365-cut-1.2.1
fix/363-pin-db-path
feat/351-contact-settings-menu
feat/349-window-geometry
feat/355-migration-merge
integration/290-306-335
release/1.1.2-rc.3-allplatforms
fix/309-path-len-decode
chore/298-path-logging
fix/285-ingest-timelog
fix/252-block-outgoing-dm
feat/64-observer-config
feat/batch1-ux
chore/offband-rebrand
v1.8.1
v1.8.0
v1.7.0
v1.6.0
v1.5.0-beta.1
v1.4.0
v1.3.0
v1.2.2
v1.2.1
v1.2.0
v1.1.2-rc.3-allplatforms
v1.1.2-rc.3
v1.1.2-rc.2
v1.0.0
observer-g2-rc3
observer-g2-rc4
observer-g2-rc5
observer-g2-rc6
observer-g2-rc7
observer-g2-rc8
observer-g2-rc9
preview-1.8.0-1
v1.1.0-rc.1
v1.1.0-rc.2
v1.1.0-rc.3
v1.1.2-beta.1
v1.1.2-beta.2
v1.1.2-beta.3
v1.1.2-ble-test
v1.1.2-queuediag
v1.1.2-rc.1
v1.1.2-rc.1-b45-nearbyrep
v1.1.2-rc.1-b46-pathhash
v1.1.2-rc.1-b47-tracewidth
v1.1.2-rc.1-b48-repeatertrace
v1.1.2-rc.1-b49-maptrace
v1.1.2-rc.1-b50-tracefix
v1.1.2-rc.1-b51-originstrip
v1.1.2-rc.1-b52-channelqr
v1.1.2-rc.1-b53-viarepeater
v1.1.2-rc.1-b54-rxfed
v1.1.2-rc.1-b55-topology
v1.1.2-rc.1-b57-routeux
v1.1.2-rc.1-b58-toporeadout
v1.1.2-rc.3-b59-pathlen
${ noResults }
81 Commits (dev)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
70946f67cc |
fix(#316): bound the ACK window, and write a pin when it changes mid-send
Both from the adversarial review gate, both regressions this branch introduced rather than pre-existing faults. 1. `timeoutMs` reaches updateMessageFromSent as a raw readUInt32LE off the RESP_CODE_SENT frame with nothing bounding it. While the local computation overwrote that value it did not matter; making the radio's estimate a floor meant a garbage frame could arm a timer 49 days long, and one message in flight per contact is a queue invariant, so that wedged every later DM to that contact until an app restart. Clamped to 60 s, about four times the longest real round trip in OB-ZRNBY. 2. The pinned-route write was gated on `message.retryCount == 0`, so a user changing the override between attempts left the radio transmitting the old pin while this side had already re-armed its timeout and its path-weight bookkeeping for the new one. `updatePendingContact` hands the new override to the retry in flight, so attempt 0 is the wrong key. Now keyed on the route itself: a change is written, an unchanged pin is not. That keeps it from becoming the per-attempt re-assert #1198 removed. Tests, both proven to fail first: 4294967295 ms armed where 60000 was required, and the new pin never reaching the radio. The unchanged-pin case is covered too, at maxRetries 3 so the retry under test is an ordinary attempt rather than the final flooding one, which would have passed for the wrong reason. Third review finding, not fixed, justified: existing installs without a stored `max_message_retries` move from 5 attempts to 3 on upgrade. That is the ruling, it applies to everyone by design, the slider still spans 2 to 10, and the total time to failure is comparable because the window widened. |
19 hours ago |
|
|
235f557182 |
fix(#316): floor the DM ACK window at the measured 90th percentile, 3 attempts
Upload OB-ZRNBY carries 24 completed round trips as measured by the radio in PUSH_CODE_SEND_CONFIRMED: median 6771 ms, p90 12394 ms, against windows this code armed with a median of 4884 ms. Over half of all ACKs arrived after the attempt that earned them had timed out. 83 DMs cost 311 transmissions, 46 reached the final attempt and 23 were shown as failed. Owner ruled p90 rounded up, 12.5 s, with three attempts rather than five. Three changes: 1. A floor of 12500 ms on the window actually armed for a DM's ACK, in MessageRetryService. The airtime formula under-predicts because airtime is the wrong dominant term: on a multi-hop mesh the time goes into repeater forwarding delay and TXT_ACK_DELAY, and no coefficient on airtime fixes that. 2. The radio's own est_timeout from RESP_CODE_SENT is a floor, not a second opinion. It was overwritten outright by the local computation, which is how a 3252 ms radio estimate became a shorter local window and lost an ACK that came back at 3448 ms. Now max() of the two, then the floor. 3. Three attempts, not five. At the wider window three attempts give up after about the same elapsed time as five at the old one, while putting roughly 40% less traffic on a shared mesh. It also keeps every attempt's ACK hash distinct: the firmware masks `attempt & 3`, so attempt 4 collided with attempt 0 and the first and last attempts were indistinguishable. The floor deliberately does NOT live in calculateTimeout. That method also feeds calculateCliTimeout, and flooring it there added 11.5 s to every repeater CLI command and broke eight #533 tests: a separate surface with its own budget arithmetic that nobody ruled on. Tests, all four proven to fail first with real numbers: the formula armed 1300 ms for a flood and 1050 ms for a zero-hop send; maxRetries read 5; the radio's 14000 ms estimate was replaced by a 1200 ms local guess. Also asserts the formula is still unfloored so the CLI budget stays put, and that attempts 0 to 2 keep distinct ACK hashes while 4 collides with 0. A test seam lowers the floor, since a 12.5 s wall-clock wait per attempt is not something a unit test can drive. One test was written, passed against the reverted code, and deleted rather than kept: that a short text cannot buy a shorter window than a long one. _estimateAirtimeMs falls back to a fixed 50 ms when the radio parameters are unset and there is no seam to set them, so it passed for the wrong reason. The gap is recorded in the test file instead. Not in this change: extending the 30 s late-ACK grace. The 76521 ms sample in the capture says the tail exceeds it, but that sample may be a store-and-forward delivery rather than a live round trip and it has not been checked. |
19 hours ago |
|
|
0c0119ed2a |
fix(#1223): re-establish a pinned route once per send (owner ruling)
The flood fallback clears the stored path on the radio, so without this a hand-picked route stopped being honoured after one bad send while the UI still claimed it. That is the silent failure that got "Direct" removed, so leaving it was not an option. Owner ruled option (a): re-push the override once at the start of each send. This is not the defect #1198 removed. That was a client-side snapshot of a path the RADIO had learned, re-asserted before every attempt, able to overwrite a fresher route the radio had just picked up off the air. This is the user's own explicit choice, written once, at the start of a send, and it has to be written because the previous send's final attempt may have cleared it. One write per send, never one per attempt. `RetryServiceConfig.setContactPath` now carries `hashWidth`. The callback dropped it, so a 2-byte route would have been written at width 1 and re-read as twice as many 1-byte hops, routing to the wrong nodes (#279). That trap was latent while no path write existed on this path; adding one back makes it reachable, so the signature closes it. Tests: a pinned route is written exactly once per send and at the width it was captured at, and the retry after it writes nothing. |
19 hours ago |
|
|
1bab9e37b7 |
fix(#1223): make the DM flood fallback unconditional, retire Direct
Clearing the stored path and flooding is the only recovery the wire protocol offers: the radio routes a DM direct whenever it holds a path, there is no per-send routing field, and flood is how the mesh teaches it a new route. That makes the fallback part of sending a DM, not a preference. Owner rulings on #1222: R1(b): `autoRouteRotationEnabled` is deleted rather than flipped. It shipped false, so the fallback was unreachable out of the box. Deleting it also un-hides the route-weight and "Max Message Retries" sliders, which were behind that toggle while their values applied to every send regardless. `preparePathForContactSend` keeps flag-off behaviour explicitly: dropping the gate there would have switched repeater, room and telemetry command sends over to rotated paths, which nobody ruled on. R2(a): "Direct" is removed. A forced zero-hop path bought no reachability, because a DM is matched on the destination hash with no check of route type or path position, and Auto already settles on zero hops for a real neighbour. What it did buy was a sticky mode that suppressed the fallback and failed silently once the contact moved out of range. A zero-hop override is normalised to Auto at every entry point: setPathOverride, both contact stores on load, path resolution, and the labels. Nobody is stranded in a mode the UI no longer offers. R3(b): `clearPathOnMaxRetry` is retired. It fired after the last attempt had already failed, so it could only ever help the next message, and the final attempt now clears the path itself. R4(a): the final attempt floods even for a hand-picked path. An override still chooses the route for every earlier attempt. Tests, three of four proven to fail against the old gating: the selector runs with no settings service wired at all (was skipped entirely), a zero-hop override does not suppress it, the fallback does not depend on the path-history service existing, and an override floods on its final attempt while writing no path to the radio. Not in this change: the dead l10n keys the removed toggles leave behind, and what should re-establish a user's pinned route after the final flood clears it on the radio. Both noted on #1223. |
19 hours ago |
|
|
547d399399 |
feat(#1213): notice a run that ended badly
A run marker records whether the app is on screen and whether an unhandled Dart error happened; a clean exit removes it (awaited before a desktop window closes). At the next start, a marker left on screen is an unexpected exit, one left in the background is the OS reclaiming memory and is not offered, and an unreadable one is asked about. New Android ANR and crash exit records (not backfill) name the failure. Failed image loads do not count. On web only an unhandled error counts, since closing a tab is not an exit Flutter sees. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
1 day ago |
|
|
cf9206478b |
feat(#1211): web package from the in-memory log, redacted
Web has no log files, so textPackageZip zips the log text the screen hands over, through the same redactor, with the manifest. Also from the Gemini review: log files are now redacted as a stream, line by line, and old packages are cleaned from their own temp folder instead of by listing the whole temp directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
1 day ago |
|
|
49b11e3ec5 |
feat(#1209): upload client that never loses the package
Seals the zip to Offband's public key (key id 7fbd1b06, made by offband_logs.py keygen) and POSTs it to logs.offband.app. A 201 must carry a well-formed code; 413, 429, 400/411, other statuses, no network and no answer each come back as their own failure, never a throw, so the screen keeps the package and offers Retry. A package over 25 MB once sealed is refused before anything is sent. The note is trimmed and percent-encoded; a blank note sends no header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
1 day ago |
|
|
1246b1ddc4 |
feat(#1208): seal log packages to Offband's public key
Ephemeral X25519, HKDF-SHA256 and AES-256-GCM with the 53-byte header as additional data, in the format the log-intake Worker checks. Uses the vetted cryptography package (2.9.0). The test vectors come from Python's cryptography library via tools/logs/make_envelope_vectors.py, an implementation independent of the app, and the Dart output matches them byte for byte; the pull tool will open the same vectors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
1 day ago |
|
|
2cc5135e46 |
feat(#1206): one log package for Share, Save and Send
LogPackage gathers every log file and the Android exit traces, re-runs the redactor over each line oldest first (so logs written by earlier builds lose their passwords too), and adds manifest.json with the app version, commit, platform, OS and radio model, firmware and caps. Share and Save now hand over these redacted copies, never the files in the log folder. zip() is what Send to Offband will upload. archive moves from transitive to direct at the locked 4.0.9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
1 day ago |
|
|
16ca4fd6a6 |
feat(#1158): refuse a local CLI send the radio can't run, and say why
Epic #1155, owner decision 2 (2026-11-19): block the write, not only the button. LocalCliService.run refuses before building frame 66 when supportsLocalCli is false: nothing is sent, a warning is logged (without the command text, which may hold a secret), and LocalCliUnsupported is thrown. LocalCliTransport maps it to CliConsoleUnsupported, and the console adds a row that stays in the transcript: "<cmd>: not sent. Your radio's firmware doesn't support the device CLI." English key only; untranslated.json regenerated (17 locales fall back to English). The existing local CLI suites now connect a stock 1.18 radio first, since an unclassified connector no longer sends frame 66. Tests: 40 pass across the service, console and transport suites. With the refusal check removed, the 2 refusal tests fail. Agent: BrightForge (session 440fbe94) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
3 days ago |
|
|
43ec4d2fa3 |
fix(#1122): log every notify-mode save and notify decision
The exported log could not show what the client did when a channel's phone notify mode was set, or why a channel message notified, so #1121 could not be diagnosed from a log. - Every notify-mode save logs radio, slot, channel, a one-way PSK fingerprint, old mode with its source, new mode, and the read-back. A save refused for a missing radio key or PSK logs as an error. - Any change to the notify table, by any path, logs before and after. Settings that fail to parse at startup, or fail to write, log errors. - The notify dialog and the channel action sheet log what they show. - Every incoming channel message logs its notify decision: which channel the slot held, from the live or cached list, the mode and where it came from, and posted or suppressed with the reason. - NotificationService queue, batch, suppress and failure paths go to the app log instead of debugPrint. - The app version is logged at startup and on every connect. - appLogger no longer drops messages when the in-app log view is off; the log file always receives them, as connector lines already did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
3 weeks ago |
|
|
7e5a6de8d0 |
fix(#1117): slot 0 is Public's, on every add path
The firmware shipping next (firmware-base, #1896) refuses any channel but Public in slot 0, even while it is empty, refuses Public in any other slot, and refuses clearing Public. Every refusal is ERR_CODE_BAD_STATE, the same code as an occupied slot, so the client has to avoid them, not interpret them. Owner rulings, 2026-10-28: slot 0 "should always remain public", "make sure Public can't be deleted", "Of course add the real public". - decideChannelSlot takes a required isPublic. Public goes to slot 0 when it is free; nothing else ever does. The fallback that lets Public take another free slot is reached only when slot 0 holds some other channel, which happens only on older firmware. - The shared allocator takes the key being written and decides from it, so Join Public, a typed private key, a QR share and a hashtag join all follow the rule, and a second Public is refused on every one of them. - planChannelImport follows the same rule for a stock config file. - Deleting Public is refused at the attempt with "Public can't be removed from the radio. It always stays in slot 0." The control stays live. - Edit Channel locks Public's key, and refuses typing Public's key into another channel while Public is on the radio. - A hashtag join of "public" (leading # and spaces and trailing spaces dropped, any case: the device's namesPublic rule) adds the real Public, not sha256("#public"). The #1022 test that asserted Public has no claim on slot 0 is replaced by tests for the rule above. On older firmware, slot 0 is no longer handed to other channels, so one slot of 40 goes unused there. That follows the owner's ruling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
3 weeks ago |
|
|
8e345d8b63 |
fix(#1111): name Offband in tile requests and show the OSM credit on every map
The OSMF tile policy requires a distinct, stable User-Agent naming the app and visible OpenStreetMap attribution. Every tile request sent upstream's 'flutter_map (com.meshcore.open)', and no map showed any credit. All six maps share one tile provider, which now carries 'OffbandMeshCore (app.offband.meshcore; +https://offband.org)'; the area download adds caller headers to it instead of replacing it. Web sends none, since the browser sets its own. Each map gets '© OpenStreetMap contributors' as the last child of its stack, linking to the OSM copyright page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
3 weeks ago |
|
|
9a5cd0caf7 |
fix(#1023): every add-channel path chooses its slot at the write
The channels screen was fixed in #1022, but two more surfaces chose a channel slot on their own and had the same race. Community QR scanner: - A channel share link picked its slot before the confirm dialog and wrote it after, so a sync during the confirmation (setChannel itself starts one) could leave it pointing at an occupied slot. The slot is now chosen after the user confirms, and a refusal keeps the screen open with the reason showing. - Joining a community skipped the public channel silently when the radio was full and still showed the green "joined" toast. A refusal now explains itself, and the green toast shows only when the channel was actually written. - Its private slot finder is deleted. Config import: - planChannelImport takes a required isSyncing. Mid-sync the connector's channel list is empty, so the planner would have written every incoming channel from slot 0 up, over Public. It now plans nothing and reports each channel as skipped with a new channelsSyncing reason. The parameter is required so a caller cannot forget it and get the unsafe behavior by default. Both screens now share allocateChannelSlotOrExplain (lib/helpers/channel_slot_ui.dart), so the "which slot is free" question has a single answer. channels_noFreeSlot is retired; its only caller moved to the shared message. Tests: two planner tests for the syncing case, mutation-checked (with the guard disabled both fail). Full suite 1781 pass, analyze clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
3 weeks ago |
|
|
747653af90 |
fix(#1065): drop the observer-config version gate too, bit only
Owner reaffirmed: do not depend on FIRMWARE_VER_CODE, depend on caps bits. The 0xC0 config gate ANDed OFFBAND_CONFIG_MIN_VER (14) on top of the OFFBAND_CAP_WIFI_OBSERVER bit, which left it passing at zero margin once the code rolled back onto 14. Removed; supportsConfig now takes only offbandCaps. The bit is the sounder signal: caps byte 1 exists only on fork replies, which are the only replies that carry 0xC0 at all, and a build without the observer backend compiled in leaves the bit clear whatever version it reports. minVerCode is deleted rather than left unused, so it cannot be reintroduced into a gate. Two call sites and four tests updated. Four gates now depend on caps bits alone: block, caplog, packet hash, observer config. Those are all of the readers in the conflated 14-22 range. Full suite: 1739 passed. |
4 weeks ago |
|
|
15754624d5 |
fix(#999): offer the companion CLI console only on a 1.18 radio
The companion "CLI console" entry was gated only on the target being a companion. A pre-1.18 radio, including Offband before the absorb, refuses a type-3 send: companion-v1.17.1 CMD_SEND_TXT_MSG accepts only plain and CLI_DATA and answers anything else with ERR_CODE_UNSUPPORTED_CMD (companion-v1.18.0 adds CLI_COMMAND). The connector only logs error frames, so the command waited out its mesh timeout and the console showed the #891 row, which blames the target for a limit of the user's own radio. - Gate: DeviceCliScreen.offersRemoteConsole requires a companion target AND a connected radio that speaks the 1.18 CLI (allowsCliFrame, the same check that gates the local Device CLI; type-3 send and frame 66 shipped together in 1.18). Disconnected or unclassified offers nothing. The chat menu uses it. - Fail fast: RemoteCliTransport fails the command at once with CliConsoleUnsupported when the radio refuses the send. The window arms only when the text frame is written (the onAttempt hook, after the path update) and closes on the command's SENT, which on 1.18 carries an expected-ack of 0. So an unrelated unknown-command refusal before the write, or a DM's SENT, cannot be pinned on this command. Dispose releases a command still waiting. - Console: a refused send shows "<command>: not sent. Your radio's firmware doesn't support remote CLI." (owner-approved), not the timeout row. Tests: the gate (positive and negative across populations, roles, and disconnected); fail-fast on the refusal, ignoring other codes, errors after the radio accepted the send, a DM's SENT, an error before the write, and dispose; the console row. Reviewed by a one-off Sonnet adversarial pass (Gemini budget down). Its Medium finding, that the window armed at run() before the write, is fixed here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
1 month ago |
|
|
3e40979e94 |
feat(#999): remote-CLI console for a companion, kept out of chat
Extend the one CLI console (device_cli_screen, F2 #883/#884) to target a permitted companion over the mesh (TXT type 3, #888/#889), reusing the console rather than adding a screen or a chat-borne command path. Opened from a "CLI console" action on a companion contact; command and reply both live in the console. - cli_console_transport.dart: CliConsoleTransport with a local and a remote implementation, and one CliConsoleTimeout the console catches. The remote transport sends with retries: 1 (no auto-retry - an unpermitted companion queues the command and never replies, so a retry only spams the mesh) and correlates the reply via the receivedFrames listener, gated to CLI_DATA so a chat message or inbound command from the same contact can't complete it (Sonnet review). - device_cli_screen: optional remoteContact; "Remote CLI" + contact name. - chat_screen: companion-only "CLI console" entry (Contact.isCompanion). Also corrects #890: CLI and chat are separate surfaces. The receive pipeline filed every contact frame into the conversation regardless of TXT type, so a companion's CLI reply (type 1) and an inbound command (type 3) leaked into the chat thread. A guard now drops CLI-typed messages from the message pipeline - the console is their only surface - and #890's in-chat command bubble is removed. Review (Sonnet, one-off, Gemini budget down): redact secret reply text in the remote path's late/unmatched log, matching LocalCliService; dispose cancels the subscription; document that remote truncation is not detectable post-reassembly. Tests: transport round-trip / sender-filter / timeout / no-retry / CLI_DATA gate; Contact.isCompanion; remote console title; and the pipeline keeping CLI (type 1 and 3) out of the conversation while a plain message still enters. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
1 month ago |
|
|
d476734aac |
feat(#889): route CLI to companions by target role
F3/E3.1 target split. The command service now picks the message type by the target contact's role: a companion (chat) gets TXT_TYPE_CLI_COMMAND (type 3), a repeater/room server keeps the universal CLI_DATA (type 1) it has always used. One line in the send path; the reply handling, correlation and timeout model (which already carries the 600 ms companion reply hold) are unchanged and serve both. Companion replies come back as CLI_DATA (verified: MyMesh.cpp companion), so the existing contact-agnostic reply listener routes them to handleResponse unchanged; a UI entry point to open the CLI console for a companion is the remaining downstream piece. Tests: a real send proves companion -> type 3 and repeater -> type 1, driven deterministically off the send frame. Full suite green (1432); Gemini review: test race fixed, the reply-path concern refuted against the source-verified CLI_DATA reply. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
1 month ago |
|
|
3a0ad8f273 |
feat(#750): separate what a node calls itself from what the user calls it
Task 750.1 of the contact-naming plan: model and storage. Stock MeshCore has a per-node CUSTOM NAME field and keeps the original underneath; Offband could not rename a contact at all. Contact gains receivedName (the name the mesh gave us, wire and storage) and customName (the user's label, client-side only). name becomes a getter returning customName ?? receivedName, so all 85 existing display reads stay correct and a future read cannot forget. Empty and whitespace-only custom names count as unset at both the getter and the store, so clearing the field cannot leave a contact blank with no way back. The constructor and copyWith take receivedName, which made the rename a compile error at every write site. The compiler enumerated 23 of them across 5 lib files and 11 test files; none was found by reading. The advert handler is the one that matters: receivedName now updates while customName is untouched, so an advert improves accuracy without moving what the user sees. That was the defect making a client-held name impossible. customName is deliberately NOT in contact_store. That record is rebuilt from radio contact-sync data where no custom name exists, so a save after a sync would wipe it. It lives in contact_settings_store keyed by pubkey hex, which a sync cannot reach. Both stores persist receivedName, never the getter. The plan's correction on #750 found that persisting the getter is one-way data loss: the custom name would be read back as the received name and the real one destroyed with no advert able to restore it. The ?? 'Unknown' fallback is kept with a comment, since the rename is exactly the edit that drops a trailing fallback and would crash the load for a legacy row. 19 tests, positive and negative. T31 and T32 were falsified before being trusted: breaking the persist and the fallback made exactly those two fail and nothing else. Gates: analyze --fatal-infos --fatal-warnings clean, dart format 0-changed, 1305 tests passed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
1 month ago |
|
|
a475cc21b4 |
task(#937): B2+B3 path history and delivery observations per radio
Both scoped by the device-key prefix, and the legacy untagged data deleted per the owner's decision 1 rather than orphaned. **#854 path history: per radio AND out of SharedPreferences.** Two changes in one migration, because doing them separately means two migrations over the same data. The key was prefix + contact, so a route measured by a 1 W handheld was applied to a repeater and the reverse. It now lives in drift as prefix + device key + contact. The move out of prefs is not gold-plating: that one store held 2,092 keys and 86% of a 4.28 MB file, and every prefs write on Windows re-encodes the whole file (#923). This resolves #924 and makes every unrelated settings write cheaper in proportion. **#856 delivery observations: per radio, staying in prefs.** A repeater's 45-second deliveries were training the ACK-timeout model a 1 W handheld then used. One small key, 3,091 bytes and 14 entries on the owner's install, so unlike path history there is no cost argument for moving it and a move would be churn. **The legacy purge is chunked, and that is measured rather than guessed.** Each prefs `remove` re-encodes and rewrites the whole file, so I measured the real sequence against the owner's live prefs before designing it: 2,092 keys, 12.7 s of total work, mean 6.1 ms, but 32 ms for the first removal and under 1 ms by the last, because the file collapses from 4.28 MB to 45 KB as it goes. I had assumed ~57 s and was wrong; it is tractable. One unbroken pass would still block for 12.7 s, well past the 5 s watchdog, which is the exact failure #917 just fixed. So it yields every 20 removals. It runs after the startup loads so it never delays first paint, and it is idempotent: no writes once there is nothing left, so running it on every connect is safe. Legacy and new cannot be confused, which is what makes the purge safe: the new scheme writes to drift and the legacy keys are in prefs, so no length or shape heuristic is needed to tell them apart. That is decision 2 making decision 1 unambiguous. **Wiring:** StorageService is shared with PathHistoryService and TimeoutPredictionService, so the connector cannot own it like the other per-radio stores. It is injected from main() and fed the device key on SELF_INFO alongside them. Unset, both surfaces load nothing and never write, so a read before the handshake cannot serve another radio's data (#754 precedent). **Tests: Epic A's bleed tests inverted, 11 of them.** Every expectation that demanded the bleed now demands isolation, and the before/after is the git history of one file. Plus the purges: prefix-only, idempotent, and the scoped data surviving the purge of the unscoped. **Not done, and flagged rather than dropped:** the plan's B2 also said "bound what persists to what PathHistoryService actually caches". That bound existed to stop the prefs file growing. In drift a write costs one row and growth costs nothing per write, so the bound would now delete regenerable route history for no benefit. Skipping it is a judgement, not an oversight, and it is called out here and in the PR. The inventory's known-holes set is empty for the first time: {854, 855, 856} at Epic B's start, then {854, 856} after B1, now none. An Epic A sanity assertion that holes must exist failed on that and was corrected, because the invariant that matters is conditional: if a hole is declared it must name an issue, and empty satisfies it. Citadel: meshcore-open-0z3, meshcore-open-z8t Refs #937, #854, #856, #924, #853 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
1 month ago |
|
|
a7882b62e0 |
task(#937): B1 delete the dead pending_messages API
#855 was filed as "pending messages are stored globally, not per radio". It is not a scoping bug. `loadPendingMessages`, `savePendingMessages` and `clearPendingMessages` had no callers anywhere in lib/ or test/, and the key was absent from the owner's live prefs. The `_pendingMessages` field in message_retry_service.dart is an unrelated in-memory list that happens to share the name. So the surface is DELETED, not scoped: three methods and the key constant. Scoping it per radio would have been three careful changes and a migration decision, for an API nothing calls. This is the finding that justified consolidating #854, #855 and #856 into one Epic instead of landing three PRs. Nobody reading #855 on its own would have gone looking for callers, because the issue already told them what the fix was. Removed with it: - the inventory row, replaced by a comment saying the surface is GONE rather than reclassified, so the history is readable - A2's round-trip test, whose job was to prove the thing being deleted actually worked. It served that and then became a test of nothing - 855 from the known-holes expectation, which now reads {854, 856}; that set shrinking to empty is what closing Epic B looks like What still guards it: the inventory's "declared but vanished from source" check fires if `pending_messages` ever comes back undeclared. Citadel: meshcore-open-li1 Refs #937, #855, #853 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
1 month ago |
|
|
5f856f10c9 |
task(#936): A2 reproduce the two remaining bleeds against the real store
Five tests pinning exactly what bleeds today, so Epic B has something concrete to invert and cannot quietly half-fix it. They use the REAL StorageService against real prefs, not the FakeStorageService the existing path-history tests use, because the defect is in the KEY rather than the service logic and a fake hides it entirely. #854: the stored key is prefix + contact with no radio component, and a 7-hop route saved by one radio is served verbatim to another. A route measured by a 1 W handheld gets applied to a repeater. #856: observations live under one global key, and a service standing in for a second radio starts up with the first radio's 45-second observation already in its training data, having sent nothing. #855: a round-trip test only, pinning that the API works before Epic B deletes it, so the deletion is provably removal of dead code rather than of a live feature. That it has no callers is a grep result recorded in the inventory, which a unit test cannot assert. These assert the BUG deliberately and are named so nobody mistakes them for desired behaviour: each title says BUG and names what Epic B replaces it with. The plan's A2 asked for genuinely-red tests; a red test cannot merge, and Epic A's PR has to land before Epic B starts, so these are characterization tests instead. They demonstrate the bleed just as concretely and go red the moment it stops, which is the property that matters. Flagged here rather than quietly substituted. Two API names in the first draft were invented (loadHistoryFor, loadObservations) and did not exist. Replaced with the real ones after reading the services: the path-history case now exercises StorageService directly, which is where the defect actually is. Citadel: meshcore-open-ss9 Refs #936, #853, #854, #855, #856 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
1 month ago |
|
|
4ab969b7a1 |
feat(#931): second ANR trigger that blocks the Dart isolate, not Kotlin
The existing trigger hangs the Android main thread, so its trace is a Java stack. That proved the capture works and that our Kotlin frames resolve via the R8 mapping, but it cannot say whether our own DART frames survive into a trace, which is the question #906 was filed to answer. This one blocks the Dart UI isolate the way the real ANRs do rather than with an artificial spin: it repeatedly JSON-encodes a large nested structure shaped like the stores #334 is about. The Play clusters show the real ANRs inside the JSON stringifier and under allocation pressure, so a trace from this block should match their shape, and whether any of our Dart frames appear above those is then readable. It spins deliberately. Any await in the loop would yield to the event loop, the isolate would keep answering input, and no ANR would fire. If the process survives the full duration it logs why, so the tester is not left guessing. Gating is unchanged and still doubled: the bool.fromEnvironment constant keeps both rows out of any shipped build, and the owner-only Experimental section hides them again in a test build. Both rows are relabelled native side and Dart side so they are distinguishable. Tests: both triggers asserted to be immediate no-ops off Android, which matters because a missing platform guard would hang a desktop build instead of failing visibly. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
1 month ago |
|
|
0a08ef7b06 |
test(#910): exit-record selection, formatting, pruning and rotation
43 tests. Selection covers the dedup contract: strictly-newer only, a record equal to the watermark treated as already logged, two records in one millisecond both kept, the watermark taking the highest rather than the first, and the backfill trace cap. Formatting covers the cases that would otherwise read wrong: zero pss and rss render as unknown rather than as a real measurement, a null description is omitted rather than printed, an absent trace records why, and a backfilled record says so. Every message the service can surface is asserted present for its own failure, and an ideal line is asserted to carry none of the failure markers. The channel layer runs behind a mock handler, which proves the watermark advances on success, does not move on a query failure so the next launch retries, and that collect never throws and runs once per launch. What these cannot prove, stated in the test file header: that Android actually produces a REASON_ANR record with a readable trace. That needs a real main-thread block on an API 30+ device and a relaunch, which is #911 part B. The rotation tests pin down what a 40 KB entry actually does, which is the Epic's rotation criterion: it rotates once and is written whole, the active file is then legitimately above maxBytes because that gate decides when to rotate rather than truncating, and maxFiles still holds so the log cannot grow without bound. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
1 month ago |
|
|
3055aab931
|
epic(#868): companion CLI codec, service, console + entry (F2/E2.1) (#903)
* feat(#881): frame 66/29 CLI codec with cc| correlation Pure codec per the 1.18 contract: ASCII fail-closed builds, lenient reply decode, truncation bound judged on the raw payload. Gemini findings 1+2 fixed, 4 documented. Agent: GentleGlacier (session f0c92a36) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(#882): local CLI service + shared cc| correlation helpers PrefixAllocator and splitCorrelated extracted; the repeater service delegates unchanged in behavior. LocalCliService runs correlated frame-66 round trips; the connector routes RESP 29 to listeners. Agent: GentleGlacier (session f0c92a36) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(#883): device CLI console screen The local-device counterpart of the repeater CLI screen (interop plan F2/E2.1): type a command, it goes to the connected radio over frame 66/29 via LocalCliService, and the correlated reply renders with a per-reply latency chip. No path/flood selection and no retries - one send, one frame-level timeout window surfaced as its own row. Built to the owner-approved behaviors: masked secret replies (long-press to copy, cleartext never in the widget tree), the 165-byte truncation badge, string-matched error styling, and command history. Entry point and population gating are #884, deliberately not here. Security fix surfaced by the #883 Gemini review: LocalCliService logged the cleartext of an unmatched (late) reply, so a secret reply arriving after its command timed out could leak to the app log despite the screen's masking. The log line now withholds the reply text (token + byte length only); a test pins it. Also replaces em-dash characters in the sibling E2.1 files flagged by the #464 CI guard. Tests: 12 widget tests for the screen and a service test for the log redaction. Full suite green (1207 passed). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * refactor(#902): declutter Settings - user-ops to Actions, reorder Debug Owner-directed Settings hygiene, split from the #884 entry point so the Device CLI row lands in a clean Debug pane. Moved to the Actions pane (they are user operations, not diagnostics): config Export/Import and the three GPX exports (the whole export card), plus "Sync queued messages now". Debug pane reordered to App Debug Logging, Companion Debug, App Debug, Serial Capture, Mesh Topology (which stays - useful diagnosing with a user). The Device CLI row at the top is #884, not here. Behavior preserved: every row keeps its handler, icon and copy; only their pane and order changed. Tests: a new widget test pins the spec - the moved rows present under Actions and absent from Debug, and the full Debug order. A Gemini review finding of a Debug-ordering defect was refuted (the order matches the spec; the review misread the toggle for the viewer); its secondary point was taken and the test now pins the full order. Full suite green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(#884): Device CLI entry point + capability gate Adds the entry point for the console (screen landed in #883) to Settings > Debug. A "Device CLI" row appears at the TOP of the Debug pane only when the classifier places the connected radio at stock v14+ (classification.allowsCliFrame): stock 1.18+ today, Offband at the upstream-1.18 absorb via the D1 seam. The row is absent on stock-legacy, Offband, and when disconnected (classification null). Tapping it opens DeviceCliScreen. The gate reads the capability through context.select, so only that boolean flipping rebuilds the pane, not every connector update (#81). Depends on the classifier from dev (merged into this branch). Tests: positive (stock 1.18 shows at top, opens the console) and three negatives (disconnected, stock-legacy ver 13, Offband all hidden). Per the Gemini review the test's frame helper now asserts the version fits. Full suite green (1244 passed). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#881): dart format the codec test (CI format gate) test/cli_command_codec_test.dart (landed in #881) was not formatted, so the branch's first run of the "analyze" job (flutter analyze --fatal-infos + dart format --set-exit-if-changed .) failed on it. No logic change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(#885): mirror set-name character rejection + CLI l10n The firmware's `set name` rejects the characters [ ] \ : , ? * and bounces a bad name as a cryptic ERROR. Mirror that client-side so the name is caught before it is sent, in both places a name is set: - Settings node-name dialog: live inline error, Save blocked on an invalid name (nothing sent). - Device CLI console: a `set name <value>` with a forbidden char is echoed with a rejection row and never sent; the device stays the authority for everything else. Shared validator in lib/helpers/device_name_validator.dart (forbiddenCharsIn is distinct + canonical-order). Also moves the "Sync queued messages now" row strings and the new validation messages onto app l10n (EN copy unchanged). Tests: validator unit (the exact seven chars, order-stable, deduped), console pos/neg (+ rejected command still recallable from history, per the Gemini review), and the Settings dialog pos/neg. Gemini review otherwise clean; its one finding (rejected command not in history) was refuted - history derives from the transcript, which the rejection path appends to - and pinned with a test. Full suite green (1255 passed). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: diffwireauto <330573775+diffwireauto@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
1 month ago |
|
|
285249ae7c |
fix(#848): scope channel notify modes per radio, kill index fallback
Channel notify modes lived in one global AppSettings map keyed by PSK or a bare slot index, so one radio's settings bled into another and set-and-back could not clear a stale alias (#839). Scope them by the connected device-key prefix like every other per-radio store (prefix -> pskHex -> mode); resolve All when the radio or PSK is unknown instead of falling back to the slot index; store a single entry per channel so All truly resets. One-time migration moves the legacy flat map and name-keyed mute set into the first radio synced after upgrade; later radios start clean. Removed the now-unused legacy muteChannel/unmuteChannel/isChannelMuted methods so mutedChannels is no longer a second, cross-radio source of truth (pre-PR Gemini review finding). Buzzer Inherit (#544/#545) reads the same path and inherits the fix. Epic #844. Build #848. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
1 month ago |
|
|
2ff7c71aa4 |
fix(#825): guard RegionDiscoveryService notify after dispose
Pre-PR Gemini review (Epic #814) flagged a use-after-dispose: if the screen pops while a discovery is in flight, the completing future would call notifyListeners on the disposed service and throw. Added a _disposed flag + _safeNotify guard + dispose override, with a regression test that disposes mid-discovery. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
1 month ago |
|
|
a096d6eae9 |
feat(#825): region discovery lifecycle service (Epic #814 B1)
RegionDiscoveryService (ChangeNotifier) drives one discovery run via an injected discoverer function and exposes a distinct state for each outcome: idle/loading/success/empty/timeout/error. Regions deduped by Region value-equality. Concurrent starts ignored. Injected seam keeps it unit-testable without a live connector. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
1 month ago |
|
|
e054d894f5
|
Merge pull request #744 from OffbandMesh/feat/726-preset-catalog
epic(#726): in-app radio preset catalog and picker (Companion/Observer) |
2 months ago |
|
|
04025cb070 |
test(#748): fetch the real preset files so a 404 fails CI
Every preset test faked the network, so presets missing from config-profiles main passed them all and reached the owner as "Couldn't update presets" on a test build twice. The live test refreshes from the real URLs and fails on any refresh error; a second live test proves a missing file comes back as HTTP 404. The picker test now checks that a good refresh shows no error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
2 months ago |
|
|
e990cc1f7c |
fix(#711): drain serial on each callback; never drop bytes silently
Two app-side halves of the #702 fix. The native USB service read one 8 KB chunk per flserial callback, which left the rest of a burst waiting in the native ring. It now drains until the ring is empty, bounded at 32 reads (the ring's 256 KB) so a stuck read cannot spin. The frame decoder skipped bytes it could not frame (noise, an oversized length) without a word, so when bytes were lost upstream, whole frames vanished with no trace. It now counts them and keeps the first 16; the native USB, web USB and TCP services log each batch as an error with the count and a hex sample (SAFELANE 6). The web service shares the decoder, so it gets the same logging, matching the plan's "all transports" intent. Tests cover no report on clean input, noise before a frame, an oversized header, take-once, the capped sample and reset; with the count disabled, 4 fail. Epic #702. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
2 months ago |
|
|
67158bcc9d |
fix(#732): apply pre-PR review to the preset catalog
RadioPreset.frequencyHz returned kHz; renamed frequencyKHz (the unit CMD_SET_RADIO_PARAMS carries). The picker is disabled while a refresh runs, so a pick can't vanish when the refreshed list lands, and the selected-item builder uses an id-to-title map. Epic: #726 Agent: MagentaHawk (session 5a8922d6) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
2 months ago |
|
|
3c7c4d9d65 |
feat(#728): load radio presets from bundled copies and refresh them from config-profiles
RadioPresetService starts from the last good copy of each preset file, or the copy bundled in assets/radio_presets/ (config-profiles 857d4e9), so the picker works offline. refresh() fetches both files from config-profiles; each file that parses becomes the new saved copy, and one that fails or comes back empty never replaces a good one. Failures are logged and kept in refreshError for the picker to show. refreshIfStale() refreshes at most every 12 hours. The merged list puts the overlay over upstream on a matching title, sorted by region. An overlay edit in config-profiles therefore reaches users on their next refresh with no app release (test: "an overlay edit reaches the app with no new build"). Closes the gap recorded in #648. Epic: #726 Agent: MagentaHawk (session 5a8922d6) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
2 months ago |
|
|
9741c3399d |
fix(#575): apply pre-PR review, stop claiming unconfirmed import success
Adversarial review raised three findings. Two survived verification. Rejected: a claimed RangeError when abbreviating a short public key. The code already guards with a length check before either substring, so the crash it describes cannot occur. Rejected as described, fixed as found: contact position (0, 0) was said to be dropped on import. It is not. The frame builder writes the position block whenever lastModified is present, which it always is here, so a suppressed position still writes 0/0 and the bytes are identical either way. The hasPosition conditional was therefore doing nothing except misleading a reader, which is exactly what happened. Removed, and the behavior is pinned with a test. Accepted: the service added sections to 'applied' after sendFrame returned, which only means the frame left our side. A lost or refused frame was indistinguishable from success, so the user could be told an import worked when nothing changed on the device. A correct fix needs an awaited per-command acknowledgement in the connector, keyed on command code so concurrent commands cannot steal each other's OK. That is real connector work and is filed as #584. What is fixed here is the overclaim: 'applied' and the two counts are documented as sent rather than confirmed, and the result string now reads 'Sent N contacts and M channels to the device'. The code no longer states something it cannot know. |
2 months ago |
|
|
ee1ba064ac |
feat(#575): stock config import service
Applies a stock config file to the device with stock's own merge semantics, quoted from its Import Config screen: - contacts are upserted on public key, and nothing is ever deleted - channels are additive only, so a rotated PSK for a channel the user already has does not apply - importing an identity overwrites the node outright We match that behavior but not its silence. Every skipped channel comes back named, with a reason, so the UI can show it; a channel that quietly did not import is the silent no-op SAFELANE section 6 forbids. The channel merge rule is extracted as planChannelImport, a pure function, so the surprising part is testable without a radio. It treats a channel as already present when either its PSK or its name matches, which is the non-destructive reading of a rule stock states without defining. Pinning down what stock actually does is a T1 question, recorded in the doc comment. New channels take the lowest free slot, since the file carries no index. other_settings is reported as not fully writable rather than claimed as applied: buildSetOtherParamsFrame deliberately pins the auto-add-contacts byte, so manual_add_contacts cannot be written without changing app-wide behavior. Advert location policy is applied. 10 tests over the planner and the result type. |
2 months ago |
|
|
16c2b4a770 |
feat(#573): stock config export service
Gathers live device state into a StockConfig, section by section, matching stock's Export Config screen where each section is independently selectable and the file simply omits what was not ticked. A requested section that cannot be gathered is reported in the result rather than dropped, with the reason kept specific: unsupported (firmware built without identity export) is distinct from noReply and rejected, so the export screen can say the radio cannot do it instead of offering a pointless retry. Two unit traps handled explicitly: - currentFreqHz is misnamed; the value is kHz, which is also what stock's frequency field carries, so it passes through unconverted. currentBwHz really is Hz. The mismatch exists in both our state and the file. - other_settings.manual_add_contacts must be the raw device byte. The connector's _manualAddContacts is an inverted derived view of bit 0 (firmware treats a clear bit as auto-add enabled), so exporting it would have written the wrong value. The raw byte is now retained and exposed, with the inversion documented at the parse site. No behavior change. Path mapping keeps our hash count and per-hop width (#309) intact: stock encodes one hash per comma-separated element, so the width survives as element length. A flood route, an over-long declared hop count, or a width stock cannot express all yield no path rather than a guessed one. 13 tests over the pure mapping functions. |
2 months ago |
|
|
d27048f94a |
fix(#678): distinguish CoreScope not-found from unreachable (#571)
CoreScopeService.fetchCounts returns a three-state CoreScopeResult { found | notFound | unreachable } instead of a nullable count. Reachable-but-empty -> notFound ('Not seen by CoreScope yet'); network/HTTP/parse error -> unreachable. Channel-chat tap-refresh banner switches on status; adaptive poll reads .counts.
Epic #677. Closes #571.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2 months ago |
|
|
edffd10555 |
fix(#581): adopt the radio's RESP_CODE_SENT ACK hash for send correlation
The radio is authoritative for the expected-ACK hash it reports, but the client looked that hash up in a map keyed by a hash it recomputed locally. When the two disagreed the lookup missed silently (debugPrint only), the 8000ms watchdog from #395 marked the message failed, and the genuine ACK later matched nothing because every downstream map is populated only on the match path. Delivery worked the whole time. Captured on a Wadamesh HV4 TFT in #449: five DMs, all shown as errors, two with a confirmed ACK whose hash equalled the radio's RESP_CODE_SENT value exactly. Wadamesh builds the payload differently, so the client cannot predict its digest, and Offband is expected to work against stock MeshCore, Wadamesh and other forks. RESP_CODE_SENT is the reply to our own CMD_SEND_TXT_MSG, so adopt the radio's value when exactly one send awaits confirmation. Zero or several candidates keep the previous behaviour rather than guessing. Channel sends draw the same frame, so adoption is refused while one is outstanding. The lookup miss is now a warn on debugLogService instead of a bare debugPrint (SAFELANE section 6). A send-order correlation queue was developed alongside this and has been split out: its ordering premise needs a transport send mutex that does not exist yet, and three review rounds each found a fresh defect in it. This commit deliberately carries only the adoption fallback, which is what the owner's hardware test validated. Refs #449 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
2 months ago |
|
|
e145ef7481 |
fix(#528): apply the three accepted Gemini review findings
1. An unprefixed reply no longer resolves an arbitrary pending command. #532 constrained prefixed replies only; the unprefixed fallback still used firstWhere, which with two or more in flight is map-iteration order, so a caller could receive another command's output. The fallback cannot just be deleted: firmware only echoes the prefix when the command exceeds four characters including it (simple_repeater/MyMesh.cpp, strlen(command) > 4 && command[2] == '|'), so a very short command legitimately answers without one. It now resolves only when exactly one command is pending, and surfaces the ambiguity otherwise. 2. A late reply no longer overwrites unsaved edits. The settings screen applied a late `get` payload unconditionally, so a reply arriving after its timeout could revert a field the user had typed into while waiting. It now applies only when nothing is dirty, and says which happened. 3. _expiredCommands is pruned on timeout as well as on receive. It was pruned only in handleResponse, so a run of commands that all time out with no traffic coming back accumulated records until disposal. The reviewer described 3 as unbounded growth. It is bounded at 256 by the prefix token space, and stale records could never be mis-attributed because handleResponse prunes before matching, so the severity was overstated. Fixed anyway; it is nearly free. A fourth finding, that the new l10n strings are untranslated in the other 17 locales, is rejected. That is this project's established pipeline: strings are authored in app_en.arb, gen-l10n emits English fallbacks, and untranslated.json tracks the gap, which it now does for these keys. Every string in the app arrived this way, so it is not a defect this branch introduces. The ambiguity test was verified to fail against the pre-fix code. |
4 months ago |
|
|
99b5ea1251 |
fix(#532): a prefixed reply only completes the command that owns the prefix
handleResponse looked up the reply's prefix, and when that matched nothing pending it fell through to "first pending command for this repeater". So a straggler from an expired command could complete an unrelated in-flight one, reporting one command's output as another command's result. The service already carries a correlation token in every command and every reply echoes it. The fallback discarded that. Now a reply that carries a prefix is only ever matched to the prefix's owner; if there is no owner it goes to the unmatched handling added in #528, where an expired command is still named. Only a reply with no prefix at all, which has no correlation token to honour, may fall back to matching by repeater. Not reachable from today's callers: all four pass retries: 1 and the settings refresh awaits each command, so two are never in flight to one repeater. It becomes live the moment anything issues concurrent commands, which any retry work would. The two negative tests were verified to fail against the old logic and pass against the new, so they are a real guard rather than a restatement. The two preservation tests pass either way by design. _registerPending is extracted so the test seam and the real send path cannot drift apart. Part of epic #473, stacked on #528, #529 and #531. |
4 months ago |
|
|
75d08e73ea |
fix(#531): report the timeout window that was armed, not a rounded-up one
The timer ran timeoutMs while the message printed (timeoutMs / 1000).ceil(), so every window in (4000, 5000] announced "timeout after 5 seconds". The owner's 0-hop window was 4074 ms and fired at 4.07 s while claiming 5, which is what made the behaviour look arbitrary rather than deterministic: the number shown was never the number used. The service now throws a typed RepeaterCommandTimeout carrying the window that was actually armed, formatted to one decimal. Every existing caller already stringifies the error, so all of them inherit an honest figure without being touched; the CLI screen additionally renders it through a new localized string rather than the generic error wrapper. Tests pin that 4074 reports 4.1 rather than 5, that the new 28748 ms budget reports 28.7 rather than 29, and that two windows inside the same second no longer collapse to the same text, which was the defect's signature. Part of epic #473, stacked on #528 and #529. |
4 months ago |
|
|
9d690b2051 |
fix(#528): surface late repeater CLI replies instead of discarding them
A repeater reply that arrived after its command's window closed hit `if (commandId.isEmpty) return;` in RepeaterCommandService.handleResponse and was dropped with no log and no UI. Since the command timeout can be shorter than the app's own message-retrieval budget, that made "the command ran but the response was never reported" the normal outcome rather than an edge case, and it affected every repeater screen, not just the CLI one. RepeaterCommandService now remembers a timed-out command's prefix for two minutes, so a reply arriving afterwards can be attributed to the request it answers. Replies that reach no waiting command are handed to a new onUnmatchedResponse sink and logged through appLogger. No path through handleResponse returns without either completing a command, surfacing the payload, or logging why it could not. The CLI screen renders these as a distinct history entry naming the original command and how late it was. The settings screen applies the value if it is a `get` reply and tells the user it arrived late. repeater_status_screen already parsed responses independently of the service, so it had no silent-loss path to fix. Part of epic #473. Does not change the timeout window itself (#529), the reported duration (#531), or the stale-prefix fallback (#532). |
4 months ago |
|
|
9e3500a9a9 |
feat(#550): show observers + observations; top-banner refresh feedback
Badge stays observers-primary; tooltip/long-press now read 'N observers . M observations' so they reconcile with CoreScope's 'Observations (N)' feed (the two are distinct metrics: 15 distinct observers vs 34 total sightings). Refresh feedback moved from a bottom snackbar to an auto-dismissed top MaterialBanner, out of the way of the composer. Part of #524. Agent: QuietSnow (session 31eaba02) |
4 months ago |
|
|
d79dfffad3 |
feat(#549): CoreScope HTTP observer-count query service
Best-effort GET /api/packets?hash=H&groupByHash=true against a CoreScope instance (default map.okimesh.org); returns observer_count or null. Never throws, so the chat UI degrades silently to radio-only when offline or the hash is unknown. Part of epic #524. Agent: QuietSnow (session 31eaba02) |
4 months ago |
|
|
f5441e527c |
fix(#505, #506): per-radio block storage, drop the accidental global list
Children of #471 (parent stays open for AAB hardware validation, #507). The block list was one global unscoped list on the phone, unioned onto every radio on connect. A stale block for one of the owner's own radios therefore rode onto every fresh/erased radio, and clearing a radio never stuck: any other radio still holding it re-seeded the global list on connect, which re-pushed it back. - #505 block_store.dart: scope keys/names by connected device key (like the app's other stores); dropLegacyGlobal() deletes the legacy block_keys_v1/block_names_v1 (drop-and-start-fresh, owner-approved). No global list. - #505 block_service.dart: load() drops the legacy global and starts empty; loadForDevice(deviceKey) swaps the in-memory set per radio and runs the #250 self-heal. All mutating ops serialized through a Future chain so loadForDevice and importKeys (different connector frame handlers, both unawaited) cannot interleave and wipe each other. - #506 meshcore_connector.dart: the device-key hook loads the connected radio's list, so the offload union reconciles within that one radio. Existing radio-side firmware blocks left untouched (no auto-CLEAR on migration, owner-approved). Tests: per-radio isolation, clear-sticks across reconnect, legacy-drop, disconnect-clears, load/import race. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
4 months ago |
|
|
09c6b911b4 |
fix(#425): retry transient 5xx on translation-model download with backoff
A transient upstream 503 (e.g. Hugging Face) hard-failed the model download and surfaced it as an error (#229). The download requests (HEAD, single GET, range GET) now go through sendModelDownloadWithRetry: 5xx/429 responses and network exceptions retry with bounded exponential backoff (1..30s, <=5 attempts, honors Retry-After, cancellable); terminal 4xx (e.g. 404) fail immediately. The retry logic is a pure injectable top-level function, unit-tested (503-then-200, persistent-503, 404-no-retry, network-exception, cancel). Manual retry after a sustained failure is the existing "Download model" button (re-invokes the download); no new UI added. Build of epic #422. |
4 months ago |
|
|
3b39a16edd |
chore(#462): remove em-dash characters from test/ (and lib top-up)
Follow-up to #457. Swept the em-dash character (U+2014) out of the test tree (test descriptions and comments) and cleaned 8 em-dashes that landed in lib comments via the #456 refactor after #457 merged, so the tree is back to zero. Same rules: replaced with commas/colons/periods, preserved the lone "no data" glyph placeholders, left non-English ARB untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
4 months ago |
|
|
900c168c61 |
refactor(#456): restructure config-profile schema into capability sections
Profile is now a container of capability-scoped sections (schema_version 2): - wifi (WifiConfig) — any wifi device - mqtt (MqttSection = region + status_interval + brokers) — observer capability so MQTT is defined once and shared by observer / observer-repeater / observer-companion, never redone per device. Future radio/repeater/companion/ display sections slot in alongside. Parser reads the sectioned YAML and rejects the old flat v1 layout with a clear message. Enumerator reads from sections but emits the SAME firmware keys, so apply/diff/screens are unchanged. 45 config-profile tests updated + green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
4 months ago |
|
|
9bc8560b65 |
feat(#404): config-profile import source (catalog + URL, tail-detection)
Device-agnostic source layer (observer/repeater/companion reuse it): - config_catalog.dart: profiles.json manifest model + resilient parse (skips malformed entries, rejects bad JSON / newer manifest_version; absent status = published, unknown status hidden). - config_source_service.dart: resolveSourceUrl tail-detection (.json=catalog, .yaml=profile, trailing-slash -> <dir>/profiles.json), fetchCatalog / fetchProfile over http with a user-facing ConfigSourceException. Default catalog = OffbandMesh/config-profiles raw profiles.json. 16 tests (tail-detection table + MockClient fetch paths + manifest parse). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
4 months ago |
|
|
ee32e2e38e |
fix(#395): MTU-aware size cap + de-wedge DM/channel send on failed write
A max-length DM built a 170-byte frame but this BLE link only writes ATT_MTU-3 (=169) bytes, so writeCharacteristic threw. The DM path swallowed the throw and never resolved the message, leaving it "active" forever and silently blocking every later DM to that contact until force-stop+reconnect. - Size: maxContact/ChannelMessageBytes take an MTU-aware frame budget (BLE = mtuNow-3, USB/TCP = maxFrameSize); composers pass connector.effectiveMaxFrameSize. The channel cap now also subtracts the "Name: " prefix so a small-MTU link can't overflow. - DM wedge: _sendMessageDirect propagates the failure and the retry callback is awaited, so a failed send marks the message failed and drains the per-contact queue. Added a RESP_CODE_SENT safety timeout. - Channel wedge: sendChannelMessage clears the stuck queue id and marks the message failed on a failed write. - Tests: MTU-aware caps + failed-send-does-not-wedge regression. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
4 months ago |