Advanced2 hr 10 min8 implementation labs5 hostile paths

Build Governed spatial analysis

An eight-lab, source-bounded workshop for the complete analysis run lifecycle: exact commands and events, durable records, replay, concurrency, unknown outcomes, hostile fixtures, a maintained capstone, and production exit evidence.

Durable boundaryanalysis run · 7 states · 6 transitions · 6 event identities

Freeze the evidence boundary first

This curriculum teaches the durable host workflow around reviewed Mappls surfaces. It does not manufacture provider endpoints, callbacks, resource states, entitlement, or completion evidence.

The journey blueprint and application event contracts are implementation guidance, not Mappls provider payload specifications.Only linked normalized contracts and source guides may define provider request syntax; empty evidence is never backfilled.The simulator and maintained capstone operate in explicit fixture mode and make no entitlement claim.Credentials, precise production payloads, opaque native objects, and provider secrets stay outside workshop inputs and durable examples.
Lab 1 · 15 min

Model the lifecycle before the UI

Turn the analysis run blueprint into an explicit aggregate boundary owned by the application.

Build

draft: Inputs, schema, coordinate system, ownership, and processing intent are declared but not accepted.validating: Format, schema, geometry, coordinate reference, limits, and policy are being checked.published: An immutable dataset version is queryable with explicit workspace access and lineage.processing: An analysis job references fixed input versions, parameters, runtime, and output ownership.ready: Outputs, quality metrics, logs, lineage, and visualization metadata are complete.shared: A governed audience can view or embed a selected output version under explicit policy.failed: Validation or processing stopped with typed, attributable diagnostics and retained inputs.

Prove before continuing

Every persisted state exists in the reviewed blueprint.Terminal states reject ordinary forward commands.Recovery text is operational guidance, not another hidden state.
Lab 2 · 20 min

Implement every command and event pair

Make intent, actor authority, allowed source state, committed state, and emitted fact reviewable together.

Build

create_dataset_version by Data engineer: new aggregate → draft; emit dataset.version_created.validate by Spatial analyst: draft → validating; emit dataset.validation_started.publish by Workspace administrator: validating → published; emit dataset.published.run_analysis by Spatial analyst: published | ready → processing; emit analysis.started.complete_analysis by Spatial processing service: processing → ready; emit analysis.completed.create_share by Workspace administrator: ready → shared; emit share.created.

Prove before continuing

create_dataset_version resolves to governed-spatial-analysis-dataset-version-created without claiming a provider webhook payload.validate resolves to governed-spatial-analysis-dataset-validation-started without claiming a provider webhook payload.publish resolves to governed-spatial-analysis-dataset-published without claiming a provider webhook payload.run_analysis resolves to governed-spatial-analysis-analysis-started without claiming a provider webhook payload.complete_analysis resolves to governed-spatial-analysis-analysis-completed without claiming a provider webhook payload.create_share resolves to governed-spatial-analysis-share-created without claiming a provider webhook payload.
Lab 3 · 15 min

Persist restart-safe records

Separate business identity, provider evidence, command receipts, immutable facts, audit, and downstream delivery.

Build

Dataset version: Immutable source or derived spatial asset. Keys: datasetId, version, contentHash, crs, schema, owner.Analysis attempt: Reproducible execution and typed status. Keys: analysisId, attempt, inputs, parameters, runtime, status.Lineage manifest: Auditable graph from source versions to outputs and shares. Keys: outputVersion, inputVersions, operation, generatedAt, quality.Share policy: Audience, expiry, export, embedding, and revocation controls. Keys: shareId, resourceVersion, audience, permissions, expiresAt.

Prove before continuing

Process restart restores the same aggregate version and command result.Opaque SDK or native UI objects are not durable records.Provider evidence and application decisions remain distinguishable.
Lab 4 · 15 min

Make concurrency and replay deterministic

Apply optimistic expected versions and aggregate-scoped idempotency before executing effects.

Build

Published input and output versions are immutable.Every output records exact input versions, parameters, runtime, and actor.Workspace authorization applies separately to source, job, output, visualization, and share.A retry is linked to its previous attempt and never overwrites it.Revoking a share does not destroy dataset or analysis lineage.

Prove before continuing

An exact replay returns the first result without another event or version.A reused key with different intent conflicts.A stale expected version changes no durable truth.
Lab 5 · 15 min

Control effects and unknown outcomes

Commit outbox intent atomically, execute effects outside the transaction, and reconcile ambiguous results.

Build

Upload is interrupted: detect with The client upload ID has incomplete acknowledged parts. Recover with Resume only missing parts and verify the final content hash before validation.Coordinate reference is missing or wrong: detect with Extent, geometry validity, or known control points conflict with the declaration. Recover with Fail validation with actionable diagnostics; require an explicit corrected version.Analysis worker dies: detect with Lease expires without a terminal attempt record. Recover with Resume from supported checkpoint or create a linked retry under the same analysis identity.Share is used after policy changes: detect with Resource policy version or expiry no longer authorizes the audience. Recover with Deny access immediately, record the decision, and require a newly authorized share.

