The scenario: one granted flag cannot explain every action
A household-management interface needs to distinguish a currently granted status, an explicitly recorded declaration, a pending decision and a withdrawal. Those states influence different actions. Treating them as one Boolean can make the interface offer an inappropriate action or imply that a later declaration automatically recreates earlier access.
The selected Movo-X native code models consent status and declaration presence separately. Seven existing Android JVM cases and two portable Swift cases passed with synthetic people and fake transport. This chapter describes the application’s local workflow contract. It does not assess whether a declaration is legally sufficient or establish actual consent for a real person.
Separate granted status from a recorded declaration
The selected Android predicate permits withdrawal only when the action applies to the person, status is granted and consentGrantedAt is present. The Swift state similarly records whether that timestamp exists independently from its status enum. Existing cases distinguish an explicit declaration from a synthetic granted model without a declaration timestamp.
Presence is a representation-level signal, not evidence that a person actually agreed. These local predicates do not authenticate the declarant or validate every historical timestamp and policy version. A real declaration workflow needs its own authoritative provenance and product requirements. Keep that work separate from testing whether a native card offers the selected action.
Scope the card to the applicable household person
The selected Android applicability predicate excludes the self person, managed people and nonactive status. Existing cases verify that the card does not appear for self, managed, claimed and not-required examples. The portable Swift state case also covers self and managed exclusions and consumes the decoded ownership model.
These decisions depend on server-provided person and management fields. A hidden card does not revoke access, and a shown card does not grant permission to write. Test the current service’s ownership checks independently, including status changes after a household was loaded. The nine local cases do not execute those service checks or prove current production account isolation.
Give pending and withdrawn states different presentation roles
For a living applicable person, the selected Android policy permits recording when status is pending or revoked. It deliberately does not show this particular card for a first-time pending state; the inspected source assigns that entry point to the separate caregiving card. A revoked state is treated as withdrawn and can display the record-again path.
Existing cases exercise those distinctions. This prevents the presence of several UI entry points from being confused with several separate declarations. The actual screens, localized text and accessibility were not mounted here. Acceptance should verify that pending and withdrawn states lead to consistent actions and that an asynchronous refresh does not leave conflicting prompts on different screens.
Keep withdrawal available without offering a new declaration in the same state
The selected predicates handle deceased status asymmetrically: an existing explicit granted declaration can still be withdrawn, while a new declaration is not offered for a deceased person. Android cases check both branches, and the Swift state case checks continued withdrawal eligibility for its synthetic deceased person.
This describes a selected product rule about available actions. It is not a clinical determination, death verification or a general statement about legal authority. Current person status and the actor’s permission remain authoritative service concerns. The native representation should not be used to infer facts beyond the field and policy it was supplied.
Send withdrawal as false without omitting the user’s intent
An existing Android encoding case checks that the withdrawal body contains granted false. The portable Swift request case sends the false value through fake transport, checks the one-field body and decodes a synthetic revoked result. These are useful checks because omission and false can have different meanings in a write contract.
The inspected server route requires a Boolean granted field with no unexpected keys before forwarding person_consent. That validation was source-reviewed only. The selected client tests do not create a declaration, withdraw one in a database or establish replay behaviour when a response is lost. Preserve the explicit value throughout current authoritative acceptance.
Do not equate recording again with restoration of old access
Selected native source comments define withdrawal as ending this account’s clinic links and pending requests for the person, and state that recording again does not restore those links. That is an intended contract worth making visible in product handover. The underlying transaction was not executed or audited across all later wrappers in this batch.
Accordingly, do not claim actual link retirement or automatic restoration from these UI cases. Re-granting a declaration and obtaining a new authorized clinic link should have distinct acceptance expectations. Verify the current database state, pending-request outcomes and subsequent reads with controlled fixtures before communicating that an access transition has completed.
Reconcile after acceptance and retain failure context
The inspected Android card presents separate confirmation dialogs for withdrawal and recording again. It constructs a request identity that includes the selected Boolean, shows busy/error state, retires the identity after a successful client call, reloads the household and requests clinic-scope refresh after withdrawal. Those integration branches were not exercised by the selected pure cases.
A refresh is not the same event as a committed transaction, and a failed transport does not necessarily mean a write never happened. Acceptance should cover lost responses, repeated confirmation, cancellation, stale household state and current request replay. The installed interface should show an outcome supported by an authoritative result rather than simply by the button that was pressed.
A consent-state engineering acceptance package
Retain the nine scoped cases, then add current service checks for the actor, person state, declaration provenance and link/request side effects. Verify repeat submissions and recording again without silently restoring earlier permissions. Test confirmation text, household refresh and relevant cached access on controlled devices without using real patient declarations.
For a CTO, the valuable separation is status, declaration presence, available action and effective access. Each can change for a different reason and needs its own evidence. The selected tests establish local state decisions and a false-valued write contract. They do not certify actual consent, legal compliance or a completed production access revocation.
Compare the reviewed boundaries
Declaration state and effective access need separate evidence
On smaller screens, scroll across to compare every column. Keyboard users can focus the table and use the arrow keys.
| Boundary | Selected evidence | Additional acceptance |
|---|---|---|
| Granted versus recorded | Timestamp-presence and status fixtures | Actual declaration provenance |
| Applicable action | Owned/self/status and deceased fixtures | Current actor/person authorization |
| Withdrawal intent | Explicit false serialization and fake response | Durable transaction and replay |
| Recording again | Selected source contract | Independent link/request reconciliation |
Illustrative control flow
Pseudocode summarizing the decision boundary. It is not copied production code or a deployment instruction.
state = decode_consent_status_and_declaration_presence(person)
show_only_applicable_actions(state, person)
await_explicit_confirmation(selected_action)
receipt = submit(granted=selected_action.is_recording)
reload_authoritative_household_and_access_state(receipt)
# Recording again is not evidence that earlier clinic links were restored.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 ↗