Skip to content

fix: honest FCC/CE apply-success reporting + 4G allowlist contradiction - #39

Merged
doesthings merged 2 commits into
mainfrom
improve/honest-apply-and-4g-allowlist
Aug 9, 2026
Merged

doesthings merged 2 commits into
mainfrom
improve/honest-apply-and-4g-allowlist

Conversation

@doesthings

Copy link
Copy Markdown
Owner

What this does

Two low-risk correctness fixes, both unit-testable and CI-validated. No DUML frames, ports, timing, or ACK handling are changed.

1. Honest apply-success reporting

sendFrames() OR-accumulated success across all 42 writes (21 frames × 2 rounds) and returned true if any single write succeeded. If the link dropped after the first write, the app still reported "FCC mode enabled" on a mostly-failed transmission (the root of the "success is unverified/brittle" reports).

It now requires every write to succeed and treats an empty frame list as a failure — matching sendFramesUnix() (the 4G path) which already does this. The rule is extracted to allFramesSucceeded() and covered by DumlTransportSendFramesTest.

Per-frame success is "TCP connect + write succeeded" (the ACK read is best-effort), so this does not wrongly fail on NO_ACK frames — it only stops false positives.

Re-applies the approach from #17 by @ther3ptil31987-prog, rebased cleanly on current main (that PR had drifted into conflict).

2. Fix the 4G allowlist self-contradiction (#27)

The comment above MODELS_WITH_4G states the Mini series (incl. wa140) has no cellular module, yet wa140 was in the set. Removed wa140 so the code matches its own stated intent.

What this intentionally does not touch

Deeper 4G work (the serial.take(5) full-serial parsing bug, model-code detection) and a readback-based verified-status layer are separate follow-ups that need on-hardware testing before shipping. This PR is scoped to changes that are safe without a real RC2.

Testing

  • New unit tests: DumlTransportSendFramesTest (6 cases covering all-success, partial-fail, single-fail, all-fail, empty).
  • CI runs assembleRelease + testDebugUnitTest.

Closes the false-success half of #13; addresses #27.

…ction

sendFrames() returned true if ANY of the 42 writes (21 frames x 2 rounds)
succeeded, so the app reported "FCC enabled" even when the link dropped after
the first write. It now requires every write to succeed and treats an empty
frame list as a failure, matching sendFramesUnix() (the 4G path) in the same
file. The aggregation rule is extracted to allFramesSucceeded() and unit
tested. No DUML frames, ports, timing, or ACK handling changed — this only
makes success reporting truthful.

Also removes wa140 (Mini 4 Pro) from MODELS_WITH_4G: the Mini series has no
cellular module, and the comment above the set already said so while the set
itself included wa140. Resolves that self-contradiction (issue #27).

The sendFrames fix re-applies the approach from PR #17 (ther3ptil31987-prog),
cleanly on current main.
@doesthings
doesthings merged commit 099081c into main Aug 9, 2026
2 checks passed
@doesthings
doesthings deleted the improve/honest-apply-and-4g-allowlist branch August 9, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant