RQ1+RQ2 start-line: live per-cell condition assembler + guarded launcher + Holm ratification
Wire the live per-cell condition assembler (cmd_chat/sor/assembler.py): compose
the existing R1/R4/R5/R6 pieces into a condition-encoding CircuitSpec per frozen
§2 cell, so a cell_id maps to a genuinely distinct, ForwarderPlan-gated
(engine != local) isolated circuit rather than the plain 3-hop control:
- RQ1 bridge-on / on+padding insert a live bridge hop (+ R1 PADDING stream);
- RQ2 bridge-/directory-federated genuinely span >= 2 houses
(federation.select_federated_path, split-knowledge).
Plans only: opens no socket, moves no traffic, stands up no engine.
battery.assembler_dry_check validates on FIXTURES (6/6 cells distinct
fingerprints, all isolation-gated, same (cell,seed) reproduces, RQ1 bridge +
padding arms live, RQ2 federation >= 2 houses); write-once, kept out of any
confirmatory data dir. confirmatory_run preflight now runs it; the --operator-go
path no longer refuses cells as "not wired" — triple-lock + green preflight HOLD
on grid completion, then surface the operator's immutable data-run gate. No
confirmatory cell is ever fabricated.
Start-line instrument-validation gate (cmd_chat/sor/gate.py), grid + containment
pin (grid.py), and the guarded launcher (confirmatory_run.py) land alongside.
Holm: hold family_size = 7, report the 4 RQ1/RQ2 tests -> multipliers 7,6,5,4.
This is the pre-registration, not a deviation (prereg §6 [APPROVAL] size-7 family
+ D6 disclosure in the lead paper); docs/stage-05-holm-clarification.md marked
RATIFIED. RQ3-fold and alpha-split declined.
Containment intact; prereg untouched (SHA f22331a72e...); worktree-only. output/
gitignored (runtime artifacts, never source). Full SOR suite 156 passed. No
confirmatory data collected — the live data run remains the human gate.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -271,3 +271,79 @@ def dry_pass(out_root: Path, *, runs: int = 2) -> Dict:
|
||||
if not path.exists():
|
||||
path.write_text(json.dumps(summary, indent=2, sort_keys=True) + "\n", encoding="utf-8")
|
||||
return summary
|
||||
|
||||
|
||||
# --------------------------------------------------------------------------- #
|
||||
# Assembler dry-check (fixtures only — proves each cell is a REAL, distinct,
|
||||
# isolation-gated live circuit, NOT the plain 3-hop control). Builds plans only:
|
||||
# opens no socket, moves no traffic, stands up no engine.
|
||||
# --------------------------------------------------------------------------- #
|
||||
def assembler_dry_check(out_root: Path, run_index: int = 0, *, engine: str = "docker") -> Dict:
|
||||
"""Assemble every runnable §2 cell into its condition-encoding CircuitSpec and
|
||||
verify, on FIXTURES: (a) all 6 cells build a valid isolated ForwarderPlan for
|
||||
every hop (``engine != local``); (b) the 6 fingerprints are distinct (each cell
|
||||
is a genuinely different circuit, not the plain control); (c) re-assembling the
|
||||
same (cell, seed) reproduces its fingerprint (determinism); (d) the RQ1 bridge
|
||||
arms actually insert a bridge hop (+padding flag on on+padding); (e) the RQ2
|
||||
federation topologies genuinely span >= 2 houses. Plans only — no traffic, no
|
||||
engine. Writes a write-once report under ``out_root`` (kept OUT of any
|
||||
confirmatory data dir). Returns the summary."""
|
||||
from cmd_chat.sor.assembler import assemble
|
||||
|
||||
out_root = Path(out_root)
|
||||
out_root.mkdir(parents=True, exist_ok=True)
|
||||
cells = enumerate_cells()
|
||||
|
||||
per_cell: List[Dict] = []
|
||||
fingerprints: List[str] = []
|
||||
for c in cells:
|
||||
seed = derive_seed(c.cell_id, run_index)
|
||||
spec = assemble(c, seed, engine=engine)
|
||||
again = assemble(c, seed, engine=engine) # determinism: same (cell, seed)
|
||||
fingerprints.append(spec.fingerprint())
|
||||
per_cell.append({
|
||||
"cell_id": c.cell_id,
|
||||
"rq": c.rq,
|
||||
"seed": seed,
|
||||
"fingerprint": spec.fingerprint(),
|
||||
"isolation_gated": spec.isolation_gated(),
|
||||
"reproduces": spec.fingerprint() == again.fingerprint(),
|
||||
"bridge_present": spec.bridge_present,
|
||||
"padding_applied": spec.padding_applied,
|
||||
"span_houses": spec.span_houses(),
|
||||
"topology": spec.topology,
|
||||
})
|
||||
|
||||
# Condition-encoding expectations (each cell is REAL, not the plain control).
|
||||
def _cell(pred) -> Dict:
|
||||
return next(r for r in per_cell if pred(r["cell_id"]))
|
||||
|
||||
rq1_on = _cell(lambda i: i.endswith("bridge=on"))
|
||||
rq1_pad = _cell(lambda i: i.endswith("bridge=on+padding"))
|
||||
rq2_bridge_fed = _cell(lambda i: i.endswith("topo=bridge-federated"))
|
||||
rq2_dir_fed = _cell(lambda i: i.endswith("topo=directory-federated"))
|
||||
|
||||
summary = {
|
||||
"schema": "sor-assembler-dry/1",
|
||||
"run_index": run_index,
|
||||
"engine": engine,
|
||||
"n_cells": len(per_cell),
|
||||
"all_isolation_gated": all(r["isolation_gated"] for r in per_cell),
|
||||
"all_reproduce": all(r["reproduces"] for r in per_cell),
|
||||
"distinct_fingerprints": len(set(fingerprints)) == len(per_cell),
|
||||
"rq1_bridge_arms_live": rq1_on["bridge_present"] and rq1_pad["bridge_present"],
|
||||
"rq1_padding_arm_live": rq1_pad["padding_applied"] and not rq1_on["padding_applied"],
|
||||
"rq2_federation_spans_2plus": (
|
||||
rq2_bridge_fed["span_houses"] >= 2 and rq2_dir_fed["span_houses"] >= 2
|
||||
),
|
||||
"cells": per_cell,
|
||||
}
|
||||
summary["all_green"] = bool(
|
||||
summary["all_isolation_gated"] and summary["all_reproduce"]
|
||||
and summary["distinct_fingerprints"] and summary["rq1_bridge_arms_live"]
|
||||
and summary["rq1_padding_arm_live"] and summary["rq2_federation_spans_2plus"]
|
||||
)
|
||||
path = out_root / "assembler-dry.json"
|
||||
if not path.exists():
|
||||
path.write_text(json.dumps(summary, indent=2, sort_keys=True) + "\n", encoding="utf-8")
|
||||
return summary
|
||||
|
||||
Reference in New Issue
Block a user