# Stage 158: 5-State Soft/Warm/Off Lifecycle (aq158_govern_soft_warm_hot_idle_lifecycle / DB-UNIT-16)

Governs Worker and lane transitions across COMPLETELY_OFF, IDLE_SCALE_TO_ZERO, SOFT_START, WARM_START, and HOT_ACTIVE using lazy gzip JSON hydration without eval.

- Atomic micro-queue: `aq158_govern_soft_warm_hot_idle_lifecycle` (visibility: `public_commons`)
- Backing database unit: `DB-UNIT-16` (`Resource Network Catalog, Capacity Feeds & Eligibility Broker Core`)
- Database cell: `queues-db.teleon.dev` (`teleon_core.resource_provider_catalog`, `teleon_core.capacity_feed_snapshots`, `teleon_core.portable_work_unit_leases`)
- Claim row hydration: `single_self_contained_flat_task_row` (100% context inline, normalized writeback)
- Track 2 Sister queue (`SISTER-16`): `sq16-improve-capacity-queue.teleon.dev` (Track provider quota shifts, tune adaptive quorum factors, and minimize total cost per independently accepted output.)
- Lanes: Lazy Gzip Soft-Start, S3-FIFO Warm Ramp 5->100%, Anti-Flap Scale-to-Zero

## Execution engines & AI Agent freedom contract

- **Deterministic (0 model calls)**: `quota_aup_and_spdx_eligibility_router_v1` (5-state lifecycle state machine & DecompressionStream gzip hydrator (0 calls))
- **Hybrid (<=1 model call)**: `capacity_feed_anomaly_and_deprecation_watcher_v1`
- **AI Agent & Bot Fleet (1..6 calls)**: `provider_terms_and_allowance_scout_v1` (Cold-start AST profiler & VOMC pre-warm policy tuner)
  - Contract: **Instructions + Resources + Freedom to search for new resources and new ways not bound by instructions**

## Database invariants

- Free inference endpoints are never conflated with sandboxed code execution runtimes.
- Academic or noncommercial AUP pools are strictly refused for commercial surface workloads.
- Untrusted volunteer or opportunistic nodes never receive secrets, private code, or unverified single-quorum acceptance.

## External & internal bot fleet actions

- Short-circuit disabled lanes in <0.1ms at the edge without waking D1 or hydrating bundles
- Hydrate per-Host static HTML/JSON payloads lazily via DecompressionStream('gzip') with zero eval()
- Step warming traffic smoothly (5% -> 25% -> 50% -> 100%) and hold 180s anti-flap cooldowns

## Sister self-tuning areas

- Update provider free-tier neuron/batch ceilings and commercial-use flags from primary docs (DIM-01, DIM-08)
- Tune BOINC-style adaptive replication quorum factors by worker reliability history (DIM-06)
- Compile prefix-aware batch packing rules to capture 50% batch plus 90% cache discounts (DIM-07, DIM-08)
