044-runtime-optimization-increment-2
Runtime optimization increment 2: duplicate suppression, persistent and decision-result caches, batching qualification (amends 017, 003, 002, 009, 012 and 020)
An amendment of approved spec 017 (and, through it, of spec 003's concurrency and cancellation rules) for #76 child F1, which also amends specs 002, 009, 012 and 020 where its members and batching rules reach them. Completes 017 increment 2 and adds a decision-result cache. Concurrent duplicate suppression keeps spec 003's rule that the runtime spawns no task per request: a shared attempt lives in a runtime-owned slot that is driven by whichever waiter is polled, a waiter that cancels returns at once and hands charge ownership to the oldest remaining waiter, and the last waiter to leave cancels the attempt under spec 003's existing rules. Persistent caches sit behind a host-implemented `RuntimeStore` seam with durable generations, conditional writes, byte budgets and integrity-checked `rustev.cache-entry/1` entries. The decision-result cache reuses a whole decision's semantic work under a compiler-derived key that always holds plan identity, the complete authorized scope, the profile and declared upstream-origin dimensions; on a hit the core recomputes the judgment and the runtime re-runs the compiler-derived dependency closure of every declared volatile source, with a declared policy when refresh fails that never serves stale evidence as a value. Capabilities may declare `isolation: per_item`, which every batching path honours, and adapter-scoped batching gains a qualification procedure and report (`rustev.batch-qualification/1`). Plans, descriptors and records that use none of this keep their bytes and identities. Approved (A-41); implementation is in progress.
Read the full pinned specification ↗Relationships
depends on
- 001-boundaries-and-authority
- 002-decision-contract-and-pure-core
- 003-runtime-execution-and-evidence
- 004-evaluation-and-replay
- 006-cli-surface
- 009-remote-adapter-protocol
- 012-jev-integration
- 013-remote-state-on-failed-attempts
- 017-general-runtime-optimization
- 020-remote-protocol-refinements
- 023-real-data-quality-qualification
- 027-node-and-wasm-bindings
- 031-public-api-and-release-family
- 032-evidence-quality
- 034-parameterized-definitions
- 035-screening-seam
- 036-mid-plan-acquisition
- 037-generation-steps
depended on by
amends
amended by
Claimed units
- extends
{ "nature": "amending", "spec": "002-decision-contract-and-pure-core", "unit": { "kind": "directory", "path": "crates/rustev-contract/" } } - extends
{ "nature": "amending", "spec": "002-decision-contract-and-pure-core", "unit": { "kind": "directory", "path": "crates/rustev-core/" } } - extends
{ "nature": "amending", "spec": "003-runtime-execution-and-evidence", "unit": { "kind": "directory", "path": "crates/rustev-runtime/" } } - extends
{ "nature": "additive", "spec": "004-evaluation-and-replay", "unit": { "kind": "directory", "path": "crates/rustev-eval/" } } - extends
{ "nature": "amending", "spec": "009-remote-adapter-protocol", "unit": { "kind": "directory", "path": "integrations/rustev-remote-http/" } } - extends
{ "nature": "amending", "spec": "012-jev-integration", "unit": { "kind": "directory", "path": "integrations/rustev-jev/" } } - extends
{ "nature": "additive", "spec": "027-node-and-wasm-bindings", "unit": { "kind": "directory", "path": "integrations/rustev-node/" } } - extends
{ "nature": "additive", "spec": "027-node-and-wasm-bindings", "unit": { "kind": "directory", "path": "integrations/rustev-wasm/" } } - extends
{ "nature": "additive", "spec": "031-public-api-and-release-family", "unit": { "kind": "directory", "path": "tools/rustev-release/" } } - extends
{ "nature": "additive", "spec": "006-cli-surface", "unit": { "kind": "directory", "path": "crates/rustev-cli/" } } - extends
{ "nature": "additive", "spec": "001-boundaries-and-authority", "unit": { "kind": "file", "path": "Makefile" } } - extends
{ "nature": "additive", "spec": "001-boundaries-and-authority", "unit": { "kind": "directory", "path": "scripts/acceptance/" } }
Source headings
- 044: Runtime optimization increment 2 (amends 017, 003, 002, 009, 012 and 020)
- 1. Purpose
- 2. Territory
- 2.1 Binding principles of #76
- 3. Behavior
- 3.1 Policy members and plan identity
- 3.2 Concurrent duplicate suppression
- 3.2.1 Eligibility
- 3.2.2 The shared slot
- 3.2.3 Leaving, handoff and the last waiter
- 3.2.4 Charge, reservation and liability
- 3.2.5 Evidence
- 3.3 Tiers and lookup order
- 3.4 Runtime store and persistent entries
- 3.4.1 The seam
- 3.4.2 Store failure policy
- 3.4.3 Entry document and checks
- 3.4.4 Budgets
- 3.5 Key discipline
- 3.6 Decision-result cache
- 3.6.1 Key
- 3.6.2 Volatile sources and the refresh closure
- 3.6.3 Lookup and serving
- 3.6.4 Admission
- 3.6.5 Refresh failure
- 3.6.6 Evidence and origins
- 3.7 Per-item isolation
- 3.8 Adapter-scoped batching qualification
- 3.9 Refusal and diagnostic codes
- 3.10 Compatibility
- 4. Out of scope
- 5. Observable negative cases
- Acceptance
- Verification
- Implementation record
- Decisions at approval
Frozen anchors
No frozen anchors declared.