# Prometheus-Σ Phase 3 sleep-sweep dry-run

Generated: 2026-05-10T23:20:32Z UTC
Script:    `bench/scripts/prometheus_sigma_sweep_dryrun.py`
Ticket:    #000037 Phase 3 (read-only simulation)

## Parameters

- Shards dir: `/home/fox/.arborist/shards`
- τ_qa per audit_mode (§22 Finding 3 fix):
  - CANONICAL_PROJECTION: 1d (86400s)
  - HYBRID: 7d (604800s)
  - STRICT: 7d (604800s)
  - UNGROUNDED: 7d (604800s)
- Target B sample/shard: 500
- Controller budget (Hermes concurrency): 4
- Weight profile: sweep (§15.4)

## Target A — providence_cache sweep candidates

- Total candidates (rows older than τ_qa): **1927**
- Sweep chunks (size 4): 482
- Controller runtime: 12.91 ms

### Audit-mode distribution of candidates

| audit_mode | count |
|---|---|
| STRICT | 724 |
| HYBRID | 720 |
| UNGROUNDED | 474 |
| CANONICAL_PROJECTION | 9 |

### Controller decision distribution (per chunk)

| label | chunks |
|---|---|
| DEFERRED | 369 |
| REJECT | 110 |
| MARGINAL | 3 |

### Veto kinds observed

| veto_kind | count |
|---|---|
| cache_drift | 2 |

### Proposals emitted (advisory)

- MemoryRoot proposals: 0
- SelfModel proposals: 0
- FalsificationFixture proposals (§13 Step 11 — high-divergence → 5F-fixture funnel): **449**
- Advisory event entries (would write to `controller_events` under Phase 2): 708

## Target B — document sweep sample

- Total sampled candidates: **2000**
- Sweep chunks (size 4): 500
- Controller runtime: 18.33 ms

### Canonical-shape regex prefilter hits

| shape_class | matches |
|---|---|
| math | 68 |
| logic | 20 |

### Controller decision distribution (per chunk)

| label | chunks |
|---|---|
| DEFERRED | 417 |
| MARGINAL | 83 |

### Per-shard extrapolation

| shard | total docs | sampled | canonical-shape % |
|---|---|---|---|
| 000.db | 866,874 | 500 | 4.00% |
| 001.db | 867,695 | 500 | 4.60% |
| 002.db | 866,825 | 500 | 3.80% |
| 003.db | 866,998 | 500 | 5.20% |

### Extrapolated full-sweep cost (Target B)

- Total documents across shards: **3,468,392**
- Canonical-shape rate (from sample): 4.40%
- Extrapolated canonical-probe candidates: **~152,609**
- At Hermes concurrency=4, witness budget would dominate; the prefilter is doing real load-shaping.

## Total simulation cost

- Total branches scored: 3927
- Total controller runtime: 31.24 ms
- Mean per-branch latency: 7.96 µs

## Findings & fixes (dry-run iteration log)

Three iterations on the dry-run heuristic surfaced four real Phase-3-design findings before any production sweep code shipped:

**Finding 1 — chunk-size dominates Kelly threshold.** Iteration 1 (chunk_size=64) returned 100% DEFERRED. Kelly's `f_i = max(0, (p_i·b − q_i)/b)` requires `p_i > 0.5`; with 64 branches in a softmax, no single branch reaches that mass. Phase 3's scheduler must size chunks to the budget (Hermes concurrency = 4), not to the candidate pool. Dropping to chunk_size=4 split the distribution into DEFERRED (no positive-U branch) vs REJECT (positive-p but selected_u ≤ 0) vs ACCEPT/MARGINAL (positive-U winner).

**Finding 2 — flat capital_cost = no allocation. RESOLVED in Phase 1.c (commit `4b85a0a`).** Iteration 1 assigned `capital_cost=1.0` to every branch (one full Hermes call). Combined with small audit-mode-based Δ5F deltas (±0.05–0.10), every utility was negative. The dry-run since splits kernel-only re-probe cost from full LLM-witness cost: `CANONICAL_PROJECTION=0.05`, `UNGROUNDED=0.4`, `HYBRID=0.8`, `STRICT=1.0` for Target A; `0.02` (HEAD-only freshness) vs `0.05` (canonical-shape probe) for Target B. Phase 1.c then promoted the split into the controller's input contract — `ControllerBranch` now exposes `kernel_cost` + `llm_cost` fields and a back-compat `effective_cost` property (legacy `capital_cost` callers continue to work).

**Finding 3 — τ_qa=7d filters out every CANONICAL_PROJECTION row. RESOLVED in this dry-run iteration.** All 29 CP rows in `qa.db` were ≤ 7 days old (they're the recent π* graduations from tickets #000027/#000030/#000032); a uniform τ_qa=7d returned zero CP candidates → zero ACCEPT chunks → zero high-value sleep work surfaced. The dry-run now splits τ by audit_mode via `build_tau_by_mode()` + per-mode `CASE` in `iter_target_a_candidates`: kernel-only modes (CP) default to τ_qa=1d (cheap to re-probe, high value when kernel-LLM divergence surfaces); LLM-witness modes (STRICT/HYBRID/UNGROUNDED) stay at τ_qa=7d (expensive LLM calls). Tunable via `--tau-qa-cp-days` + `--tau-qa-days` CLI flags. Phase 3 lifts both into governance parameters.

**Finding 4 — canonical-shape Target B is the real headline.** 4.40% of sampled documents (sample n=2000) contain math/logic/time-series canonical shapes. Extrapolated to ~152K candidates across 3.5M docs in shards. The controller correctly returns MARGINAL on chunks containing these (high entropy = uncertain = queue for sleep). At Hermes concurrency=4 a full Target B sweep would take ~38K Hermes-call rounds even with the regex prefilter — so the prefilter is doing real load-shaping and Phase 3 must still cap the per-window budget.

**Finding 5 — 2 quarantined rows correctly vetoed.** The two `falsification_state='quarantined'` rows in `qa.db` surfaced as `cache_drift` hard-vetoes. The veto path is exercised end-to-end against real corpus data, no fixture-only mocking.

**Recommendations for the eventual Phase 3 scheduler:**

1. ~~Per-audit-mode τ + per-audit-mode cost class.~~ **Landed.** Cost-class split landed in Phase 1.c (commit `4b85a0a`); per-audit-mode τ landed in this dry-run iteration. Phase 3 promotes both into governance parameters (cache-key hash inputs).
2. Chunk size = Hermes concurrency (4 today, governance param going forward).
3. ~~Sweep-specific weight profile (gamma_5f bumped, lambda_capital_cost dropped).~~ **Landed in Phase 1.c (commit `4b85a0a`)** — `arborist.substrate.prometheus.sweep_weights()` returns the tuned profile (gamma_5f=1.5, lambda_capital_cost=0.25, nu_witness_divergence=0.5). Phase 3's scheduler picks it up via `WEIGHT_PROFILES['sweep']`.
4. MARGINAL queue from Target B becomes the funnel for 5F falsification-fixture mining (§3: "Divergence → candidate falsification fixture").
5. The 152K extrapolated canonical-shape doc count is a real-corpus pressure signal — Phase 3 needs a sustained-throughput floor, not a one-shot burst design.
