Repository navigation
Closed as not planned
Closed as not planned
Copy link
Description
Code-level safety defect
ComboV2 conflates an unknown outcome after communication loss with confirmed non-delivery. This leaves a gap between accepting a non-idempotent command and recording its eventual pump-history entry.
This is a synthetic reproduction derived from public source code, not patient logs or an individual medical event. Related reports: nightscout/AndroidAPS#4378 and nightscout/AndroidAPS#4240.
Synthetic software reproduction
Use a scripted pump:
- Submit request A. Reply
Bolus started: true, then return partial progress. - Break the transport before a completed history entry is available. Make cancellation fail on that disconnected transport.
ComboV2Plugin.deliverTreatment()catches the exception and returnssuccess=false enacted=false bolusDelivered=0.0whenlastBolusFlowis null.- Before history for A arrives, submit independent request B. There is no durable unresolved-request guard in this path.
- Reconnect, complete B, and return
DELIVEREDwith zero remaining. - Return a history delta containing A's delayed infusion, B's request and B's infusion.
- Both infusions are forwarded for ledger insertion, then
Pump.deliverBolus()throwsUnaccountedBolusDetectedExceptionbecause it counts more than oneStandardBolusInfusedentry. Completed request B is reported as failed.
No automatic resend is required: A and B are independent requests.
Source paths
At Boost baseline fde4735649:
pump/combov2/src/main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt: generic exception handling and thelastBolusFlow/zero fallback indeliverTreatment().pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/main/Pump.kt: post-delivery history-delta counting indeliverBolus().implementation/src/main/kotlin/app/aaps/implementation/queue/commands/CommandBolus.kt: accompanying carbohydrates are committed only whenresult.successis true; outcome distinctions also matter here.
Expected behaviour
- Persist a pending request before a command might reach the pump; conservatively account for uncertain delivery without duplicating it when history arrives.
- Do not resend the original non-idempotent command as a reconnect strategy.
- Double-check with read-only status/history queries; protect subsequent dose-increasing requests while the outcome remains unresolved.
- Bound synchronous verification and background retries. Do not leave the UI/queue waiting indefinitely or silently turn unknown delivery into zero when a timer expires. Provide an explicit, audited recovery path.
- Associate history with its original request. Distinguish confirmed delivery with a history discrepancy from confirmed non-delivery and unknown outcome. Do not simply suppress unexpected-history errors.
No patient data, real doses, timestamps, hardware identifiers or raw logs are included. This is a source-level report, and no hardware validation of a proposed fix is claimed.
Metadata
Metadata
Assignees
Labels
No labels
Activity
birdfly commentedon Oct 21, 2026
Tracking upstream at nightscout/AndroidAPS#5359. The affected paths were rechecked against AndroidAPS master commit aa16db6. Closing this fork-specific report to avoid duplicate tracking; this does not mean the defect is fixed. The upstream report contains source analysis and a synthetic reproduction recipe only, with no claim of upstream hardware validation.