projection_cache_retirement.v2.json (3768B)
1 { 2 "schema": "radroots.projection-cache-retirement.v2", 3 "status": "implemented_candidate", 4 "owners": [ 5 "radroots_storage", 6 "radroots_storage_sqlite" 7 ], 8 "authority": "Explicit cache identity registration and immutable positive caller-owned limits. Application policy remains outside Lib. Unsupported providers refuse the new methods.", 9 "accounting": "One store-wide logical value-byte, protected-generation and legacy-snapshot budget includes legacy, active and staging projection rows. Scalar migration initialization is explicit; subsequent declared writers update cached counters under their owner lock or transaction. Growing admission refuses capacity without partial rows or status. Collection may reduce pre-existing excess.", 10 "retirement": "Exact registered cache owner, canonical source token and expected active generation are compared before effects. A current Ready active generation is protected. Obsolete, staged or explicitly invalidated generations can be retired. Stale active retirement clears its derived status atomically; canonical events, authored work, intents, receipts and media custody are untouched. An exact unconfigured legacy checkpoint may release metadata protection only when explicitly Invalidated, without an active rebuild or live batch registration, under the complete canonical source token and expected-active fence. Its checkpoint source generation must match the canonical store. Preserve Invalidated status and all document/snapshot bytes. Exact repeated retirement is idempotent and grants no cache-owner registration or collection authority.", 11 "collection": "At most64 total exact-generation document, legacy snapshot and registration rows per pass. Active/staging documents are protected. Unrelated projection identities cannot be collected unless explicitly registered as derived cache by their owner. Continuation reflects remaining eligible work. Metadata selection and deletion occur in one transaction or lock, without payload hydration.", 12 "legacy_snapshots": "Configured cache identities create no new whole-view snapshot sessions. Existing exact duplicate replay cannot extend fixed expiry. Owner wall time and a durable high-water govern legacy expiry; caller as-of is never a clock input. Configured legacy snapshot reads on a read-only provider refuse continuation. Exact unconfigured lookups validate scalar lengths and fixed digests before hydration.", 13 "compatibility": "Historical migrations1-21 are immutable. Forward22 owns only derived-cache accounting, registration and indexes. Unconfigured inventory semantics remain supported. Physical database/WAL pages are separate from logical live value-byte quota and are not promised to shrink after collection.", 14 "non_goals": [ 15 "leases", 16 "new per-read snapshots", 17 "application policy", 18 "canonical data deletion", 19 "new database", 20 "worker", 21 "vacuum", 22 "physical-device qualification" 23 ], 24 "batch_admission": "One final aggregate policy independent of input order. Up to64 scalar old lengths are preflighted in BEGIN IMMEDIATE. True aggregate growth beyond immutable configured limits refuses before payload effects; non-growing replacement can reduce pre-existing excess. A private final-byte reservation exists only inside that transaction, shrinking rows precede growth, and exact counters/reservation are checked and cleared before commit. Failure, cancellation and crash roll back the transaction. Direct writers retain ordinary per-write guards. Historical migrations1-21 remain unchanged.", 25 "supersedes_without_mutation": { 26 "path": "contracts/architecture/decisions/projection_cache_retirement.v1.json", 27 "sha256": "166ff761aea04d96517398e76803e290e81ae07eb3598ae3f2774d0f6dc6c6b4" 28 } 29 }