Prove before continuing

A timeout remains an unknown outcome until identity-based reconciliation completes.Retries are bounded and preserve the original business and command identities.Dead-letter or manual review retains the entire attempt history.
Lab 6 · 15 min

Run all hostile fixture scenarios

Exercise the success path plus replay, concurrency, state, and response-loss failures without an account.

Build

Complete journey: Commit the shortest reviewed success path to the journey-specific operating target.Idempotent replay: Repeat one command identity and prove that version, event identity, and side effects do not duplicate.Stale version: Reject a command based on an outdated aggregate version without changing durable truth.Invalid transition: Reject a known command when the current state does not permit it.Unknown outcome recovery: Reconcile after a lost response, then replay the original command identity safely.

Prove before continuing

All fixture checks pass for all five scenarios.Rejected commands emit no event and do not increment version.The fixture makes zero provider calls and exposes no write tool.
Lab 7 · 20 min

Trace the Retail Site Lab capstone

Follow the maintained source through domain rules, adapter seam, repository transaction, HTTP boundary, UI evidence, and restart test.

Build

Run the app's declared test suite (8 tests).Run fixture mode without a credential.Inspect audit and outbox evidence after each transition.Restart the process and continue the same aggregate.

Prove before continuing

The downloadable archive checksum verifies before execution.The capstone covers the journey target without inventing provider completion.Browser and HTTP surfaces report the same durable version.
Lab 8 · 15 min

Qualify the real integration boundary

Replace only reviewed adapter seams and collect independent production evidence without weakening application invariants.

Build

Upload completeness, validation failures, and feature-level error rateQueue, execution, and total analysis timeInput/output size and spatial operation costRetry, cancellation, and orphaned-job rateLineage completeness and reproducibility checksShare access, export, denial, expiry, and revocation

Prove before continuing

Exact product entitlement and regional behavior are validated separately.Provider contract tests cover success, rejection, throttling, timeout, and unknown outcome.Security, privacy, operations, rollback, and product owners approve exact evidence.Fixture completion is never presented as provider or production completion.

Application-owned reliability scaffolds

The aggregate and SQL examples implement host truth; the fixture clients call the credential-free Journey Lab. Replace only the separately reviewed provider adapter seam.

Governed spatial analysis workshop scaffolds
type State = "draft" | "validating" | "published" | "processing" | "ready" | "shared" | "failed";
type CommandName = "create_dataset_version" | "validate" | "publish" | "run_analysis" | "complete_analysis" | "create_share";

type Command = {
  name: CommandName;
  aggregateId: string;
  expectedVersion: number;
  idempotencyKey: string;
};

const transitions = {
  "create_dataset_version": { from: [null], to: "draft", event: "dataset.version_created" },
  "validate": { from: ["draft"], to: "validating", event: "dataset.validation_started" },
  "publish": { from: ["validating"], to: "published", event: "dataset.published" },
  "run_analysis": { from: ["published", "ready"], to: "processing", event: "analysis.started" },
  "complete_analysis": { from: ["processing"], to: "ready", event: "analysis.completed" },
  "create_share": { from: ["ready"], to: "shared", event: "share.created" },
} as const;

export function decide(current: { state: State | null; version: number }, command: Command) {
  const rule = transitions[command.name];
  if (command.expectedVersion !== current.version) throw new Error("version_conflict");
  if (!rule.from.includes(current.state as never)) throw new Error("invalid_transition");
  return {
    state: rule.to as State,
    version: current.version + 1,
    event: rule.event,
    idempotencyKey: command.idempotencyKey,
  };
}

// Persist the result, immutable event, audit row, and outbox intent atomically.
// Store the first result by idempotencyKey before executing another effect.

Exit with reviewable evidence

All 6 reviewed transitions are implemented with actor and source-state checks.All 6 application event identities are immutable and versioned.Exact replay, idempotency conflict, stale version, invalid transition, and unknown outcome are tested.Aggregate, event, audit, command result, and outbox intent commit atomically.The Retail Site Lab capstone passes 8 declared tests after archive checksum verification.Provider entitlement, payload, callback, completion, and production behavior remain independently evidenced.
Workshop completion is not production authority

Workshop completion proves an application-owned reliability design only. Production still requires issued entitlement, exact adapter contract tests, regional and quota validation, security/privacy review, operational drills, and independent release approval.

Trace every external claim to an indexed source

Break the application before connecting the provider.

Run all five hostile scenarios and the maintained capstone test suite. Then qualify the exact provider seam under independently reviewed non-production entitlement.