draftDraft
The host owns a business purpose, subject or case identity, capture policy, and retention class before requesting device access.
Initialize and configure an entitled Location Capture SDK, acquire a bounded single or subscribed fix, preserve accuracy and timing as evidence, review weak results, and stop every native resource deterministically.
A state is not a UI label. It determines which actor may act, what evidence exists, what may be retried, and how recovery proceeds.
draftThe host owns a business purpose, subject or case identity, capture policy, and retention class before requesting device access.
permission_pendingThe user is deciding the minimum native permission for the declared purpose and visible capture behavior.
readySDK initialization, entitlement, permission, policy validation, and one launch generation have succeeded.
acquiringExactly one single-shot request or bounded subscription owns timeout, accuracy, distance, packet-size, callback, and cleanup responsibility.
candidateA returned event has normalized coordinates, horizontal accuracy, event time, receipt time, policy result, and source generation, but is not yet accepted evidence.
review_pendingThe candidate is usable only with human review because accuracy, freshness, or policy confidence is below the automatic threshold.
acceptedterminalAn actor accepted one immutable normalized fix for the declared purpose and policy version, with an audit event and retention deadline.
cancelledterminalThe user or host ended the attempt and every active SDK resource was stopped or unsubscribed.
Commands express intent. The aggregate validates current state and invariants, commits one new version, and emits a fact in the same transaction.
create_attemptHost applicationlocation_capture.attempt_createdMap one external case and capture-purpose identity to one attempt across retries.
request_permissionApplication userdraftlocation_capture.permission_requestedRecord one visible request per policy decision and current native authorization state.
prepare_sdkPlatform adapterpermission_pendinglocation_capture.sdk_readyBind initialization and validated configuration to one launch generation without persisting credentials or SDK instances.
start_acquisitionApplication userreadyreview_pendinglocation_capture.acquisition_startedA command key starts at most one single-shot request or subscription generation.
receive_locationPlatform adapteracquiringlocation_capture.candidate_receivedNormalize and hash one qualifying terminal event per single-shot generation, or deduplicate subscribed events by bounded source identity.
queue_reviewHost applicationcandidatelocation_capture.review_queuedThe evidence hash and policy version create at most one review case.
accept_evidenceApplication usercandidatelocation_capture.evidence_acceptedCommit evidence, policy result, processed command, audit event, and outbox record atomically.
approve_weak_evidenceEvidence reviewerreview_pendinglocation_capture.weak_evidence_approvedBind the reviewer identity and bounded justification to the immutable candidate hash.
cancel_attemptApplication userdraftpermission_pendingreadyacquiringcandidatereview_pendinglocation_capture.attempt_cancelledRepeated cancellation returns the terminal record while stop and unsubscribe cleanup remain exactly-once-in-effect.
Keep provider responses, business identity, state, events, and side-effect delivery distinct so each can be reconciled safely.
Current host-owned purpose, policy, lifecycle state, generation, and optimistic version.
attemptIdexternalIdpurposepolicyVersionstategenerationversionImmutable accuracy-bearing observation independent of the SDK object's lifetime.
evidenceIdlatitudelongitudehorizontalAccuracyeventTimereceivedTimesourceGenerationcontentHashAttributable disposition of evidence that cannot be accepted automatically.
reviewIdevidenceIdreviewerdecisionreasondecidedAtAppend-only transitions and exactly-once-in-effect downstream notification.
eventIdaggregateVersionactoridempotencyKeyoutboxStatusA permission grant is not consent for every purpose; purpose, policy, and retention are recorded separately.
One acquisition generation owns one callback family, timeout, stop, and unsubscribe lifecycle.
Accuracy, event time, receipt time, and policy result remain attached to the normalized coordinates.
A callback creates a candidate, never an accepted business decision.
Weak or stale evidence cannot pass an automatic acceptance threshold by omitting quality fields.
Credentials, native manager instances, full opaque payloads, and callback closures never enter durable storage.
Recovery changes durable truth only through the same rules as normal operation. A timeout is an unknown outcome, not evidence that nothing happened.
The native authorization result cannot satisfy the declared capture mode.
Explain the affected outcome, offer settings or a manual fallback where appropriate, and keep the attempt non-acquiring.
The documented initialize operation returns failure before the generation becomes ready.
Expose a safe configuration or entitlement error, retain no credential value, and require a deliberate retry after correction.
The configured deadline expires or every event remains outside policy.
Stop or unsubscribe once, preserve the quality reason, and route to review, retry, or fallback rather than fabricating a precise fix.
The owner is inactive or callback generation differs from the current attempt generation.
Ignore the event, perform idempotent cleanup, and do not change the terminal or newer attempt.
The immutable candidate exists but the review command lacks acknowledgement.
Reload the attempt and replay the same command key; never reacquire or duplicate evidence merely to recover workflow state.
Measure state age, event health, retries, reconciliation, and sensitive-data access alongside latency and error rate.
Only explicitly indexed evidence is linked. Empty sections are not backfilled with invented endpoints or package names.
8 labs · 5 hostile scenariosmappls-location-capture-android-sdkmappls-location-capture-ios-sdkmappls-location-capture-sdk-ios-distribution8 verified tests