The scenario: opening an invitation is not the same as reviewing a record
A second-opinion invitation needs a practical browser path for a reviewer who may not have the patient app. The invitation can identify the requested share without making possession of the original URL equivalent to a fully verified review session. Pending access, phone verification and record availability are separate states.
The inspected Movo-X browser flow implements those stages with a fragment-carried invitation, a pending cookie, an invited-phone challenge and a rotated verified session. Nine isolated cases examine selected handler behaviour. The database state machine and client page were reviewed in source rather than exercised in a live browser or database.
Keep initial navigation and the explicit token exchange distinct
The constructed invitation places its token after the fragment delimiter rather than in the URL path or query. RFC 3986 describes fragment processing separately from dereferencing the resource. That avoids putting this token into the initial page request target.
The page then explicitly reads the fragment and sends the token in a JSON POST to the start endpoint, while removing the fragment from the displayed history entry. The application server therefore does receive the token during the exchange. The tested RPC input receives a hash instead. These are different boundaries; fragment placement does not mean the token can never reach a server or client-side code.
Create a pending session without returning the shared record
The start handler constructs a new opaque cookie and supplies token and cookie hashes to its service dependency. The selected fixture returns code-required metadata and checks the pending cookie attributes, masked phone hint and selected response headers. No shared clinical record is returned by that handler branch.
A supplemental case starts twice with the same invitation and checks distinct pending-cookie hashes. The handler does not itself enforce a globally one-use invitation. The inspected SQL permits a bounded number of pending sessions for an active share. Consuming a later verification code is a different rule from permanently consuming the invitation link on its first page load.
Send the challenge to the authoritative invited phone
The code operation does not accept an arbitrary recipient number from the reviewer’s request. Its authoritative response selects the invited phone or reports that delivery has already been queued. The handler constructs a code hash and delegates the selected delivery path.
The existing fixture uses a diagnostic test sink to inspect the synthetic recipient and code representation. It then returns scripted verification results. That checks construction and propagation, not real phone delivery, possession of the invited handset or whether an actual database rejects a replayed code.
Refuse diagnostic delivery fallback in production mode
The selected source has separate guards for diagnostic providers and handler fallback. Configuration rejects log/test providers in production. The handler’s fallback branch additionally requires a non-production configuration before recording a diagnostic code. If no accepted delivery path is available, it returns an unavailable result.
The supplemental fixture checks both configuration refusals and the handler’s production flag using an intentionally injected diagnostic-provider list. It verifies that no test-sink entry or diagnostic log is added. This is selected local execution, not evidence of the current deployment’s provider configuration or a successful production message.
Rotate the session after an accepted challenge
On a successful authoritative verification result, the handler returns a different cookie and sends the prior and replacement cookie hashes to the service operation. The existing fixture checks that rotation and clearing the cookie after a selected locked-challenge response.
The inspected SQL consumes its stored code, changes session state and replaces the cookie hash. It also limits server expiry by share availability and checks an idle window. Those SQL branches were not executed. A browser cookie’s Max-Age is not the complete server authorization lifetime, and a header assertion does not prove current replay rejection.
Layer cookie attributes with same-origin operation checks
The secure-origin response includes HttpOnly, Secure, SameSite=Strict and the reviewer path. RFC 6265 describes HttpOnly’s restriction on non-HTTP cookie access and warns that Path is not a reliable security-isolation boundary. The handler separately checks origin information for POST operations and requires its accepted JSON representation.
The fixtures check selected cookie parsing and origin cases. A supplemental case supplies a foreign explicit Origin alongside same-origin fetch metadata and confirms refusal before the mock RPC. These controls do not establish complete resistance to same-origin script compromise or every browser behaviour.
Recheck share availability at the authoritative boundary
The source database flow checks that the share remains active and that its creator still has the relevant access. It rejects ended or expired sessions and requires verified state before selected content operations. Unknown, revoked and expired invitation outcomes are normalized by the source and handler into an unavailable experience.
The fixtures supply those selected outcomes; they do not mutate or revoke a real share. No-store, no-referrer and noindex headers serve distinct response-policy purposes and are not authorization grants. Current database functions, selected shared sections and reviewer permissions need their own installed-state verification.
A practical reviewer-access acceptance package
Keep fragment-link shape, token/hash, pending-cookie, phone-code, production-fallback, rotation, refusal and origin fixtures. Execute the authoritative state-machine tests for expiry, replay, creator-access loss and revocation. Then evaluate actual browser navigation, fragment removal, cookie storage and phone delivery with controlled synthetic accounts.
For a CTO, the result is an access flow whose invitation, challenge, session and content authority can be reviewed independently. The pinned implementation and nine scoped cases establish selected software boundaries. They do not establish current reviewer identity, real delivery, clinical review or deployed access acceptance.
Compare the reviewed boundaries
Four stages of browser reviewer access
On smaller screens, scroll across to compare every column. Keyboard users can focus the table and use the arrow keys.
| Stage | Selected evidence | Further acceptance |
|---|---|---|
| Invitation | Fragment link and handler token/hash fixtures | Actual navigation and client exposure |
| Pending session | Cookie construction and distinct starts | Installed session-creation limits |
| Phone verification | Synthetic sink, hash and rotation checks | Real delivery and replay rejection |
| Content access | Selected SQL verified-state/share checks | Current permissions, revocation and shared fields |
Illustrative control flow
Pseudocode summarizing the decision boundary. It is not copied production code or a deployment instruction.
invitation = read_fragment_then_remove_displayed_fragment()
pending_cookie = exchange_token_for_pending_session(invitation)
challenge = request_code_for_authoritative_invited_phone(pending_cookie)
verified_cookie = rotate_after_authoritative_code_acceptance(challenge)
view = read_only_while_session_and_share_remain_authorized(verified_cookie)
# Invitation possession, code consumption and session expiry are separate contracts.Additional implementation references
These provider references explain current implementation context. Historical Movo-X observations remain tied to the source records described above.
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 ↗