ticket #000036: add KAT-regen tooling + close

"One more iteration then close" (fox): added committed KAT-regeneration
scripts for both the T3 calculator and φ_PRG — the regen step was a
throwaway temp script before; now it's reproducible and the phi_prg
test's skipif reason ("run scripts/generate_phi_prg_kat.py") points at
a file that exists. Then closed #000036.

New scripts:
- scripts/generate_t3_bound_kat.py — regenerates
  bench/fixtures/t3-bound/known-answer-tests.jsonl from a fixed 12-config
  list (the §7 worked examples under max_envelope + non-default-C_B*
  + g=0 edge + explicit-b1_model pins for the other three models).
- scripts/generate_phi_prg_kat.py — regenerates
  bench/fixtures/phi-prg/known-answer-tests.jsonl from a fixed 10-entry
  list (placeholder/random seeds, one-bit-flip variants, block-boundary
  dim_h=16/17, 4096 counter-rollover stress).
- Both verified to reproduce the committed fixture data lines byte-
  for-byte (only the header comments changed, to reference the script).
  Each docstring states: run after any algorithm change, then bump the
  module version (CALCULATOR_VERSION / PHI_PRG_VERSION) so the fixture's
  version field changes too.

Doc/test:
- test_t3_bound_calculator.py skipif reason now references the regen
  script (matches the phi_prg test pattern).
- #000035 §3.3 + t3-bound.md §10.1 reference the regen scripts.

Closure (#000036):
- Status → closed · 2026-05-11 in the ticket file + TICKETS.md row.
  Phase 1 + dav1d Tier-1/Tier-2 (Option B in v1) + KAT-regen tooling
  all landed; all §5 acceptance criteria met; both dav1d closure
  blockers cleared. Continuation: empirical C_B1/C_B2/C_B3 tightening
  under #000043 (parks on v7 deployment data); landing the bound's
  framing into a v7 plastic-training spec parks on that spec gaining
  a deployment target; R2's architectural integrations (Merkle audit-
  event commitment, SQD canonicalization, CTI clause-lattice, 5F
  trigger, ForkScore security-risk) are separate tickets if wanted.
- t3-bound.md header flipped to "closed 2026-05-11".

Full suite: 2312 passed, 28 skipped.
This commit is contained in:
russell@unturf.com 2026-05-11 08:02:25 -04:00
parent 101b101281
commit 8599ce3b2c
No known key found for this signature in database
9 changed files with 298 additions and 29 deletions

View file

@ -92,6 +92,8 @@ Newest first. Update on every open/close.
| ID | Title | Status | Opened | Directive |
|----------|------------------------------------------------|-----------------------|------------|-----------|
| #000047 | ForkScore `_delta_*` aggregator (mean vs max vs sum) | open · awaiting go/no-go · doc-only; parks until #000046 produces a below-ceiling baseline to bench against. Recommends: parameterize `delta_aggregator` (default `mean`), don't change the default without #000046 data. #000012-revision / #000025 §10.14 follow-up | 2026-05-11 | — |
| #000046 | Harder 5S/5T/5F fixture tier (below-ceiling baselines) | open · awaiting go/no-go · doc-only; the bench Δ-rate terms in `fork_score` are inert while every pack runs at rate 1.0. Recommends a narrow live-path hard tier starting with 5F Falsification (`verify_quotes` near-misses). #000025 §10.14 follow-up; gates #000047 | 2026-05-11 | — |
| #000045 | Prometheus-Σ Phase 3 sleep-sweep scheduler (gating ticket) | open · doc-only scaffold 2026-05-10; pins 8 governance parameters + 4 retrigger gates; opens implementation only after one retrigger fires | 2026-05-10 | — |
| #000044 | AUTOCOUNT doc-drift discipline | closed · landed across `fc5ba50` / `03c0f6a` / `6c6defb` / `f5dbfab` / `3b30126` 2026-05-10 (mechanism + 4 metrics + 54 tags across 7 doc files; harness catches drift at test time, refresh is 60-second turnaround) | 2026-05-10 | — |
| #000043 | Empirical tightening of T3 bound constants (#000036 Phase 2) | open · awaiting go/no-go (parks until v7 deployment surfaces measurement data) | 2026-05-10 | — |
@ -101,7 +103,7 @@ Newest first. Update on every open/close.
| #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) | in progress · Phases 0 + 1 + 1.b + 1.c + 2 landed 2026-05-10; **§12 Trigger 2 fired** (divergence variance 0.575 / N=37); §22 Findings 2 + 3 RESOLVED (kernel/llm cost split + sweep_weights §15.4 + per-mode τ_qa); `controller_events` carries 4 event kinds (decision · difficulty · budget_allocation · falsification_proposal) feeding `arborist controller-events` inspector + live-harvest third bucket in `bench/scripts/harvest_falsification_proposals.py`; §12 Trigger 1 probe wired 2026-05-11 (`trigger_1_branch_density` reads `fork_score_branches` — measurable, not yet fired); Phase 3 sleep-sweep scheduler tracked under #000045 (gating ticket) | 2026-05-09 | — |
| #000036 | T3 per-window covert-channel budget bound | in progress · Phase 1 + dav1d review 2026-05-11 → Tier-1 + Tier-2 (Option B = `b1_model=max_envelope` default, applied *in v1*, no v2 fork) both landed 2026-05-11; KAT regenerated (12 entries, active); baseline 625.87 → 6183.02 (max_envelope); 53 → 83 tests; both prior closure blockers cleared — remaining = fox final close-or-iterate call | 2026-05-09 | — |
| #000036 | T3 per-window covert-channel budget bound | **closed · 2026-05-11** · Phase 1 + dav1d review → Tier-1 + Tier-2 (Option B = `b1_model=max_envelope` default, in v1, no v2 fork) + KAT-regen tooling (`scripts/generate_t3_bound_kat.py`) all landed 2026-05-11; baseline 625.87 → 6183.02 (max_envelope), `NOT_CERTIFIED_BY_BOUND` at W=10000; 53 → 83 tests; 12-entry active KAT; both dav1d closure blockers cleared, all §5 acceptance criteria met. Continuation: empirical C_B* tightening under #000043 (parks on v7) | 2026-05-09 | — |
| #000035 | PRG choice for φ_PRG (HMAC-SHA-512 expansion) | in progress · Phase 1 landed 2026-05-10; §9.10 amendment text **dav1d-reviewed final + endianness resolved 2026-05-11** (manifest field → `anchor_prg_seed`; v7 TLV confirmed little-endian → counter + uint32-word reads flipped big→little, `PHI_PRG_VERSION → -le`, 10 KATs regenerated; float-map prose corrected to "negligible mean 2^32" not "unbiased"; `dim_h ≤ 16·2^32` guard + bool-reject added; seed-independence + M1-policy-separation added; HMAC-SHA-512 / 32-byte / SHALL all LOCKED; 31 tests). Remaining: land §9.10 into v7 spec when plastic-training has a deployment target (exogenous) | 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 | — |
| #000033 | Claim-pack pillar VII (combinatorics) | closed · landed 2026-05-09 (live in shard 000.db; lift verified) | 2026-05-09 | — |
@ -140,4 +142,4 @@ Newest first. Update on every open/close.
## Next ID
`000046`
`000048`

