The scenario: signing in and being trusted to see records are different states
A new device can hold a sign-in session while still requiring approval before selected records are visible. Another trusted session may be able to approve it or mark an unfamiliar sign-in for sign-out. The management UI needs to distinguish those choices without turning a client flag into the server’s permission decision.
Seven Android API cases and one device-row case passed for selected Movo-X contracts. The API fixtures use a local mock HTTP server and synthetic responses. The device-row fixture supplies Boolean flags directly. This chapter concerns selected client request and presentation behaviour, not an actual approval, remote revocation or installed device-security acceptance.
List sessions through the current account request path
The selected list fixture checks the authenticated GET route, a supplied session representation and an approvable subset. Fields include platform, sign-in method, trusted state, current-session marker and action flags. The inspected response model derives an approvable list from supplied canApprove and thisSession values.
A returned list is only the response the service supplied. These cases do not prove completeness, current account isolation or that each displayed device description is independently authenticated. The service must decide which sessions belong to the account and which actions the requesting session may perform. Native display and accessibility for unfamiliar or incomplete metadata also need acceptance.
Treat an older-server empty list as compatibility rather than an inventory claim
The selected compatibility case returns not found for the session-list route and checks that the client returns an empty list. The inspected method catches that selected HTTP status and constructs its compatibility response. It does not distinguish every possible reason a server might return not found.
An empty compatibility list therefore is not evidence that the account has no other active sessions. Product wording and operational diagnostics should retain that limit. Current route deployment, authorization failures and actual session inventory require independent verification. A graceful older-server path should not become a security assurance that no unfamiliar sign-in exists.
Derive approval and row actions from the supplied flags
The selected device-row fixture shows an approval candidate separately from an ordinary sign-out row, excludes the current device from those selected row actions and checks the chosen fallback for current trust. An explicit supplied session-view false value takes precedence over a current-device row marked trusted; an absent view can use the row, while an empty input falls back to false.
These are concrete local precedence rules. They do not calculate an authoritative approval window, validate the device identity or enforce permissions against an independent client. In particular, a source comment describing a time window is not a locally executed elapsed-time test. The current service owns the action flags and authoritative window decision.
Carry a selected operation identity on approval
The API fixture submits an approval for a supplied session ID, checks its POST path and supplied request identity, then decodes a fake returned trust source. The inspected native screen keeps a per-session approval identity during a selected in-memory attempt and removes it after reported success before reloading.
Only the API request contract was executed in this batch. The screen map/reload path was source-reviewed and is not process-durable evidence. A stable request identity is also not proof that a database implements replay-safe approval. Verify current account/session binding, repeated requests and uncertain answers against an isolated authoritative service before claiming exactly-once or durable approval effects.
Keep local credential unlock separate from server approval
The device-row case checks that a supplied deviceSecure value permits the selected local approval gate and that false refuses it. Source inspection traces the screen’s credential-confirmation intent and a successful activity result before it calls approval. No actual keyguard or system credential UI was invoked.
A supplied Boolean and a source branch do not prove that a real person unlocked a controlled device, that the approval is cryptographically bound to that interaction or that the server accepted the trust change. Installed platform behaviour and the authoritative trust contract need separate acceptance. Keep local interaction evidence precise rather than treating a button gate as the entire security design.
Preserve distinct approval-window and trusted-session refusals
Two API fixtures supply different refusal responses: an approval-window-passed conflict and a trusted-session-required response. The client maps each to its selected message category. This lets the UI distinguish an expired opportunity from a request that needs another trusted session instead of treating both as an invalid code.
These are fake returned reasons, not a timed expiry or authoritative trust check. The cases do not move a real server clock, change a session’s trust or establish every error variant. Actual recovery wording, refresh behaviour and service policy need controlled integration acceptance. A refusal should remain a refusal until the service returns a successful new state.
Separate remote session sign-out from local cleanup
The selected sign-out fixture captures the target route and supplied request identity after a fake successful answer. Source identifies the operation as a POST. The fixture’s assertions do not establish actual revocation, a live remote device losing access or cleanup of retained representations on that device.
Remote session revocation and the current client’s repository clear are different operations. The snapshot-generation chapter separately covers selected local late-result handling. A current service must independently enforce later requests from the signed-out session, while installed clients reconcile caches, streams and UI. Do not describe a fake ok response as completed erasure or guaranteed immediate disappearance everywhere.
A fresh proof response still has authoritative meaning to verify
The remaining API fixture sends a selected phone-proof body to the reauthentication route and decodes a synthetic trusted result. It checks request shape and the returned model flag. It does not deliver a real code, consume an actual challenge or establish every permission that follows from the supplied flag.
Fresh proof, session trust and record visibility have separate contracts even when they share an account screen. Retain those distinctions across native state, service errors and clinic access. Current request scope, proof expiry, replay refusal and actual records-access changes require authoritative acceptance beyond constructing the selected nested JSON body.
A device-session engineering handover
Retain the eight scoped cases with exact request routes, identities, supplied flags and refusal reasons. Add current service tests for account isolation, approval-window edges, repeated/uncertain mutations and remote revocation. Verify credential-unlock, cancellation, reload and unfamiliar-device presentation on controlled installed apps.
For a CTO, the useful chain is explicit: the service returns eligible session actions, local rules choose presentation and interaction gates, the client submits a scoped operation and the service decides trust or refusal. The selected evidence makes client behaviour inspectable without claiming actual device possession, durable trust transitions or complete clinical-record authorization.
Compare the reviewed boundaries
A listed device, a local gate and a trusted session are separate
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 |
|---|---|---|
| List/compatibility | Mock authenticated route and not-found fallback | Current inventory, account isolation and deployment |
| Local choices | Supplied action/trust flags and deviceSecure value | Actual system unlock and installed presentation |
| Approval/refusal | Selected POST identity and distinct reasons | Authoritative window, trust and durable replay |
| Sign-out/proof | Selected routes/bodies and fake returned values | Actual revocation, challenge consumption and record access |
Illustrative control flow
Pseudocode summarizing the decision boundary. It is not copied production code or a deployment instruction.
sessions = request_current_account_session_list()
choices = derive_local_rows_from_supplied_action_flags(sessions)
if selected_approval: obtain_separately_accepted_device_confirmation()
result = submit_scoped_session_operation(operation_identity)
reload_and_reconcile_from_authoritative_returned_state(result)
# Local flags and fake ok responses do not establish remote trust or revocation.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 ↗