draftDraft
The host owns name, purpose, subject scope, rule intent, and geometry revision before opening the editor.
Present the Mappls geofence editor, normalize circle or polygon output into a versioned application draft, validate geometry and policy, and stop at a review-ready artifact until a separately documented provider publication contract is selected.
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 name, purpose, subject scope, rule intent, and geometry revision before opening the editor.
editingOne view and delegate generation owns mode, handles, slider, style, callbacks, dismissal, and cleanup.
candidateCircle or polygon output has been copied into a portable geometry schema but is not yet an operational rule.
review_pendingValid geometry, purpose, scope, schedule intent, and policy version await an attributable application review.
approved_draftterminalThe application has a review-approved portable artifact ready for a separately selected and entitled rule-publication contract.
cancelledterminalThe author ended editing without approving a new geometry revision and the UI lifecycle is fully disposed.
Commands express intent. The aggregate validates current state and invariants, commits one new version, and emits a fact in the same transaction.
create_geofence_draftHost applicationgeofence_draft.createdOne external rule intent maps to one draft aggregate across retries.
open_editorOperations authordraftreview_pendinggeofence_draft.editor_openedOne command opens one view/delegate generation tied to the current draft revision.
receive_geometryMapplsGeofenceUIeditinggeofence_draft.geometry_receivedNormalize one terminal geometry result per generation and hash its canonical coordinate order.
submit_for_reviewOperations authorcandidategeofence_draft.review_requestedThe geometry hash, purpose, scope, and policy version create at most one review case.
approve_draftGeofence reviewerreview_pendinggeofence_draft.approvedCommit reviewer, decision, exact geometry revision, audit event, and outbox atomically.
cancel_editOperations authordrafteditingcandidatereview_pendinggeofence_draft.cancelledRepeated cancellation disposes the editor once and preserves the last committed draft revision.
Keep provider responses, business identity, state, events, and side-effect delivery distinct so each can be reconciled safely.
Host-owned intent, current revision, lifecycle state, policy, and optimistic version.
draftIdexternalIdpurposescopestategeometryRevisionversionImmutable canonical circle or polygon independent of UI lifetime.
geometryIdmodecoordinatesradiusMeterscanonicalHashsourceGenerationAttributable approval or rework request for an exact geometry and policy version.
reviewIdgeometryIdreviewerdecisionreasondecidedAtSelection record for a future provider rule adapter without inventing a rule ID.
draftIdadapterStatusentitlementReferencerequiredContractselectedAtEditor output is an application candidate, not evidence of a published provider rule.
Only canonical validated circle or polygon geometry enters review.
Each geometry revision is immutable and linked to the editor generation that produced it.
Purpose, subject scope, schedule intent, and policy version travel with geometry review.
Publishing requires a separately documented, entitled rule contract and creates a separate provider identity mapping.
Provider views, delegates, map layers, credentials, and opaque callback objects are never persisted.
Recovery changes durable truth only through the same rules as normal operation. A timeout is an unknown outcome, not evidence that nothing happened.
Canonical validation finds missing points, self-intersection, invalid radius, excessive area, or policy bounds failure.
Keep the candidate uncommitted, explain the exact constraint, and reopen a new editor generation.
The delegate generation is inactive or differs from the aggregate's editor generation.
Ignore it and clean up provider resources without changing the current draft.
The submitted geometry references an older aggregate or geometry revision.
Return a conflict with the current revision and require an intentional new edit.
The selected environment lacks a documented provider command, entitlement, response, or rule identity contract.
Keep the artifact approved_draft and route contract selection to an administrator; never fabricate publication success.
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-geofence-ui-ios-distributionmappls-geofence-ui-ios-distribution-baseAdvanced · 95 min11 verified tests