The scenario: no response is different from a rejected proof
An account action can ask the user to confirm a code, submit that proof and then lose the response. A new code after a definite refusal and a retry after an uncertain response are different operations. Giving both a fresh request identity can obscure whether the first operation already completed; blindly reusing one identity for a changed attempt can be wrong too.
Fourteen selected Android JVM cases passed for the Movo-X proof-code service and controller. The fixtures use a local mock HTTP server, synthetic responses and controlled time values. One deliberately disconnects after receiving the request. The results describe selected client decisions, not a completed backend exactly-once or authentication-security guarantee.
Choose code channels from current offers rather than a generic list
The selected service asks for channel offers using the phone country and Android platform. A fixture for a selected country offers WhatsApp but no SMS and observes one WhatsApp-code request after discovery. Another supplies SMS first, returns a selected SMS-unavailable answer and checks that the next request uses WhatsApp.
These are code-receiving proof flows. Reverse WhatsApp is filtered out of the selected code-channel plan. The method is not identical to the general login fallback policy, which has a reverse-confirmation option. Document the intended purpose of the channel list before reusing it across login, fresh proof and adding an identifier. Actual sender availability and message receipt remain separate acceptance.
Distinguish no usable code channel from failed discovery
A selected fixture returns only reverse confirmation and checks that no code request follows. The service surfaces an unavailable notice for that no-code-channel condition. A different fixture makes discovery unreadable and observes one WhatsApp-code attempt. The inspected unknown-offers fallback is deliberately narrow.
An explicitly empty usable plan and an unknown plan are therefore different states. A failed lookup does not establish that WhatsApp currently works; the authoritative request can still refuse it. The cases do not prove current gateway readiness, country coverage or provider limits. Keep those facts separate from a client plan that permits one selected fallback attempt.
Keep discovery caching narrower than a live-health claim
The selected caching fixture requests two proof codes for the same country and observes one discovery plus two code requests. It checks reuse within that fixture. A separate case checks selected country lookup inputs, including rejection of an unknown calling code.
The source defines a one-minute offers cache per country. The selected case does not wait through a minute, cross every expiry boundary or simulate concurrent discovery and configuration changes. A cached list is a recent client observation rather than live provider health. Add controlled clock and concurrency acceptance before making stronger freshness or request-coalescing claims.
Apply current offers to fresh-proof choices as well as code sends
One policy fixture starts with account identifiers for several methods and filters available fresh-proof choices through a supplied server-offers response. It checks selected email and passkey availability and that a reverse-only phone offer does not become a code-receiving choice. An unknown offers value retains the selected account-derived choices.
Having an identifier on the account and being offered a usable proof path are separate facts. The fixture does not obtain a real passkey assertion or provider token. It supports the selected intersection of account state and offered methods, while current configuration, provider prerequisites, proof validity and installed interaction retain their own acceptance.
A rate limit blocks selected sends without scheduling an automatic resend
The service fixture returns a rate-limit response and checks that no second channel is tried. The controller fixture supplies a retry delay, checks a blocked state and verifies that a second send call adds no request while blocked. It advances its injected clock beyond the supplied delay before an explicit new send succeeds.
This is not an actual hour-long wait. The test changes a clock value and calls the controller again; it does not demonstrate a timer firing or an automatic resend. The selected wait-label case also checks rounding for supplied durations. Rendered countdowns, process restarts and authoritative server-limit enforcement need independent acceptance.
Keep resend timing, retry blocking and native interaction separate
The inspected controller stores a resend deadline from a returned challenge and maintains a separate blocked-until value for selected rate limits. The inspected Compose callers pass the resend deadline and busy/blocked state into their resend presentation. Those native interaction hooks were source-reviewed rather than rendered or driven in this batch.
Do not treat a stored deadline as proof that every direct call or installed interaction enforces the same timing policy. Verify screen controls, accessibility activation, cancellation and lifecycle transitions with a controlled app. The authoritative service must still reject ineligible attempts even if the client disables a button or displays a wait hint.
A definite wrong code starts a new selected attempt
The email proof fixture requests a synthetic challenge, rejects an incomplete input locally, then submits a normalized selected code to the reauthentication route and reaches done. A separate add-identifier fixture returns invalid-code, retains the sent/code-entry stage and then accepts another code. Its two submissions have different request identities.
That outcome distinguishes a returned refusal from an answer that never arrived. The new identity is observed for this selected controller path; it does not establish every changed-proof or concurrent-attempt rule. Challenge consumption, attempts remaining, expiry and the returned account list still require authoritative service acceptance with controlled records.
A lost response retains the selected operation identity
The uncertain-response fixture disconnects its local server after receiving the reauthentication request. The controller reports a network outcome and keeps a retryable code stage. A second verification of the same selected code receives a fake success, and the captured request identities are equal. The inspected source preserves its attempt identity for network exceptions.
The mock server does not commit a database mutation or retrieve a stored replay result. Equality of headers supports selected client retry identity only. The current backend must separately bind that identity to the account, operation and proof, handle repeated or changed bodies and return a durable result. Do not turn this fixture into a claim of exactly-once effects across the system.
A proof-flow engineering handover
Retain the fourteen scoped cases with exact channel plans, request counts, supplied waits and captured identities. Add isolated service replay and challenge-consumption acceptance, controlled expiry/cache tests and installed resend/retry interactions. Verify what happens after cancellation, process loss, changed account state and a server result that was committed before a connection failed.
For a CTO, the decision model is precise: choose the applicable proof path, send only an allowed selected code request, respect a returned limit, distinguish a definite refusal from uncertainty and reconcile from the authoritative response. The selected evidence supports these client responsibilities while provider delivery, durable replay and real device behaviour remain separately verifiable.
Compare the reviewed boundaries
A new attempt, a wait and an uncertain retry need different handling
On smaller screens, scroll across to compare every column. Keyboard users can focus the table and use the arrow keys.
| Situation | Selected evidence | Separate acceptance |
|---|---|---|
| Known versus unknown offers | Mock request plans and selected request counts | Current provider/country readiness and cache expiry |
| Rate limit | No channel fallback; injected clock blocks repeated sends | Actual server limits, native controls and lifecycle |
| Definite wrong code | Sent stage retained; next request identity differs | Authoritative attempts, proof expiry and changed bodies |
| Lost response | Local disconnect; repeated selected identity | Durable replay result and committed effects |
Illustrative control flow
Pseudocode summarizing the decision boundary. It is not copied production code or a deployment instruction.
plan = code_channels_from_current_offers_or_defined_unknown_fallback()
challenge = request_one_applicable_code(plan)
try: result = submit_proof(proof, attempt_identity)
except uncertain_network_result: retain_attempt_identity_for_same_operation_retry()
except definite_refusal: reconcile_notice_and_start_a_new_defined_attempt()
# The authoritative service must separately bind and replay the operation.About this engineering series
Written by Omer Muneer Qazi from a review of Movo-X implementation and dated engineering records. This article explains source behaviour and historical observations; current production, clinical outcomes and store availability require their own verification. Examples are synthetic and proposed test cases are identified as such.
Explore the Movo-X engineering series → · Related implementation experience →
Discuss a similar engineering problem
Send the workflow, current platform and the decision your team needs to make. I can help define an implementation or review scope with concrete acceptance evidence.
Discuss your project on WhatsApp ↗