chore: dead-API sweep — TextMessage, SdCardBusyException, abandoned simulator docs - #467
Conversation
…live, drop abandoned simulator docs (#463) Three vestigial items from a repo sweep: - TextMessage (Communication/Messages) was referenced nowhere in Core src, tests, or docs, and nowhere in daqifi-desktop or daqifi-core-example-app. Removed. BREAKING: public type deleted. - SdCardBusyException was declared but never thrown, even though SdCardOperations already detects the one condition it describes — the device actively logging to the SD card — and was throwing a generic InvalidOperationException for it instead. Four call sites (GetSdCardStorageAsync, DeleteSdCardFileAsync, FormatSdCardAsync, DownloadSdCardFileAsync) now throw the typed SdCardBusyException, making desktop's existing SdCardFailureClassifier match arm for it live instead of dead. BREAKING: callers catching InvalidOperationException for these four "busy" cases must catch SdCardBusyException instead (it does not derive from InvalidOperationException). - docs/archive/simulator/ held five planning docs for a device simulator that was never built, with no corresponding code. Deleted. Both breaking changes should be called out in the next release notes. Closes #463
PR Summary by QodoDead-API sweep: remove TextMessage, throw SdCardBusyException, drop simulator docs
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
|
/agentic_review |
1 similar comment
|
/agentic_review |
Code Review by Qodo
1.
|
Qodo caught that the public ISdCardOperations interface still documented InvalidOperationException for the while-logging guard, and the download overloads didn't mention the busy exception at all — DaqifiStreamingDevice uses <inheritdoc/>, so the interface docs are what consumers actually see. Updates GetSdCardStorageAsync, CheckSdCardSpaceAsync, DeleteSdCardFileAsync, FormatSdCardAsync, and both DownloadSdCardFileAsync overloads (interface and implementation) to document SdCardBusyException instead of/in addition to the stale InvalidOperationException reference.
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit 30394a9 |
Summary
Closes #463 — three vestigial items found in a repo sweep, each resolved differently:
TextMessage(Communication/Messages/TextMessage.cs) — a publicIInboundMessage<string>referenced nowhere in Core src/tests/docs, nowhere in daqifi-desktop (origin/main), and nowhere in daqifi-core-example-app (origin/main). Removed.SdCardBusyException— declared but never thrown. Rather than delete it (and coordinate a desktop PR to drop its now-deadSdCardFailureClassifiermatch arm), I found the exception actually has a real, already-detected condition to describe:SdCardOperationsalready tracks_isLoggingToSdCardand refusesGetSdCardStorageAsync,DeleteSdCardFileAsync,FormatSdCardAsync, andDownloadSdCardFileAsyncwhile a logging session is active — it was just throwing a genericInvalidOperationExceptionfor that instead of the typed exception that exists for exactly this. Switched all four call sites to throwSdCardBusyException, which makes desktop's existing classifier arm (SdCardFailureClassifier.cs:180,"The device is still using the SD card. Stop logging, wait a moment, and try again.") live instead of dead — no desktop changes required.docs/archive/simulator/— five planning docs for a device simulator that was never built, no corresponding code anywhere. Deleted.Breaking changes (for release notes)
TextMessagepublic type removed.GetSdCardStorageAsync,DeleteSdCardFileAsync,FormatSdCardAsync, andDownloadSdCardFileAsyncnow throwSdCardBusyException(derives fromSdCardOperationException, notInvalidOperationException) when called while an SD logging session is active. Callers catchingInvalidOperationExceptionfor that case need to catchSdCardBusyExceptioninstead.Verification
dotnet build— 0 warnings, 0 errorsdotnet test src/Daqifi.Core.Tests— 2826 passed, 0 failed (net9.0 and net10.0), 2 skipped (real-hardware-only transport tests)daqifi-desktoporigin/mainanddaqifi-core-example-apporigin/mainthatTextMessagehas zero references, and that desktop'sSdCardBusyExceptionmatch arm is exactly the dead code the issue describes🤖 Generated with Claude Code