RQ2-P3: re-word §7 calibration gate (naive→mechanical mix), re-run GREEN

Operator ruling (Andre, 2026-07-21): the STOP was correct and the diagnosis
right — §7 items 1-2 did not fail because the instrument is broken, but because
they were worded under the naive-funnel prior. Under the ratified posterior the
pool is a MIX (shared bridge → shared exit_signature → larger anonymity set →
higher H). Corrected pre-freeze, logged transparently (no HARKing).

- rq2p3-mechanism-prereg.md §7: item 1 re-anchored on the FROZEN bridge-federated
  branch (injective fresh-bridge → m_i=1 → H≈0, constant c=1/C — a pool draws with
  replacement so it cannot reproduce the zero-variance degeneracy); item 2 B=1 →
  c=1.0 AND high H (maximal mix, "low H" refuted by construction); added a §7 scope
  note (the gate validates the INSTRUMENT and must NOT pre-assert the H-vs-c sign —
  that stays the two-sided confirmatory question H1/H2). Confirmatory hypotheses
  unchanged.
- docs/stage-05-rq2p3-gate-clarification.md: dated deviation-rationale log (cites
  the dry-pass output, no number invented; records the two-sided direction-agnostic
  pre-commitment is untouched; the mix ρ 0→+0.838 is an exploratory finding that
  strengthens note-unique-bridge-artifact.md).
- rq2p3_calibration.py: item-1 teeth moved to frozen_branch_regression() on the
  untouched bridge-federated branch; item-2 now asserts c=1.0 AND high H; added
  all_pass aggregate. confirm.py/stats.py/confirm_load_rq2.py untouched.

