# Stage 134: 5-Tier Cache Outage Shield (aq134_shield_five_tier_cache_stampede / DB-UNIT-15)

Shields origin stores from thundering-herd stampedes and upstream brownouts via SingleFlight coalescing, 24h Stale-If-Error snapshots, and XFetch probabilistic refresh.

- Atomic micro-queue: `aq134_shield_five_tier_cache_stampede` (visibility: `public_commons`)
- Backing database unit: `DB-UNIT-15` (`Thin Per-Site Identity, Surface Lenses & 3-Mode Delivery Core`)
- Database cell: `entities-db.teleon.dev` (`teleon_core.surface_lens_projections`, `teleon_core.adaptive_delivery_manifests`, `teleon_core.bot_and_contributor_lineage_index`)
- Claim row hydration: `single_self_contained_flat_task_row` (100% context inline, normalized writeback)
- Track 2 Sister queue (`SISTER-15`): `sq15-improve-delivery-queue.teleon.dev` (Tune inline/URI/stream byte cutoffs, semantic cache hit rates, and isolated surface lens presets.)
- Lanes: SingleFlight Miss Coalesce, Stale-If-Error 86400s, XFetch Early Refresh

## Execution engines & AI Agent freedom contract

- **Deterministic (0 model calls)**: `three_mode_delivery_and_lens_projector_v1` (SingleFlight waiter broker, XFetch log-random trigger & HTTP 206 snapshot server (0 calls))
- **Hybrid (<=1 model call)**: `surface_onboarding_lens_calibrator_v1`
- **AI Agent & Bot Fleet (1..6 calls)**: `cross_surface_gap_and_ux_auditor_v1` (High-value snapshot warmer & TTL policy optimizer)
  - Contract: **Instructions + Resources + Freedom to search for new resources and new ways not bound by instructions**

## Database invariants

- Each downstream website keeps an isolated identity database and cookie while sharing non-personal content-addressed supply.
- Delivery selects inline_answer (<=64 KiB), uri_manifest (<=8 MiB), or range_stream_206 (>8 MiB) deterministically.

## External & internal bot fleet actions

- Collapse N simultaneous cold misses on the same SWHID into exactly 1 origin read
- Serve verified L2/L3 snapshots seamlessly with zero errors when upstream providers brown out
- Refresh hot keys asynchronously before TTL expiry using XFetch exponential early recompute

## Sister self-tuning areas

- Tune inline payload vs URI manifest vs HTTP 206 stream thresholds per client harness (DIM-07)
- Add declarative surface lens presets for humanitarian SDG, ML competitions, and STEM domains (DIM-02, DIM-04)
- Optimize contributor and bot lineage index queries for real-time reuse visibility (DIM-01, DIM-06)
