Advanced2 hr 10 min8 implementation labs5 hostile paths

Build Governed place contribution and publication

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

Durable boundaryplace contribution · 7 states · 8 transitions · 8 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 place contribution blueprint into an explicit aggregate boundary owned by the application.

Build

draft: The host owns a bounded contribution intent, business purpose, and external identity before any provider surface opens.widget_open: The Mappls-hosted form is visible for one recorded attempt, while provider UI and submission remain outside the host contract.submission_reported: The contributor says the hosted form showed success, which is useful testimony but not a receipt or publication result.publication_pending: An operations process is checking supported Mappls search or an approved provider receipt for a stable published identity.published: A supported provider surface returned a six-character Mappls Pin with attributable observation evidence.rejected: A reviewer found a duplicate, invalid, unsafe, or otherwise non-publishable contribution and recorded why.withdrawn: The host stopped its own follow-up workflow at the contributor's request without claiming that the provider submission was deleted.

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_contribution by Host application: new aggregate → draft; emit place_contribution.created.open_widget by Contributor: draft → widget_open; emit place_contribution.widget_opened.report_submission by Contributor: widget_open → submission_reported; emit place_contribution.submission_reported.queue_reconciliation by Host application: submission_reported → publication_pending; emit place_contribution.reconciliation_queued.confirm_publication by Operations reviewer: submission_reported | publication_pending → published; emit place_contribution.published.reject by Operations reviewer: submission_reported | publication_pending → rejected; emit place_contribution.rejected.retry by Contributor: rejected → widget_open; emit place_contribution.retried.withdraw by Contributor: draft | widget_open | submission_reported | publication_pending → withdrawn; emit place_contribution.withdrawn.

Prove before continuing

create_contribution resolves to place-contribution-publication-place-contribution-created without claiming a provider webhook payload.open_widget resolves to place-contribution-publication-place-contribution-widget-opened without claiming a provider webhook payload.report_submission resolves to place-contribution-publication-place-contribution-submission-reported without claiming a provider webhook payload.queue_reconciliation resolves to place-contribution-publication-place-contribution-reconciliation-queued without claiming a provider webhook payload.confirm_publication resolves to place-contribution-publication-place-contribution-published without claiming a provider webhook payload.reject resolves to place-contribution-publication-place-contribution-rejected without claiming a provider webhook payload.retry resolves to place-contribution-publication-place-contribution-retried without claiming a provider webhook payload.withdraw resolves to place-contribution-publication-place-contribution-withdrawn 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

Contribution aggregate: Current host-owned state, business identity, purpose, ownership, and optimistic version. Keys: contributionId, externalId, state, version, purpose, owner.Widget attempt: Immutable record of each frame launch and contributor-reported outcome without provider-internal data. Keys: attemptId, aggregateVersion, openedAt, reportedAt, documentedSourceUrl.Publication evidence: Attributable supported-source proof that a stable Mappls identity is observable. Keys: mapplsPin, evidenceSource, observedAt, sourceFingerprint, reviewer.Audit and outbox: Append-only transitions and exactly-once-in-effect downstream notifications. Keys: eventId, aggregateVersion, actor, idempotencyKey, outboxStatus.

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

A hosted success screen or contributor report never proves publication.No callback, browser message, receipt, moderation status, or withdrawal capability is invented when the public source does not document it.Only provider-backed evidence containing a valid Mappls Pin can close the aggregate as published.Every widget attempt is immutable and linked to the aggregate version that opened it.Commands are idempotent, compare expected version, and commit audit plus outbox atomically.Contribution text, actor identity, and precise location follow declared purpose, access, and retention boundaries.

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

Hosted frame is blocked or unavailable: detect with The host cannot load the established HTTPS source within its timeout and CSP boundary. Recover with Keep the contribution in draft, explain the boundary, and offer an external open or later retry without claiming a submission.User loses the success acknowledgement: detect with No provider receipt exists and the contributor cannot confirm what the hosted surface showed. Recover with Leave the attempt unresolved and allow a deliberate new attempt; never infer completion from iframe navigation.Reconciliation finds an existing duplicate: detect with Supported search resolves the same place identity or a reviewer establishes duplicate ownership. Recover with Reject with duplicate reason and link the known Mappls Pin as context, not as evidence that this attempt created it.No public result appears within the operating window: detect with Every bounded supported-source check returns no qualifying Mappls identity before the stated review deadline. Recover with Keep pending or reject according to published host policy and expose the last check time without promising a provider SLA.Application restarts during review: detect with An in-flight command lacks acknowledgement while aggregate, command key, and outbox state are durable. Recover with Reload the aggregate and replay the same command key; do not duplicate an attempt, decision, or notification.

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 Place Contribution Desk 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

Widget opens, contributor reports, and abandonment by attemptTime from report to first reconciliation and terminal decisionPending age and last supported-source checkPublication evidence source and Mappls Pin validityDuplicate and rejection reasons without opaque provider payloadsWithdrawal count explicitly separated from provider-side deletionIdempotency replay and optimistic version conflict rateOutbox backlog, retry, and dead-letter age

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 place contribution and publication workshop scaffolds
type State = "draft" | "widget_open" | "submission_reported" | "publication_pending" | "published" | "rejected" | "withdrawn";
type CommandName = "create_contribution" | "open_widget" | "report_submission" | "queue_reconciliation" | "confirm_publication" | "reject" | "retry" | "withdraw";

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

const transitions = {
  "create_contribution": { from: [null], to: "draft", event: "place_contribution.created" },
  "open_widget": { from: ["draft"], to: "widget_open", event: "place_contribution.widget_opened" },
  "report_submission": { from: ["widget_open"], to: "submission_reported", event: "place_contribution.submission_reported" },
  "queue_reconciliation": { from: ["submission_reported"], to: "publication_pending", event: "place_contribution.reconciliation_queued" },
  "confirm_publication": { from: ["submission_reported", "publication_pending"], to: "published", event: "place_contribution.published" },
  "reject": { from: ["submission_reported", "publication_pending"], to: "rejected", event: "place_contribution.rejected" },
  "retry": { from: ["rejected"], to: "widget_open", event: "place_contribution.retried" },
  "withdraw": { from: ["draft", "widget_open", "submission_reported", "publication_pending"], to: "withdrawn", event: "place_contribution.withdrawn" },
} 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 8 reviewed transitions are implemented with actor and source-state checks.All 8 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 Place Contribution Desk 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.