v0.13.0 — Sandbox foundations: tenant-scoped resource collections
The first vertical of G19 — integration sandbox (ADR 0011): Mockifyr gains a tenant- and collection-scoped JSON document store behind /__admin/resources — the data plane the upcoming state directive (G19b) will read and write to make POST /orders create what GET /orders/{id} returns.
Sandbox resources (G19a)
- Collections of JSON documents, per tenant: create/replace (last-write-wins with version + timestamps), read, delete, per-collection and per-tenant reset
- Paginated listing from day one (
limit/offset, clamped 1..500) and a collections overview with counts - Transactional seed import: POST a JSON array — every item is validated before anything lands; explicit
ids honored, absent ids generated - Bounded by design: per-collection document cap (
--resource-limit, default 1000, oldest evicted first) and per-document body cap (--resource-max-body, default 1 MiB) with an honest 413 - Bodies are opaque JSON — validated well-formed at the edge, stored and re-served byte-for-byte (unicode/emoji proven over the wire)
- Honest error surface: 404 / 413 / 422 with typed codes
Enterprise-readiness, delivered not promised
Built under ADR 0011's binding addendum: exact-boundary validation (collection 64 / id 256 / UTF-8 byte cap), hostile and unicode ids as opaque keys, concurrency-safe store, opt-in everything — existing users see zero change.
Validation: 25 store + 8 handler unit tests, 7 wire self-tests over a real Kestrel host, Stryker 100 % on both new pure-logic files (24/24 + 24/24); no oracle exists (the reference engine has no resource concept), and the full differential suite stays green untouched — the proof the parity surface did not move.
Docs: admin API reference and CLI flags updated; design + criteria in docs/decisions/0011 and docs/parity/g19-sandbox.md.
🤖 Generated with Claude Code