Re-run: all four gate items PASS with real teeth (all_pass=True). Synthetic/DRY
only, no confirmatory record read. FREEZE STAYS A HUMAN GATE: §10 empty, no
confirmatory RQ2-P3 cell until operator records the SHA-256 + signs off. Lead
prereg SHA f22331a72e... untouched; worktree-only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
leetcrypt
2026-07-21 19:48:55 -07:00
parent 1d99e7f9a9
commit 7ab3466878
4 changed files with 203 additions and 44 deletions
+85 -29
View File
@@ -6,17 +6,26 @@ dir), then reports the four §7 gate items. **No confirmatory record is read**
is the same blind-safe discipline as the lead-paper loaders; the confirmatory battery
stays HARD-HELD until the prereg is frozen.
Gate items (§7):
1. Reproduce the lead degeneracy — ``B=50, alpha=0`` → ``c_i`` ≈ 1/C, near-constant,
Spearman ρ inconclusive.
2. Extreme ``B=1`` — all circuits share one bridge → ``c=1.0`` (a degenerate
concentration extreme). NOTE: under the RATIFIED posterior a fully-shared bridge
*maximizes* the observation-consistent anonymity set, so realized H comes out
HIGH, not low — the mechanical "mix" the study exists to test. This is surfaced,
not silently reconciled with the naive "low H" gloss.
Gate items (§7, re-worded 2026-07-21 pre-freeze — see
``docs/stage-05-rq2p3-gate-clarification.md``; the original items 12 encoded the
naive-funnel prior and were mechanically wrong under the ratified posterior):
1. Reproduce the lead degeneracy ON THE FROZEN ``bridge-federated`` BRANCH (not the
pool). The lead zero-variance degeneracy is a property of the injective fresh-bridge
map: unique bridge per circuit seed → unique exit-signature → ``m_i=1`` → ``H_i≈0``,
constant ``c_i=1/C``. A pool draws WITH REPLACEMENT, so it cannot (and must not) be
asked to reproduce that; the regression teeth live on the untouched frozen branch.
2. ``B=1`` boundary — all circuits share the one bridge → ``c=1.0`` (concentration
tooth kept). Under the RATIFIED posterior the anonymity set is then all circuits
sharing the exit house, so realized H is at the HIGH end (maximal mix). The naive
"low H" gloss is refuted by construction; expect high H.
3. Monotonicity — mean top-3 concentration decreases in B and increases in alpha.
4. Entropy calibration (inherited) — plug-in entropy of N equiprobable senders is
exactly log2(N); MillerMadow adds only the documented finite-N bias term.
SCOPE NOTE: this gate validates the INSTRUMENT and MUST NOT pre-assert the sign of
H-vs-concentration — that sign is the two-sided confirmatory question (H1/H2). The dry
pass previews a mix (ρ 0→+0.838) as an EXPLORATORY finding; the two-sided pre-commitment
in §2 is untouched.
"""
from __future__ import annotations
@@ -30,6 +39,7 @@ from typing import Dict, List
from cmd_chat.sor.analysis.confirm_load_rq2 import (
bridge_concentration,
bridge_label,
per_circuit_entropy,
top_k_bridge_concentration,
)
@@ -60,6 +70,40 @@ def _pool_cell(b: int, alpha: float) -> Cell:
"selector": "static", "pool_B": str(b), "pool_alpha": str(alpha)}, False)
def _fed_cell() -> Cell:
"""The FROZEN lead ``bridge-federated`` branch (untouched, fresh bridge per circuit
seed). Item-1 regression teeth live here, not on the pool."""
return Cell("RQ2", "RQ2/bridge=off/selector=static/topo=bridge-federated",
{"bridge": "off", "topology": "bridge-federated", "selector": "static"}, False)
def frozen_branch_regression(r: int = R_DRY, c: int = C_DRY) -> Dict:
"""Item 1: the untouched frozen ``bridge-federated`` branch must still show the lead
degeneracy — unique bridge per circuit (unique exit-signature) → ``m_i=1`` → ``H_i≈0``,
constant ``c_i=1/C``. Checked per-run (the confirmatory grouping unit)."""
fed = _fed_cell()
labels_all_distinct = True
H_all_zero = True
c_all_const = True
mean_h: List[float] = []
for ri in range(r):
specs = _assemble_run(fed, ri, c)
labels = [bridge_label(s) for s in specs]
labels_all_distinct &= (len(set(labels)) == len(labels))
ent = per_circuit_entropy(specs)
mean_h.append(statistics.fmean(ent))
H_all_zero &= all(h < 1e-9 for h in ent)
conc = [x for x in bridge_concentration(specs) if x is not None]
c_all_const &= bool(conc) and all(abs(x - 1.0 / c) < 1e-9 for x in conc)
return {
"labels_all_distinct": labels_all_distinct,
"H_all_zero": H_all_zero,
"c_all_const_1_over_C": c_all_const,
"mean_entropy_bits": statistics.fmean(mean_h),
"pass": labels_all_distinct and H_all_zero and c_all_const,
}
def cell_report(cell: Cell, r: int = R_DRY, c: int = C_DRY) -> Dict:
"""Per-cell dry report: mean top-3 concentration over runs, pooled per-circuit
(c_i, H_i) Spearman ρ, and the concentration spread."""
@@ -94,17 +138,22 @@ def calibration_gate(r: int = R_DRY, c: int = C_DRY) -> Dict:
sweep = [cr for cr in (cell_report(cell, r, c) for cell in enumerate_rq2p3_cells())]
grid = {(cr["B"], cr["alpha"]): cr for cr in sweep}
# Item 1 — anchor B=50, alpha=0 reproduces the lead degeneracy.
anchor = grid[(50, 0.0)]
item1_pass = anchor["concentration_stdev"] < 1e-3 and abs(anchor["spearman_rho_conc_vs_H"]) < 0.05
# Item 1 — regression teeth on the FROZEN bridge-federated branch (not the pool):
# unique bridge per circuit → unique signature → m_i=1 → H≈0, constant c_i=1/C.
# The pool anchor B=50,alpha=0 is retained as an EXPLORATORY diagnostic only (it is a
# mix, ρ>0 — it does NOT and must NOT reproduce the injective fresh-bridge degeneracy).
fed_reg = frozen_branch_regression(r, c)
anchor = grid[(50, 0.0)] # exploratory: pool at B=50 draws WITH replacement → mix
item1_pass = fed_reg["pass"]
# Item 2 — extreme B=1: all circuits share one bridge (degenerate concentration).
# Item 2 — B=1 boundary: all circuits share one bridge → c=1.0 (concentration tooth),
# and under the ratified posterior H is at the HIGH end (maximal mix). Reference =
# the frozen fresh-bridge branch H (≈0). Passing means c=1.0 AND H high, by construction.
ext = cell_report(_pool_cell(1, 0.0), r, c)
lead_like = cell_report(_pool_cell(1_000_000, 0.0), r, c) # huge pool ≈ fresh bridge/circuit
fresh_ref_H = fed_reg["mean_entropy_bits"]
item2_conc_ok = abs(ext["mean_top3_concentration"] - 1.0) < 1e-9
# The naive gate text says "low H"; the ratified posterior yields HIGH H. Surface it.
item2_entropy_direction = "HIGH (mechanical mix)" if ext["mean_entropy_bits"] > lead_like["mean_entropy_bits"] else "low"
item2_matches_naive_low_H = ext["mean_entropy_bits"] < lead_like["mean_entropy_bits"]
item2_high_H = ext["mean_entropy_bits"] > fresh_ref_H
item2_pass = item2_conc_ok and item2_high_H
# Item 3 — monotonicity: mean top-3 concentration decreasing in B, increasing in alpha.
dec_in_B = all(
@@ -137,25 +186,31 @@ def calibration_gate(r: int = R_DRY, c: int = C_DRY) -> Dict:
"sweep": sweep,
"gate": {
"item1_reproduce_lead_degeneracy": {
"anchor_B50_alpha0": anchor,
"regressed_on": "frozen bridge-federated branch (untouched)",
"frozen_branch": fed_reg,
"exploratory_pool_anchor_B50_alpha0": anchor,
"note": (
"Teeth are on the frozen fresh-bridge branch (unique signatures → m_i=1 "
"→ H≈0, constant c=1/C). A pool draws WITH replacement so it cannot "
"reproduce that; the B=50 pool anchor is an EXPLORATORY mix (ρ>0), not a "
"regression target. Re-worded pre-freeze; see "
"docs/stage-05-rq2p3-gate-clarification.md."
),
"pass": item1_pass,
},
"item2_extreme_B1": {
"item2_B1_boundary": {
"mean_top3_concentration": ext["mean_top3_concentration"],
"mean_entropy_bits": ext["mean_entropy_bits"],
"fresh_bridge_reference_mean_entropy_bits": lead_like["mean_entropy_bits"],
"concentration_degenerate_c_eq_1": item2_conc_ok,
"entropy_direction_vs_naive": item2_entropy_direction,
"matches_naive_low_H_expectation": item2_matches_naive_low_H,
"NEEDS_OPERATOR": not item2_matches_naive_low_H,
"fresh_bridge_reference_mean_entropy_bits": fresh_ref_H,
"concentration_c_eq_1": item2_conc_ok,
"entropy_high_maximal_mix": item2_high_H,
"note": (
"Concentration extreme is as specified (c=1.0). But the ratified "
"posterior makes a fully-shared bridge MAXIMIZE the anonymity set, so "
"realized H is HIGH, contradicting the §7 gate-item-2 'low H' gloss. "
"This is exactly the mechanical 'mix' (ρ>0) the study exists to test "
"(see note-unique-bridge-artifact.md), surfaced early at calibration. "
"Not silently reconciled: flagged for the operator's freeze decision."
"B=1 shares one bridge → c=1.0 (concentration tooth) AND, under the "
"ratified posterior, the anonymity set is all circuits sharing the exit "
"house → H at the HIGH end (maximal mix). The naive 'low H' gloss is "
"refuted by construction; expect high H. Re-worded pre-freeze."
),
"pass": item2_pass,
},
"item3_monotonicity": {
"decreasing_in_B": dec_in_B,
@@ -166,6 +221,7 @@ def calibration_gate(r: int = R_DRY, c: int = C_DRY) -> Dict:
"checks": entropy_checks,
"pass": item4_pass,
},
"all_pass": bool(item1_pass and item2_pass and item3_pass and item4_pass),
},
}