The scenario: several ways to sign in are several different contracts
A login screen can offer email, a platform provider, a passkey and phone-based verification. Phone verification can itself use several delivery or reverse-confirmation channels. Treating both lists as the same state makes it difficult to explain why a button is available, what a fallback means and which service ultimately accepts the proof.
Twelve Android JVM cases and three portable Swift cases passed for selected Movo-X native contracts. The Android fixture exercises a pure phone-channel policy. The Swift fixture exercises method discovery, selected email transitions and fake provider request exchanges. These are complementary boundaries rather than proof that the two platforms implement an identical complete login experience.
Keep the server method list distinct from its phone availability list
The inspected Swift controller reads the returned methods list to set offered flags for passkey, Apple, Google and email. Its selected fake response contains one available phone channel while separately offering passkey, Apple and email. The test checks those three method flags and that Google is not offered.
The Android policy instead consumes the available phone-channel list. It does not use this fixture to determine whether Apple or email is offered. This separation matters when a provider is disabled independently of phone delivery. Current server configuration, installed UI visibility and authoritative acceptance still need integration checks; a fake discovery response establishes only the selected client interpretation.
Preserve known-empty availability instead of treating it as unknown
The selected Android cases distinguish a null server list from an explicitly empty list. A null list uses the local default order, while an empty list offers nothing and has no first channel. The inspected source describes the unknown state as a loading or failed-lookup condition in which the later request still has the final word.
Other fixtures check that the returned server preference order is retained, duplicates are removed and unrecognized channel names are ignored. Those transformations should be documented together. They are not a guarantee that a locally offered channel is healthy, that a request is authorized or that a code can be delivered to the intended person.
Filter device prerequisites without confusing receiving and composing
The Android fixture removes both WhatsApp channels when the supplied capabilities say WhatsApp is unavailable. It retains the SMS-code channel even when the supplied device cannot compose an SMS. The selected model treats composition capability as informational for this receiving-code flow.
These tests inject capability values rather than inspecting a real installed package, telephony service or external application. They therefore support a local policy distinction between receiving a code and composing a message. Actual package discovery, external handoff, accessibility, supported device behaviour and message receipt remain separate acceptance. Do not infer a current gateway or handset deployment from these fixtures.
Advance only for a defined reason and within the offered order
The selected fallback cases move past an ended challenge, unavailable channel or explicit skip, retain server ordering and avoid exhausted methods. A server list that omits a channel keeps it out of the selected fallback path. Reaching the end produces no further method. The enum also has no SMS-reverse option in this selected revision.
This is a deterministic policy, not an end-to-end challenge state machine. It does not execute a real expiry, provider outage or user interaction. The caller must maintain the selected current and exhausted state correctly, reconcile fresh availability and explain the next action. Durable challenge consumption and session issuance remain responsibilities of the authoritative service.
Do not turn a rate limit or network failure into an automatic bypass
One Android case checks that rate-limited and generic transport failures return no fallback. Another checks selected unavailable and rate-limit HTTP mappings plus failed, expired and pending challenge statuses. Keeping these outcomes distinct avoids describing every failed attempt as permission to switch delivery channels.
The cases do not prove a complete distributed rate-limit policy, elapsed waiting behaviour or protection against every bypass. They test selected exception-to-policy decisions. Current server limits, request identity, repeated attempts and installed retry wording need their own acceptance. A client decision to stay on a method is useful without being a complete authentication-security certification.
Validate an email input shape without claiming mailbox ownership
The Swift plausibility case accepts one trimmed example address and refuses selected malformed examples. The fake request case checks trimming and absence of a bearer header on the initial email-code request. Verification normalizes the selected spaced code into six digits, then decodes a synthetic session response whose account has no phone number.
An email-shaped string is not a verified mailbox. A fake challenge response does not send a message, and a fake session response does not consume a real proof. Actual delivery, challenge identity, expiry, replay refusal, account linking and authoritative session creation must be verified separately. Supporting a phoneless response also does not decide every later product permission.
Treat provider body construction as a boundary before provider trust
The selected Swift exchange case checks that the Apple request contains the supplied raw nonce, a trimmed display name and selected authorization code. It also checks rejection of a short nonce before a successful exchange and maps a fake Google invalid-token response to a token-rejected notice. These are selected client construction and error contracts.
The fixture supplies synthetic strings and fake responses; it never obtains a provider token. It does not establish nonce generation quality, system-sheet integration, signature validation, audience checks, token freshness or current provider configuration. Those require independent acceptance across the native app and authoritative backend. Correctly constructing a request is one step before establishing identity.
Reconcile the email controller from the returned result
The third Swift case first loads the selected offered-method response, starts email entry and checks an invalid-input notice. It then waits for the fake request to reach the code-entry state, verifies a synthetic code and checks the signed-in state with the email step cleared. This connects selected service responses to observable controller transitions.
The test uses bounded asynchronous waits rather than an actual mailbox or rendered native screen. Source inspection also identifies a short method-discovery cache and country-input guard, but this batch does not independently execute every cache expiry, cancellation, concurrent request or failed refresh. Keep those behaviours in the controller and device acceptance plan rather than claiming exhaustive state-machine coverage.
A multi-method authentication handover
Retain the fifteen scoped cases with their supplied capability values, server lists, fake request bodies and observed states. Add installed-device method visibility, actual provider sheets, authoritative challenge consumption and current server refusal tests using controlled identities. Review unclear retry and unavailable wording with accessibility and language acceptance.
For a CTO, the implementation model is explicit: method discovery determines a set of offered entry paths; phone availability and device policy determine a narrower channel sequence; selected errors govern whether that sequence advances; the service still establishes the identity and session. The selected evidence makes these responsibilities reviewable while leaving actual delivery, credential trust and device behaviour independently verifiable.
Compare the reviewed boundaries
Offering a method is separate from accepting its proof
On smaller screens, scroll across to compare every column. Keyboard users can focus the table and use the arrow keys.
| Boundary | Selected evidence | Separate acceptance |
|---|---|---|
| Method discovery | Swift fake methods and offered flags | Current configuration and installed UI |
| Phone channels | Android ordering, device filters and empty/unknown lists | Actual packages, gateways and receipt |
| Fallback | Selected errors, exhausted paths and rate-limit refusal | Durable challenges and current service limits |
| Email/provider exchange | Synthetic bodies, notices and controller transitions | Mailbox, system sheets and authoritative credential validation |
Illustrative control flow
Pseudocode summarizing the decision boundary. It is not copied production code or a deployment instruction.
methods = interpret_server_signin_methods(response.methods)
phone_channels = filter_supported_channels(response.available, device_capabilities)
next_channel = advance_only_for_defined_failure(phone_channels, current, exhausted)
result = exchange_selected_proof_with_authoritative_service()
# A visible button, fallback choice or fake response does not prove delivery or identity.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 ↗