View file

@ -1,19 +1,21 @@
# T3 per-window covert-channel budget bound
**Ticket**: #000036
**Ticket**: #000036**closed 2026-05-11**.
**Source analysis**: `docs/soft-hash-channel-analysis.md`
**Date**: 2026-05-10 (dav1d review pass + Option-B applied 2026-05-11)
**Date**: 2026-05-10 (dav1d review pass + Option-B + KAT-regen tooling 2026-05-11)
**Status**: formal derivation + calculator landed; **dav1d review
returned 2026-05-11** → **Tier-1 polish + Tier-2 (Option B: the
returned 2026-05-11** → Tier-1 polish + Tier-2 (Option B: the
conservative `max_envelope` B1 model, applied in v1 — no v2 fork)
both landed 2026-05-11**. KAT fixture regenerated (12 entries,
active — `test_t3_bound_known_answer_tests` no longer skips). The
default B1 model is now `max_envelope` (§3.1); `effective_control_v1`
is reachable as a backward-comparison mode. Remaining before
closure: fox's final close-or-iterate call (optionally a dav1d
re-review of the envelope formula). The named C_B* constants are
conservative starting estimates that empirical tightening
(#000043) can replace without changing call sites.
+ KAT-regen tooling (`scripts/generate_t3_bound_kat.py`) all landed
2026-05-11; **#000036 closed**. KAT fixture is 12 entries, active
(`test_t3_bound_known_answer_tests` runs, not skips). The default
B1 model is `max_envelope` (§3.1); `effective_control_v1` /
`fraction_channels` / `aggregate_bias` reachable via `--b1-model`.
The named C_B* constants are conservative starting estimates that
empirical tightening — **continued under #000043** — can replace
without changing call sites. (#000043 parks on v7 deployment
data.) Landing the bound's framing into a v7 plastic-training spec
parks on that spec gaining a deployment target.
---
@ -604,9 +606,12 @@ in the follow-up commit):
v1 default rather than forking a v2 (per fox's direction):
`CALCULATOR_VERSION` stays `t3-bound-v1-bottou-refinement` (the
"bottou-refinement" descriptor names the unchanged B3 term).
- **KAT fixture regenerated** (`bench/fixtures/t3-bound/known-answer-tests.jsonl`,
12 entries: §7 worked examples under `max_envelope`, explicit-mode
pins for the other three models, a `g=0` edge case).
- **KAT fixture regenerated + regen tooling.**
`bench/fixtures/t3-bound/known-answer-tests.jsonl` (12 entries:
§7 worked examples under `max_envelope`, explicit-mode pins for
the other three models, a `g=0` edge case) is now produced by
`scripts/generate_t3_bound_kat.py` — run it after any algorithm
change, then bump `CALCULATOR_VERSION`.
`test_t3_bound_known_answer_tests` now runs (no longer skips);
it pins `b1_model`, `b1_selected`, `certification_status`, and
the per-contribution numbers.

View file

@ -187,8 +187,12 @@ def phi_prg(hard_hash_32: bytes, dim_h: int) -> list[float]:
### 3.3 Bench fixture
`bench/fixtures/phi-prg/known-answer-tests.jsonl` — fixed
(seed, hard_hash, dim_h) → expected_output_sha256 triples for
regression coverage. Generated once, pinned.
(seed, hard_hash, dim_h) → expected_output_sha256 triples (10
entries) for regression coverage. Regenerated by
`scripts/generate_phi_prg_kat.py` (run it after any algorithm
change, then bump `PHI_PRG_VERSION` so the fixture's `version`
field changes too). `tests/test_anchor_prg.py::test_phi_prg_known_answer_tests`
pins these values and asserts the version matches the module.
### 3.4 Spec amendment

View file

@ -1,6 +1,6 @@
# Ticket #000036 — T3 per-window covert-channel budget bound
**Status:** in progress · Phase 1 (formal derivation + calculator) landed 2026-05-10; **dav1d review returned 2026-05-11** (`RESPONSE_1` + `RESPONSE_2`) → **Tier-1 + Tier-2 both applied 2026-05-11**. Tier-1: recommendation wording → "CANNOT CERTIFY", structured `certification_status` / `b1_model` / `b1_selected` / `model_assumptions` output fields, bool/NaN/inf validation hardening, `g=0` accepted, hard-coded test cwd removed. **Tier-2 = dav1d Option B applied *in v1* (per fox — no v2 fork)**: default `b1_model` is now `max_envelope` = `max(fraction_channels, aggregate_bias)` (genuinely upper-bounding across both interpretations of `g`); `effective_control_v1` / `fraction_channels` / `aggregate_bias` reachable via `--b1-model`; every output reports all three B1 variants + both SNR readings; `CALCULATOR_VERSION` unchanged (`t3-bound-v1-bottou-refinement` — the descriptor names the unchanged B3 term, and `b1_model` echoed in `inputs` disambiguates KAT replays). **KAT fixture regenerated 2026-05-11** (12 entries; `test_t3_bound_known_answer_tests` now runs, not skips). Baseline I_window: 625.87 (effective_control_v1) → **6183.02 (max_envelope default)**. Test suite 53 → 83. **Both prior closure blockers cleared**; remaining = fox's final close-or-iterate call (optionally a dav1d re-review of the envelope formula). Empirical constant-tightening tracked separately under #000043. R2's architectural integrations (Merkle audit-event commitment, SQD canonicalization, CTI clause-lattice, 5F trigger, ForkScore security-risk) out-of-scope here — separate tickets if wanted.
**Status:** **closed · 2026-05-11.** Phase 1 (formal derivation + calculator) landed 2026-05-10; dav1d review (`RESPONSE_1` + `RESPONSE_2`) returned 2026-05-11 → Tier-1 polish (recommendation wording → "CANNOT CERTIFY"; structured `certification_status` / `b1_model` / `b1_selected` / `model_assumptions` output fields; bool/NaN/inf validation hardening; `g=0` accepted; hard-coded test cwd removed) + Tier-2 (dav1d Option B applied *in v1* per fox — no v2 fork: default `b1_model = max_envelope = max(fraction_channels, aggregate_bias)`, genuinely upper-bounding across both interpretations of `g`; `effective_control_v1` / `fraction_channels` / `aggregate_bias` reachable via `--b1-model`; every output reports all three B1 variants + both SNR readings; `CALCULATOR_VERSION` stays `t3-bound-v1-bottou-refinement`, `b1_model` echoed in `inputs` disambiguates KAT replays) + KAT-regen tooling (`scripts/generate_t3_bound_kat.py`, 12-entry fixture, `test_t3_bound_known_answer_tests` runs not skips) all landed 2026-05-11. Baseline I_window: 625.87 (effective_control_v1) → 6183.02 (max_envelope default), `NOT_CERTIFIED_BY_BOUND` at W=10000. Test suite 53 → 83. **Both dav1d closure blockers cleared** (B1 worst-case model; active KAT fixture). All §5 acceptance criteria met. **Continuation:** empirical C_B1/C_B2/C_B3 tightening tracked under **#000043** (parks on v7 deployment data); R2's architectural integrations (Merkle audit-event commitment, SQD canonicalization, CTI clause-lattice, 5F trigger, ForkScore security-risk) are separate tickets if wanted; landing the bound's framing into a v7 plastic-training spec parks on that spec gaining a deployment target. Reviewer artifacts: `~/Downloads/RESPONSE_1_-_ticket-000036-...txt`, `RESPONSE_2_-_...txt`.
**Opened:** 2026-05-09
**Scope:** Derive an explicit closed-form upper bound on the covert-
channel capacity under threat model T3 (hyperparameter adversary),