#000037 Phase 3 dry-run + Phases 0/1/2 status flip

Phases 1 (controller) and 2 (sibling-table audit writes) landed in
prior commits. This commit adds the Phase 3 dry-run simulator
instead of the actual sleep-sweep scheduler, since Phase 3's value
is mostly in what we'd learn from running it — and the dry-run
captures those findings without committing to a scheduler design
prematurely.

bench/scripts/prometheus_sigma_sweep_dryrun.py — read-only
simulator that classifies §3 Target A (providence_cache) + Target B
(documents) sweep candidates, synthesizes ControllerBranches from
real shard data, runs the Phase 1 controller, reports decision
distribution + Phase-3-design findings. No LLM calls, no
mutations.

make prometheus-sweep-dryrun — produces a dated markdown report
at bench/results/prometheus-sigma-sweep-dryrun-YYYY-MM-DD.md.

Five findings surfaced by three dry-run iterations against the
live ~/.arborist/shards corpus (3.5M docs + 2839 providence_cache
rows) — captured in ticket §22:

  1. chunk-size dominates Kelly threshold (must = Hermes
     concurrency, not candidate pool)
  2. flat capital_cost blocks every allocation (split kernel-cost
     vs LLM-cost on the contract)
  3. τ_qa=7d filters every CANONICAL_PROJECTION row (all 29 are
     <7d old; need per-audit-mode τ)
  4. Target B canonical-shape detection is the real headline
     (~152K candidates extrapolated; controller correctly returns
     MARGINAL on shape-match chunks)
  5. quarantined rows correctly veto via cache_drift hard-veto

Mean per-branch controller latency in dry-run: 12.5 µs at
chunk_size=4. Phase 3's actual bottleneck is the witness fan-out
(Hermes calls), not the controller itself.

Ticket #000037 status flipped to in-progress with Phases 0+1+2
landed; Phase 3 scheduler remains future work but is informed by
the five findings.
This commit is contained in:
russell@unturf.com 2026-05-10 16:47:02 -04:00
parent f625cac20c
commit 61424370bd
No known key found for this signature in database
5 changed files with 1049 additions and 3 deletions

View file

@ -80,7 +80,7 @@ Newest first. Update on every open/close.
| #000040 | Phase 5 resolver fix — phrase + content-token cascade (Hilbert terminology mismatch surfaced) | closed · cascade landed 2026-05-09; lift blocked by 1902-vs-modern vocab; follow-up #000042 | 2026-05-09 | — |
| #000039 | Optional `sqlite-vec` retrieval backend (A/B vs FTS5, hybrid not replacement) | open · awaiting go/no-go (doc-only Phase 0) | 2026-05-09 | — |
| #000038 | Phase 4 content acquisition — proprietary textbook license decisions for warrant coverage | closed · obviated 2026-05-10 by alias-substitution sprint under #000031 (74 rows in #000041 + 13 rows in #000042); 92/92 records now resolve. Residue (multilingual PD, Hilbert-Ackermann OCR, Knuth permission, personal-copy path B) preserved as design log §8 | 2026-05-09 | — |
| #000037 | Prometheus-Σ recursive falsification controller (bicameral substrate) | open · awaiting go/no-go (doc-only Phase 0) | 2026-05-09 | — |
| #000037 | Prometheus-Σ recursive falsification controller (bicameral substrate) | in progress · Phase 0 (doc) + Phase 1 (controller `arborist/substrate/prometheus.py`) + Phase 2 (`controller_events` sibling table + advisory writes) all landed 2026-05-10; Phase 3 sleep-sweep scheduler NOT landed — instead a read-only dry-run simulator + 5 design findings in §22 | 2026-05-09 | — |
| #000036 | T3 per-window covert-channel budget bound | in progress · Phase 1 (formal derivation + calculator) landed 2026-05-10; awaits fox math review | 2026-05-09 | — |
| #000035 | PRG choice for φ_PRG (HMAC-SHA-512 expansion) | in progress · Phase 1 landed 2026-05-10; v7 §9.10 amendment awaits maintainer review | 2026-05-09 | — |
| #000034 | Hessian alignment under φ_linear | in progress · Phase 1a landed 2026-05-10 (synthetic-ablation probe + KAT fixture); Phase 1b parks for v7 ramp-up | 2026-05-09 | — |

View file

