Interact with a Stateful Preview and Managed App Data
Use the generated application, preserve state across revisions, and prove its data and validation boundaries before connecting enterprise systems.
The enterprise problem and today’s slice
Enterprise problem: Generated source is not a usable product, and a screenshot cannot show whether a customer can complete a workflow, keep state through a revision, isolate another app’s records, or recover from a bad schema change.
Whole-course context: The incoming artifacts are Day 02’s preview-ready rev-2, sandbox manifest, and immutable agent-run trace, all bound to the approved blueprint; this day advances from generation into preview interaction and managed app data.
Today’s slice: HelixWorks creates an isolated preview runtime with a revision-bound URL, per-app database and object storage, schema and migration controls, snapshots and reset, then layers independent validation around one stateful Workboard workflow.
End-of-day evidence: A customer can inspect the preview receipt, migration and reset records, browser trace, storage-isolation denials, and validation matrix for the exact revision and environment.
Still unsolved: Salesforce, Snowflake, private connectivity, human identity, sharing, production publication, and fleet operations are not granted or implied.
Customer outcome and implementation focus
The customer outcome is a reliable, reviewable implementation of 03 generated code validation. This day introduces the mechanism before policy detail and evidence review; it does not repeat the same customer stories in prose, tables, and diagrams.
Components in focus
Control-plane service owns desired state; runtime workers own execution; the policy/release boundary owns privileged effects. Compute: isolated service or sandbox tasks. Storage: PostgreSQL owns durable state, Redis is a bounded cache, object storage keeps artifacts/evidence, and queues are delivery buffers rather than authority.
Implement the mechanism
Implement the topic as an owned state transition with a named controller, durable record, bounded worker action, and observable terminal evidence. Verify a denied or failed path before calling the mechanism complete.
One Workboard system from lifecycle to evidence
A preview is not proved by a screenshot: the smallest useful claim is that one approved Workboard revision runs in an isolated environment, preserves only its own managed state, and leaves immutable evidence for success, denial, failure, and recovery. The diagrams below reveal that same system without changing its identifiers or authority model.
Locate today inside the full create-to-retire lifecycle
Optimizing only generation creates an attractive dead end if customers cannot safely publish, change, recover, export, or delete the result. this section therefore keeps the full product lifecycle visible even though today’s implementation and evidence stop at the stateful-preview gate.
Day 03 may produce a release candidate but cannot call it production-ready. Its exit condition is narrower: one source revision is bound immutably to one build, artifact, Software Bill of Materials (SBOM), provenance statement, IaC plan, preview environment, schema, migration lineage, and observed evidence bundle.
The full lifecycle prevents today’s preview evidence from being mistaken for connector, identity, publication, operations, or retirement evidence.
Accept a Day 03 result only as a stateful-preview result; keep every later lifecycle gate visibly open and unclaimed.
Reduce the slice to the smallest complete three-box model
Adding runtime internals before the reader can state the customer claim obscures what must be proved. At minimum, the creator acts through a governed preview control, Workboard changes tenant-scoped managed state, and an independent verifier compares the visible result with authoritative side effects.
This model covers every Day 03 use case without inventing another system: D03-UC-01 admits the revision, D03-UC-02 and D03-UC-03 exercise rows and objects, D03-UC-04 changes schema without losing accepted state, and D03-UC-05 restores or resets only the named environment.
One complete loop connects admission, customer interaction, authoritative state, and independent observation before provider detail appears.
If a proposed check cannot identify the admitted revision, the customer-visible outcome, and the authoritative state observation, it is not an end-to-end preview proof.
Expose trust boundaries and independent revocation
A sandbox product can isolate compute yet still leave application authentication, tenant authorization, data ownership, and evidence correlation to the platform using it, so provider features cannot be treated as compliance conclusions. Expand the three boxes into four independently governed boundaries: provider/control plane, hosted runtime, generated Workboard application, and the connector/source boundary that remains closed today. The provider-neutral control plane owns policy and evidence; a Daytona or Cloudflare adapter supplies only the demonstrated runtime observations it can produce.
| Boundary | Owns | Must not imply | Provider-neutral verification contract |
|---|---|---|---|
| Coding-agent control plane | Customer organization, prompt, blueprint, source revision, tools, approvals, policy, release decision, evidence index | Runtime isolation, app tenancy, or app-user access automatically passed | Every mutation returns actor, scope, policy, source revision, immutable operation ID, result, and timestamp |
| Runtime-provider adapter | Create, execute, limit, observe, export, stop, and destroy a sandbox/runtime using opaque provider references | Vendor logs or sandbox creation prove the app is secure or compliant | create, exec, collect, revoke, and destroy are idempotent; denied egress and cleanup are independently probed |
| Hosted build/preview boundary | Pinned build image, ephemeral workspace, workload identity, network policy, resource budgets, preview process | A preview URL grants project or generated-app membership | Only an admitted digest runs; workload, route, secret handle, expiry, and limits are observable without revealing secret bytes |
| Generated-application plane | App subjects, tenants, memberships, sessions, records, objects, row predicates, migrations | Provider organization membership or sandbox possession grants app authorization | Positive tenant workflow and same-ID cross-tenant denial both query the app’s authoritative stores |
| Connector/source boundary | Future connector versions, source-native grants, private routes, minimized operations, and lineage | Preview success grants enterprise-source access | Every source request is denied today because no connector binding, credential grant, or route exists |
Daytona’s current documentation describes organization audit records with actor, action, target, outcome, and time. Its secret substitution can restrict use to allowed hosts, but omitting the host list permits use with any host, so the adapter contract must require an explicit allowlist rather than relying on the default (Daytona audit logs, Daytona secrets). Cloudflare’s Sandbox documentation describes a separate virtual machine per sandbox and also states that application-level authentication remains necessary. Its documented outbound controls require internet access to be disabled and allowed destinations to be admitted through allowedHosts or request handlers; its proxy pattern keeps the real external credential in a Worker and gives the sandbox a short-lived token (Cloudflare Sandbox security model, Cloudflare network policies, Cloudflare proxy requests). These are different adapter capabilities, not parity, certification, or compliance claims.
Revocation is tested as paired controls: stopping the hosted runtime must not delete Workboard state; revoking synthetic Beta must not revoke Alpha or the provider reviewer; deleting a preview route must not create a connector grant; and the unopened source boundary must remain unreachable.
The three-box loop now shows four trust boundaries, their distinct owners, and the negative connector/source boundary that Day 03 must not cross.
Grant and revoke provider, runtime, app-subject, and source authority independently; any token, route, or membership that works across two planes is a boundary failure.
Close positive, denied, failure, and recovery paths with evidence
A digest on the final archive cannot show which source, dependencies, tests, and policies produced it, so the complete system closes every Day 03 path in an append-only, content-addressed chain from source through customer-visible evidence. Any changed byte creates a new node rather than updating a prior record.
Hermetic means the build reads only declared inputs in a clean worker, with a pinned operating-system/build image, toolchain, package manager, lockfile, locale, time zone, and command list. Network is disabled after approved dependency material is staged; caches are either empty or addressed by verified digests. Reproducibility is tested by building the same manifest twice in fresh workers, normalizing declared nondeterministic metadata such as archive timestamps, and comparing artifact and SBOM digests. A mismatch blocks promotion and preserves both outputs plus a diff; it is never averaged away or relabelled flaky.
| IaC and policy gate | Positive check | Denied or failure check | Immutable evidence |
|---|---|---|---|
| Module reuse and DRY | Preview plan instantiates the reviewed app-environment module with typed parameters | Provider adapter contains a second hand-written security group, database, or identity policy | Module digest, parameter digest, normalized plan, duplicate-resource scan |
| State and change control | Remote state is encrypted, locked, versioned, and scoped to app/environment | Concurrent plan, unlocked mutation, manual drift, or cross-environment state reference | Lock receipt, prior/current state digests, drift report, actor and approval |
| Identity and secrets | Workload receives expiring handles for exact operations and hosts | Plaintext secret, wildcard principal, reusable human credential, or secret in plan/log/source | Secret scan, policy denial, vault/proxy audit ID, no-secret side-effect probe |
| Network and exposure | Default-deny egress and an expiring authenticated preview route are explicit | Metadata, loopback, arbitrary internet, public database, or unauthenticated sensitive route | Resolved-destination probe, zero-byte denial, route and expiry receipt |
| Data and recovery | Dedicated preview database/object bindings, encrypted storage, snapshot, migration lock, and deletion job are planned | Shared unrestricted credential, destructive startup migration, missing backup test, or orphaned object namespace | Plan/resource IDs, migration and restore runs, cross-environment inventory diff |
| Resource and region policy | CPU, memory, disk, execution time, cost, data location, and retention are bounded | Missing quota, unsupported region, infinite retention, or privileged runtime | Policy input/output digests and named blocking rule |
The end-to-end (E2E) harness tests the product through its public controls and then inspects authoritative side effects. Every journey records actor, resource, scope, precondition, expected result, observed result, environment, trusted timestamp, and immutable source, trace, run, artifact, policy, and evidence IDs.
| Journey | Customer action | Required observed path | Side-effect oracle | Release rule |
|---|---|---|---|---|
| Positive | Alpha launches preview-42, creates and completes a todo, uploads brief.txt, and refreshes | Browser and API return the accepted state under the exact artifact/schema label | Alpha rows and object metadata exist once with expected checksums | Pass only if customer-visible and store observations reconcile |
| Denied | Beta requests Alpha’s same local todo and object identifiers; build worker also probes a forbidden destination | Neutral application denial and egress policy denial occur before sensitive work | No Beta-visible bytes, no row/object mutation, no external connection | Pass only with denial plus zero-side-effect evidence |
| Failure | Candidate rev-3-bad fails a test, policy rule, reproducibility comparison, or post-migration assertion | Candidate never becomes the active preview binding | Prior artifact/schema remains active; candidate namespace is quarantined | Block candidate and retain exact failing inputs and outputs |
| Recovery | Operator restores a validated snapshot into a replacement namespace, then confirms a preview-only reset | Restored flow works before switch; reset affects only named preview | Record counts, tenant keys, checksums, object references, and unrelated inventories match expected state | Pass only if continuity and unaffected positive controls are observed |
SandboxAdapter acceptance is intentionally portable: run the same contract corpus against Daytona and Cloudflare, normalize their opaque runtime/log references into the evidence schema, and compare customer-visible and side-effect outcomes. A provider-specific capability may strengthen one implementation, but it cannot waive a missing app-auth test, policy denial, reproducibility result, restore proof, or retention requirement.
The complete system now terminates every permitted, denied, failed, and recovered Workboard journey in independently observed, immutable evidence bound to one revision and environment.
Release the preview claim only when positive state, zero denied side effects, unchanged active state after failure, and scoped recovery all reconcile to the same immutable identifiers; otherwise block and preserve the gap.
Make preview an interactive product boundary
A static render can look correct while buttons, writes, refreshes, and revision changes fail, so customers need a real but non-production place to use the generated app. A preview is a control-plane registration that routes an expiring URL to one app environment and one source revision running in an isolated preview runtime.
The preview gateway validates the preview identifier, expiry, audience policy, and route before forwarding traffic. Possessing a preview URL does not grant project membership, source editing, generated-app membership, another preview, or production access. The companion authorization course configures human application identity; today’s lab uses synthetic preview principals issued only for this isolated environment.
The runtime executes a built artifact for rev-2 with explicit configuration, resource limits, network policy, app-scoped storage bindings, and a short-lived workload identity. It receives secret handles rather than secret values in source or browser code. The preview record names its application, revision, schema version, storage namespace, created time, expiry, owner, and reset policy.
Updating source does not mutate a running preview invisibly. HelixWorks builds a candidate, runs admission checks, records the new artifact digest, then atomically changes the preview binding from rev-2 to rev-3. Failed builds leave the previous preview usable and visible as the active revision.
Give every app and environment separate managed stores
A shared database credential or object prefix can let generated code from one app read another app’s state, turning a preview defect into cross-project exposure. Managed data is therefore provisioned per app and environment with explicit ownership, namespace, policy, quotas, and lifecycle.
The database stores structured domain records and enforces schema constraints and transactions. Object storage stores blobs such as attachments under opaque keys and metadata; generated apps never construct global bucket paths or receive a bucket-wide credential. A broker issues the preview runtime narrowly scoped access to app:workboard/environment:preview, and server-side application policy still decides which domain actor may access a particular record or object.
| Data kind | Authority and ownership | Preview lifecycle | Forbidden shortcut |
|---|---|---|---|
| Project source | HelixWorks control plane on the customer’s behalf | Revisioned independently of app data | Treating source access as row access |
| Preview database | Generated app’s preview environment | Migrated, snapshotted, reset, and deleted by explicit policy | Sharing one unrestricted schema or credential across apps |
| Preview objects | Generated app’s preview environment | Key-scoped upload/read, malware scan, retention, reset | Public bucket or predictable cross-app key |
| Production app data | Generated app’s future production environment | Not created or mutated today | Copying preview records into production implicitly |
| Source-system data | External authoritative system | Not connected today | Calling a cache or export the new source of truth |
Database rows carry the app and domain scope required by the blueprint; object metadata carries app, environment, owning domain record, media type, size, checksum, and scan state. The object becomes visible only after validation and scan policy pass. Deleting a database row does not prove its object, snapshot, or exported copy is gone, so lifecycle jobs and evidence cover each store separately.
Network reachability to a database is not authorization. The runtime needs both an app/environment workload grant and server-side domain policy. Project administrators can reset preview data through the control plane, but that administrative operation does not make them generated-app users.
Treat schema, migrations, snapshots, and reset as different controls
Generated code can expect columns that do not exist or apply a destructive migration that makes an earlier artifact unusable, so data evolution must be ordered and recoverable. A schema defines permitted data shape; a migration is a versioned transition between schemas; a snapshot is a point-in-time recovery copy; reset deliberately returns a preview environment to a declared baseline.
The migration controller, not generated application startup, holds schema-change authority. It checks that the migration ID follows the recorded parent, obtains an environment-scoped lock, captures a pre-change snapshot, applies the migration once using an idempotency key, verifies constraints and representative data, then records the schema digest. Application traffic switches only after compatibility checks pass.
Prefer backward-compatible expansion before contraction: add nullable or defaulted fields, deploy code that understands both versions, backfill with checkpoints, then remove old fields in a later governed change. An artifact rollback and a database rollback are different operations. Restoring old code may not understand a new schema, while reversing a migration may lose accepted writes; the preview controller must state which artifact-schema pairs are compatible.
A snapshot is not a backup claim until restore is tested. Restore into a replacement namespace, verify record counts, checksums, constraints, object references, and isolation, then switch the preview binding. Reset is intentionally destructive to preview data and requires a confirmation showing the exact app, environment, target seed, snapshot policy, and consequence. It never touches production or source-system data.
Rebuild without hiding state or revision changes
An automatic rebuild can silently pair new code with old assumptions or erase customer-created fixtures, making failures impossible to reproduce. The preview loop keeps source revision, artifact digest, schema version, and data namespace visible as separate bindings.
When the customer requests a change, HelixWorks creates rev-3-draft in the project and runs the bounded Day 02 agent workflow. A successful build creates a candidate artifact; static and migration-plan gates run before any data change. If the change needs m002, the controller snapshots, migrates, verifies, then changes the preview binding. The customer sees a short maintenance state rather than requests split across incompatible versions.
Preserving state is a policy choice, not a default promise. A compatible revision reuses the current preview data namespace. A reset-required revision explains why and offers an export or snapshot according to policy. A fork creates a new namespace from an approved snapshot so experiments cannot mutate the original preview.
Each visible preview page should expose a non-secret build label such as preview-42 / rev-3 / schema-v2. A customer report can then name the exact state. Cache keys include preview, artifact, and schema compatibility identifiers so an old response cannot masquerade as the new revision.
Complete one stateful Workboard preview lab
Separate demonstrations of rendering, persistence, migration, and reset can all pass while their composition fails, so the primary lab crosses those seams in one customer workflow. It uses only synthetic Workboard principals and data; identity federation and production access remain out of scope.
- Create preview
preview-42fromrev-2, verify its receipt binds Workboard, the preview environment, artifact digest, schemav1, database namespace, object namespace, expiry, and runtime policy. - Open the URL as synthetic Alpha editor, create “Prepare launch notes,” attach
brief.txt, mark the todo complete, refresh the browser, and verify record plus attachment persist. - Open a synthetic Beta-scoped request for the Alpha todo and object key. Require a neutral denial, unchanged row and object state, and no existence leak.
- Request the blueprint-compatible change “add optional completion note.” Generate
rev-3, inspect migrationm002, capture a snapshot, migrate, and atomically update the preview. - Verify the original completed todo and attachment remain visible; add a completion note; confirm
schema-v2andrev-3are displayed. - Inject a failing migration verification in a disposable fork. Require the original preview binding and data to remain intact and record the replacement-store restore result.
- Reset
preview-42to the approved seed after explicit confirmation. Verify user-created rows and objects are removed only from that preview and the schema remains at the declared baseline version.
| Lab assertion | Expected oracle |
|---|---|
| Stateful refresh | Independent database query plus browser-visible completed state |
| Attachment isolation | Object broker denial, no bytes returned, unchanged metadata |
| Revision migration | Migration ledger, before/after data comparison, active binding receipt |
| Failed candidate | Old revision remains served; replacement namespace quarantined |
| Reset | Database and object inventories match seed; other app namespaces unchanged |
The lab passes only when the customer can use the flow and an independent harness can verify data state. A browser screenshot without database, object, revision, and migration evidence fails.
Layer validation around the interactive workflow
A successful browser path can coexist with unsafe queries, inaccessible controls, visual breakage, or unacceptable latency, so one end-to-end test cannot carry the whole assurance claim. A validation matrix maps each blueprint criterion to independent gates whose different strengths cover static source, domain logic, real boundaries, user interaction, and quality budgets.
Run cheap deterministic gates first. Pin the package manager, lockfile, runtime image, commands, and clean-workspace requirement. Unit tests exercise state transitions, roles, idempotency, and property-generated sequences with recorded seeds and smallest failing inputs. Integration tests use the production-equivalent database engine, real migrations, object broker, transactions, and Alpha/Beta same-local-ID fixtures.
Browser tests select controls by accessible role and name, wait for named visible or network state rather than sleeps, and capture trace, console, failed requests, screenshot states, browser version, and accessibility tree. Hiding a button is not authorization, so direct API and object calls prove denial with no mutation. Visual baselines cover empty, populated, validation-error, narrow, and zoomed states under pinned rendering conditions.
Target Web Content Accessibility Guidelines (WCAG) 2.2 Level AA where applicable, combining automated rules with keyboard, focus, reflow, status-announcement, and assistive-technology checks. Performance evidence names dataset, request mix, concurrency, geography, database tier, cache state, warm-up, browser profile, percentiles, errors, throughput, and asset budgets. A skipped, stale, flaky, or wrong-revision gate is not-run or failed evidence, never an inferred pass.
| Criterion | Static/unit | Integration | Browser/quality | Negative proof |
|---|---|---|---|---|
WB-TODO-001 | Title, transition, retry properties | API, transaction, tenant key | Create, complete, refresh, keyboard status | Beta same-ID denial and no mutation |
WB-OBJ-001 | Type and size rules | Object key, checksum, scan state | Upload and download by accessible name | Cross-app key and executable content denied |
WB-MIG-002 | Migration graph and compatibility | Snapshot, apply-once, data comparison | Revision/schema label and preserved flow | Failed candidate cannot switch binding |
| Preview reset | Confirmation schema | App/environment inventory comparison | Visible seed state | Other preview and production untouched |
Challenge managed-data invariants across archetypes
Workboard alone may hide storage assumptions that fail for analytical reads or untrusted public writes, so bounded reference probes challenge the shared platform mechanisms. They are not additional full labs and do not claim every archetype is implemented.
| Archetype | Database need | Object need | Schema/reset falsifier |
|---|---|---|---|
| Workboard | Tenant-scoped transactional todos | Board attachments | Migration preserves tenant keys; reset affects one preview only |
| Revenue dashboard | App-owned cache, metric definitions, lineage pointers | Approved export artifacts if enabled | Cache schema never becomes source authority; refresh/reset retains lineage |
| Public intake | Append-only submissions and moderation state | Untrusted uploads quarantined until scan | Anonymous write grants no list/read; reset deletes preview objects and records together |
For the dashboard, Salesforce or Snowflake data is not connected until Day 04; fixtures stand in for source responses. For public intake, the runtime gets an upload operation restricted by app, environment, object prefix, media type, size, count, and expiry. Any cross-app read, public listing, or orphaned reset artifact falsifies the shared invariant.
Record evidence at the resource and environment scope
Preview evidence can become dangerous if a result for one revision, actor, or namespace is reused for another, so every material observation carries enough context to reject mismatches. Store immutable raw artifacts separately from the append-only index.
| Field | Example |
|---|---|
| Actor / resource / scope | synthetic:alpha-editor / todo:alpha/launch-notes / app:workboard environment:preview tenant:alpha |
| Precondition | preview-42 serves rev-3, schema v2, fixture set seed-7 |
| Expected | Todo and attachment persist; Beta receives neutral denial with no mutation |
| Observed | Refresh succeeded; database and object assertions passed; Beta denied |
| Immutable trace/run/artifact ID | trace://browser/p42-81, run://validation/val-203, artifact://db-check/sha256:example |
| Timestamp | 2026-07-28T14:09:12Z from trusted validation clock |
| Environment | preview-42, runtime image and browser digests, region test-eu |
Also bind the project, app, preview, source revision, artifact, schema, migration, snapshot, policy, gate, result, and gap status. Evidence about preview data does not become evidence about production or source-system data merely because identifiers resemble one another.
Further reading
Validation and data controls drift into folklore when teams cite generic best practices, so reviewable criteria should point to versioned primary standards. These official sources anchor security, accessibility, and secure-development claims while leaving application-specific threat analysis explicit.
- OWASP Application Security Verification Standard — versioned application-security requirements for server, API, session, file, and data controls.
- W3C Web Content Accessibility Guidelines 2.2 — normative success criteria for the declared accessibility target.
- NIST SP 800-218, Secure Software Development Framework 1.1 — lifecycle practices for verification, vulnerability response, and preserved evidence.
- NIST SP 800-53 Rev. 5 — control catalog covering access, audit, configuration, contingency, and system integrity concerns relevant to managed preview environments.
Key takeaways
Managed preview architecture contains many moving parts, and customers need the few governing distinctions kept visible. Carry these rules forward before any enterprise source is connected.
- A preview is a revision-bound non-production endpoint, while a runtime is the isolated compute that serves it.
- Per-app, per-environment database and object grants prevent ambient cross-project data access.
- Schema migration, artifact rollout, snapshot restore, and destructive reset are separate controlled operations.
- One stateful Workboard lab proves interaction, persistence, revision, isolation, migration, and reset composition.
- Layered gates make bounded claims; missing, stale, skipped, or flaky evidence cannot be called a pass.
Checklist
A preview can appear functional while its revision, data, or recovery boundary is wrong, so completion requires both customer interaction and independent state evidence. Every checked item should identify the exact preview environment.
- [ ] The preview receipt binds app, revision, artifact, schema, stores, policy, owner, and expiry.
- [ ] Preview-link, project, runtime, app, connector, and production authority remain distinct.
- [ ] Database and object access are scoped per app and environment with no ambient credential.
- [ ] The Workboard flow persists across refresh and a compatible revision.
- [ ] Alpha/Beta and cross-app database and object denials prove no read, write, or existence leak.
- [ ] Migration is locked, apply-once, snapshotted, verified, and compatibility-checked.
- [ ] Failed candidate rollout leaves the active preview and original data intact.
- [ ] Reset names its destructive scope and proves other environments are unchanged.
- [ ] Validation spans static, unit/property, integration, browser, accessibility, visual, performance, and abuse evidence.
- [ ] Evidence rows contain actor/resource/scope, precondition, expected, observed, immutable IDs, timestamp, and environment.
HelixWorks repository lab
Before adding a preview database, prove the smallest tenant-scoped storage rule in in-memory-blueprints.ts. Northstar's supplier-onboarding records must never be addressable through another organization's key.
public find(
tenantId: TenantId,
id: BlueprintId,
version: number,
): Promise<ApprovedBlueprint | null> {
return Promise.resolve(this.#records.get(`${tenantId}:${id}:${version}`) ?? null);
}
public async commit(blueprint: ApprovedBlueprint, event: BlueprintApprovedV1): Promise<void> {
const key = `${blueprint.tenantId}:${blueprint.blueprintId}:${blueprint.version}`;
if (this.#records.has(key)) {
throw new BlueprintConflictError('Blueprint version is immutable');
}
await this.outbox.append({
id: event.eventId,
tenantId: event.tenantId,
event,
createdAt: blueprint.approvedAt,
publishedAt: null,
attempts: 0,
});
this.#records.set(key, blueprint);
}
The code declares two invariants: every lookup includes the tenant, and an approved version is insert-only. The repository adapter interprets those rules and changes its record map plus outbox. Locally that is RAM; a durable adapter must enforce equivalent composite keys and transactionality on database CPU, memory, disk, and network. A successful same-tenant read, a null cross-tenant read, and an immutable-version conflict are evidence.
SRP keeps storage mechanics out of the blueprint domain. DRY reuses tenant and blueprint ID types. IoC/DI lets the same application service receive an in-memory test adapter or PostgreSQL adapter. MVC prevents UI state from becoming authority. PubSub gets its event from the same unit of work; IaC supplies isolated environment databases and encryption. The rule is portable even when the mechanism changes.
pnpm vitest run services/control-plane/src/control-plane.test.ts
pnpm smoke:product
Attempt a read with a different tenant, commit the same version twice, and simulate an outbox failure. Passing evidence means no record crosses the tenant key, duplicates conflict, and a failed event append leaves no approved record. This is a foundational storage proof, not a claim that the current monorepo already supplies the preview runtime, migration engine, object scanner, or restore workflow described earlier in the lesson.