docs(uv): testnet push — T10 Gate A/B run spec, T12 promotion bridge spec, operator arming checklist

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Codex
2026-07-03 15:14:38 +02:00
parent c725bae815
commit a098962eec
3 changed files with 142 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
# UV TASK T10 — Gate A/B certification run (the cert that unlocks testnet)
**Assignee:** cmd-PASS1.1 · **Issuer:** Fable · **PRIORITY over T8 resume** (T8 stays
paused; resume after T10). **Master spec:** §5 Gates A/B. **Base:** main ≥ b70d5ab
(differ is LIVE — `parity.differ` real module, 33/33 contract tests green).
## Goal
Produce the first REAL certification verdict: run Gate A (replay parity) and Gate B
(fuzz faultlines) end-to-end, emit the gate ledger via the T4 reporter, and hand Fable
a signed-off report. This is the last gate before the operator arms VST keys.
## Work items
1. **Apply the T7 tier rework** (codex's unapplied instruction, on the bus + here):
restructure `replay_cert.py`'s report into labeled coverage tiers —
- **Tier 1 (gating):** replay over `dolphin_uv.prime_decisions` (PRIME's own journal,
accumulating since the zinc soak began). Today it holds decisions + hook frames
(not yet raw scan surface — pi's T2P1 adds that); so Tier 1 v1 = decision-replay
consistency: journaled decision == recomputed decision from journaled inputs where
inputs suffice; report the input-coverage fraction HONESTLY per row.
- **Tier 2 (gating, entries only):** entry-anchored bit-identity — replay each BLUE
`dolphin.trade_events` entry through the hooks using its own
`market_state_bundle_json` + `execution_quality_json` recorded inputs; diff via
`parity.differ.diff_entry_event`. This works over DEEP history NOW.
- **Tier 3a (labeled, non-gating):** ~2wk real-scan parquet era (2026-03-04..18,
`/mnt/dolphin/vbt_cache_klines`, loader precedent `paper_trade_flow.load_day_scans`)
— near-full input replay, report drift-rate.
- **Tier 3b (labeled, non-gating):** scalar+obf consistency (eigen_scans scalars +
obf_universe prices) — no-phantom-entry checks only.
2. **Wire the T4 reporter:** gate ledger rows for Gate A (verdict = Tier1 AND Tier2
pass) and Gate B; ledger + report to `prod/docs/uv_cert/GATE_AB_RUN_<ts>.md/.json`.
3. **Gate B run:** execute the full armed property/fuzz surface (pi's Hypothesis suites
+ differ property tests) with `--hypothesis-seed` pinned, plus a poison-input sweep
of the differ/align path (NaN/inf/unicode/dup scans — most exist already; run them
as a named gate, record counts). Gate B verdict = all green, deterministic re-run
identical.
4. **Determinism proof:** run the whole cert TWICE; reports must be byte-identical
except the run timestamp (seed-pin, injected clock).
## Iron rules
Read-only against `dolphin.*`; writes ONLY `dolphin_uv.*` + report files. no_write_guard
active during all replay. Never touch BLUE. If Tier 2 surfaces real DRIFT (not a
BLUE-code-era artifact per data-derived changepoints): STOP, report to Fable, do NOT
"fix" hook math to make it pass — parity bugs are findings, not test failures.
## Done
Branch `uv/t10-gate-ab` off ≥ b70d5ab, fresh clone, push → CI, DONE to Fable with:
report path + headline (entries checked, matched/drift/phantom per tier, Gate A verdict,
Gate B verdict, wall-clock). Sample DiffReport for any drift.

View File

@@ -0,0 +1,40 @@
# UV TASK T12 — promotion bridge (PRIME decision → KernelIntent → seam)
**Assignee:** pi_nvnemo (AFTER T2P1 — do not context-switch) · **Issuer:** Fable.
**Master spec:** §8 fast path. **Companion:** T9 exec seam (cmd-PASS1.2, in flight).
## Goal
The missing link between the certified brain and the trading hand: when PRIME (shadow)
is PROMOTED, its entry decisions must flow as KernelIntents into T9's seam. Today
nothing connects them — T9's `intent_source` is an injectable queue. Build the bridge,
DARK-safe by construction.
## Deliverable: `prod/clean_arch/violet/uv/blue_prime/promotion.py`
1. **Gate:** module does NOTHING unless `UV_PROMOTED=1` in env AND an operator arming
file exists (`/root/uv-wt/prime-live/UV_PROMOTED.arm` — content = ISO ts + operator
initials; absence = shadow mode, bridge inert). Two-man rule mirrors T9's mainnet
block. Log loudly on every startup which mode we are in.
2. **Translation:** PRIME's per-scan decision dict (`has_entry`, asset, side, leverage,
bar_idx, entry payload — exactly what `build_journal_frame` sees) → `KernelIntent`
(dita_v2 contracts; import from the vendored kernel; preflight the exact field set
against `contracts.py` — do NOT guess fields). `client_tag` = `u-` prefix source.
3. **Transport:** publish to the seam's intent queue. v1 = the injectable queue seam
T9 exposes (in-process import); leave a clearly-marked TODO seam for zinc
intent_region transport (that is wave-2, do not build it now).
4. **Journal:** every bridged intent (and every SUPPRESSED one while un-promoted) →
`dolphin_uv.exec_journal` kind='BRIDGE' rows. The suppressed-intent record is the
shadow-mode evidence the operator reviews before arming.
5. **Runner wiring:** guarded call from `blue_prime/runner.py` after the journal write
(never before — journal is the source of truth), wrapped so ANY bridge exception
cannot kill the scan loop (fail-soft, log + count).
## Tests (armed and RUN before ship — remember the differ lesson)
Inert-by-default (no env/file ⇒ zero intents, suppressed rows journaled); arming
matrix (env-only ⇒ inert, file-only ⇒ inert, both ⇒ active); translation bit-exact
fixtures vs a fixed decision dict; mutation litmus (drop u- tag, skip suppressed
journal, swallow exception ⇒ RED); fail-soft (bridge raises ⇒ runner loop continues).
## Done
Branch `uv/t12-promotion-bridge`, fresh clone, push → CI, DONE to Fable with sha,
test count, and a shadow-mode journal excerpt showing suppressed intents recorded
during a live soak window.