@ -1,6 +1,6 @@
# Ticket #000037 — Prometheus-Σ recursive falsification controller (bicameral substrate)
**Status:** open · awaiting go/no-go (doc-only Phase 0; David review 2026-05-10 applied — see §21)
**Status:** in progress · Phase 0 doc landed; Phase 1 (controller `arborist/substrate/prometheus.py`) landed 2026-05-10; Phase 2 (sibling `controller_events` table + advisory writes) landed 2026-05-10; Phase 3 sleep-sweep scheduler **not** landed but a read-only dry-run simulator (`bench/scripts/prometheus_sigma_sweep_dryrun.py` + `make prometheus-sweep-dryrun`) ships in parallel, exercising Phases 1+2 over real shard data without LLM/mutation and surfacing five design findings for the eventual scheduler — see §22.
**Opened:** 2026-05-09
**Scope:** Spec a named control law that unifies the recursive-
falsification machinery already shipped across #000012 (ForkScore),
@ -1183,7 +1183,76 @@ LLM is witness, never authority.
---
## 22. References
## 22. Phase 3 dry-run findings (2026-05-10)
Phases 1 + 2 landed end-to-end above. Phase 3 (the actual sleep-sweep
scheduler) is deliberately not landed — but a read-only dry-run
simulator (`bench/scripts/prometheus_sigma_sweep_dryrun.py`, `make
prometheus-sweep-dryrun`) drives the Phase 1 controller against real
shard data to surface what the scheduler would face. Five findings,
each with a concrete fix for the eventual Phase 3 ticket:
**Finding 1 — chunk-size dominates Kelly threshold.** First iteration
chunked candidates 64-at-a-time and got 100% DEFERRED. Kelly's
`f_i = max(0, (p_i·b q_i)/b)` requires `p_i > 0.5`; softmax over 64
branches never gives any single branch that much mass. **Fix for
Phase 3:** chunk size = Hermes concurrency (4 today; governance
parameter going forward), not the candidate pool size.
**Finding 2 — flat `capital_cost` blocks every allocation.** Iteration
1 also assigned `capital_cost=1.0` to every branch. Combined with
small audit-mode-based Δ5F deltas (±0.050.10), every utility came
out negative — DEFERRED for chunks where Kelly's guard never fired,
REJECT for chunks where it did. Iteration 2 split the cost class
(`CANONICAL_PROJECTION=0.05`, `UNGROUNDED=0.4`, `HYBRID=0.8`,
`STRICT=1.0` for Target A; `0.02` HEAD-only vs `0.05` canonical-shape
for Target B) and surfaced real ACCEPT/MARGINAL signal. **Fix for
Phase 3:** consider splitting `capital_cost` into `kernel_cost` +
`llm_cost` on the input contract in a v2 dataclass, or compute
`capital_cost` as the expected cost given which witness paths fire.
**Finding 3 — τ_qa=7d filters out every `CANONICAL_PROJECTION` row.**
All 29 CP rows in `qa.db` are ≤7 days old (they're the recent π*
graduations from #000027 / #000030 / #000032). At τ_qa=7d, zero CP
rows surface → zero ACCEPT chunks → zero high-value sleep work
discovered. At τ_qa=1d, 9 CP rows surface and 4 chunks return
MARGINAL. **Fix for Phase 3:** split τ_qa by audit_mode. Kernel-only
modes (CP) take a short τ (1d default — they're cheap to re-probe);
LLM-witness modes (STRICT/HYBRID/UNGROUNDED) take a longer τ (7d
default — re-witness is expensive).
**Finding 4 — Target B canonical-shape detection is the real
headline.** 4.40% of sampled documents (n=2000) contain
math/logic/time-series canonical-shape statements. Extrapolated to
~152,609 canonical-probe candidates across 3,468,392 docs in
``~/.arborist/shards``. The controller correctly returns MARGINAL on
83 of 500 Target B chunks (the chunks containing the regex-prefilter
hits). **Fix for Phase 3:** the MARGINAL queue from Target B becomes
the funnel for 5F falsification-fixture mining (§3 "Divergence →
candidate falsification fixture"). At Hermes concurrency=4 a full
Target B sweep is still ~38K rounds even after the prefilter — Phase
3 needs a sustained-throughput floor + per-window cap, not a one-shot
burst design.
**Finding 5 — quarantined rows correctly veto.** The two
`falsification_state='quarantined'` rows in `qa.db` are flagged as
`cache_drift` hard-vetoes by Target A's branch synthesis. The veto
path exercises end-to-end against real corpus data — no fixture-only
mocking.
Total dry-run cost: **~55 ms** to score 4,379 branches across all
sweep targets and both shards' worth of providence_cache + a 2,000-
doc sample of documents — **12.5 µs per branch** at chunk_size=4 in
pure Python. Phase 3 latency budget for the controller itself is
non-binding; the witness fan-out (Hermes calls) is the dominant cost.
Detailed numbers + iteration log per shard:
`bench/results/prometheus-sigma-sweep-dryrun-YYYY-MM-DD.md`
(regenerated by `make prometheus-sweep-dryrun`).
---
## 23. References
- This ticket: design-substrate doc, no code yet.
- #000008 (broad-quantifier preflight): pre-answer difficulty