Slot 2, the decision place: Chandrupatla's own acceptance band, put inside our step rule as an instrument, does NOT close the gap - CHA 3066 (project) / 2899 (credit) against his 2423, while APS doubles 2806 -> 5432, and the band is not idle (63.6% refusals). The fifth independent test of one conclusion: the remaining gap is the ORDER of the model the step is built on, not the place the similarity is read in. By the declared stop rule (M1 and M2 both false) the 'where is the similarity read' line is closed: all four places measured.

Not empty-handed: our own parameter-free reading 'defect' - refuse when |phi - xi| > min(xi, 1 - xi) - sets a new canonical best, APS 2523 at 153/154 (previous 2527, Chandrupatla 2785), guarantee intact (0 of 135 family cells), refusing on 7.0% of steps. It is a second point on the same trade, not a replacement: 5733 over both sets against 5511, because CHA gives back 3210. Also: _shape_ratios crashed on a missing third point, which evaluate would have turned into a silent sweep of zeros; the slope-gate pin was anchored on line spelling; and the server copy had drifted (stale relax/sor.py, test_relaxation.py absent - 746 tests instead of 755). All synced, 92/92 files identical by content, 755 pass on the server.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
vvs
2026-09-21 06:58:59 +01:00
co-authored by Claude Opus 5
parent 15b94242e0
commit 2357379c2d
15 changed files with 601 additions and 14 deletions
+59
View File
@@ -202,6 +202,7 @@ def main():
verify_placement_modes()
verify_per_place()
verify_decision_place()
print()
if FAILS:
@@ -297,6 +298,64 @@ def verify_per_place():
for r in fam), 0)
DECISION_CELLS = {
# (similarity, prestep, guard): {set: total}
("ratio", "band", "project"): {"APS": 5432, "CHA": 3066},
("ratio", "band", "credit"): {"CHA": 2899},
("ratio", "none", "project"): {"APS": 2806},
("ratio", "defect", "project"): {"APS": 2523, "CHA": 3210},
("ratio_soft", "simpair", "project"): {"CHA": 2868},
}
DECISION_RATES = {"band": 63.6, "defect": 7.0}
def verify_decision_place():
print("\nThe decision place (sweep_decision.json):")
if not os.path.exists("sweep_decision.json"):
print(" !! sweep_decision.json absent — section 'decision place' unverifiable")
FAILS.append("missing sweep_decision.json")
return
with open("sweep_decision.json", encoding="utf8") as fh:
rows = json.load(fh)
by = {(r["spec"][1], r["spec"][5], r["spec"][3]): r for r in rows}
for k, sets in DECISION_CELLS.items():
r = by.get(k)
if r is None:
FAILS.append(f"decision cell {k} missing")
print(f" !! {k} missing — stale sweep")
continue
for setname, want in sets.items():
check(f"{'.'.join(k)} {setname}", r[setname]["total"], want)
d = by[("ratio", "defect", "project")]
check("defect APS solved", d["APS"]["solved"], 153)
check("defect both sets", d["APS"]["total"] + d["CHA"]["total"], 5733)
check("defect is the new canonical best (< 2527)", d["APS"]["total"] < 2527, True)
fam = [r for r in rows if r["spec"][3] in ("project", "safe", "credit")]
check("decision grid guarantee violations", sum(r["APS"]["over"] + r["CHA"]["over"]
for r in fam), 0)
# the refusal rates are recomputed, not transcribed
from scipy.optimize._tstutils import _APS_TESTS_DICTS, _CHANDRUPATLA_TESTS_DICTS
from simroot.pure import pure_root
probs = [(float(q["bracket"][0]), float(q["bracket"][1]),
(lambda ff, aa: lambda t: ff(t, *aa))(q["f"], q.get("args", ())))
for q in _APS_TESTS_DICTS]
probs += [(float(q["bracket"][0]), float(q["bracket"][1]),
(lambda ff: lambda t: ff(t))(q["f"])) for q in _CHANDRUPATLA_TESTS_DICTS]
for mode, want in DECISION_RATES.items():
ref = nfev = 0
for a, b, f in probs:
st = {}
try:
_x, n, _c = pure_root(f, a, b, 1e-12, 200, similarity="ratio",
scale="derived3", guard="project", prestep=mode,
stats=st)
except Exception:
continue
ref += st.get("pre_refused", 0)
nfev += int(n)
check(f"{mode} refusal rate %", round(100.0 * ref / nfev, 1), want)
PLACEMENT_PER_SET = {
"sweep_direction.json": ("CHA", "pure+dissim+slope.ratio.derived3.safe", 2683),
"sweep_gate.json": ("CHA", "gate.ratio_soft.derived.safe", 2851),