Build against an explicit contract
A host application embeds a provider-owned surface but must retain validation, persistence, accessibility, recovery, and business submission authority.
Define the user and system contract
A host application embeds a provider-owned surface but must retain validation, persistence, accessibility, recovery, and business submission authority. Record the region, data freshness, latency budget, privacy purpose, credential owner, and fallback before choosing an SDK or endpoint.
Constrain the trust boundary
Pin the documented origin/component/release, CSP and frame policy, exact message origin, versioned allow-list schema, credential class, entitlement, and one host generation.
<a
href="https://mappls.com/MMI000"
target="_blank"
rel="noopener noreferrer"
>
Open this place in Mappls
</a>Separate candidate from commitment
Treat every callback/message as untrusted candidate evidence, copy only bounded identity, require a deliberate user commit, invalidate selection after host edits, and persist with idempotency and expected version.
Operate failure and retirement
Handle blocked script/frame, timeout, denied access, duplicate/late messages, back navigation, bfcache, unmount, dependency upgrade, accessibility focus, useful manual fallback, telemetry minimization, and rollback.
Prove the production behavior
Automate the happy path and every named failure. The release is ready only when wrong-origin and unknown-schema input changes no state; candidate receipt cannot submit the business record; fallback supports keyboard and screen-reader completion; unmount and rollback leave no active generation. Capture provider request identity without logging credentials or unnecessary precise location.
Failure modes you must exercise
Fail fast with a typed, user-safe outcome and preserve the original request identity.
Keep the last verified state, mark freshness honestly, and retry only within the documented idempotency boundary.
Reconcile durable local and provider evidence before declaring success or issuing a compensating command.
Timeout after a stateful command is an unknown outcome. Query by provider/idempotency identity or wait for authoritative events; do not blindly retry a new command.
Definition of done
Widgets production checks
Continue from source, contracts, and a full app
These links resolve to repository-derived evidence; unsupported package names and endpoints are not filled in from guesswork.
mapmyindia-intouch-web-pluginsmappls-app-widgetsmappls-web-plugins6 verified testsRun it, break it, then observe it
Start with fixture credentials, execute the failure plan, and use request logs, usage, webhook evidence, and operational metrics before promoting traffic.