From 6f825358cc49c12adf8914b0f818b9059115b820 Mon Sep 17 00:00:00 2001 From: Wentao Li Date: Wed, 14 Oct 2026 15:10:27 +0000 Subject: [PATCH 1/2] Tooling: faster mixed-point scalar digests with identical receipts Replace per-node json.dumps in audit_mixed_point.scalar_check with a byte-identical hand-rolled line writer. Preserve circuit_sha256, support checks and mixed-point/early-sharing mathematical payloads. --- research/mixed-point-scalar-digest/NOTICE.md | 19 ++ research/mixed-point-scalar-digest/README.md | 104 ++++++++++ .../mixed-point-scalar-digest/SOURCES.json | 78 +++++++ research/mixed-point-scalar-digest/TASK.json | 70 +++++++ .../mixed-point-scalar-digest/VERIFY.json | 58 ++++++ .../mixed-point-scalar-digest/baseline.py | 173 ++++++++++++++++ .../mixed-point-scalar-digest/benchmark.py | 157 ++++++++++++++ research/mixed-point-scalar-digest/verify.py | 196 ++++++++++++++++++ scripts/audit_mixed_point.py | 36 +++- tests/test_mixed_point_scalar_digest.py | 79 +++++++ 10 files changed, 961 insertions(+), 9 deletions(-) create mode 100644 research/mixed-point-scalar-digest/NOTICE.md create mode 100644 research/mixed-point-scalar-digest/README.md create mode 100644 research/mixed-point-scalar-digest/SOURCES.json create mode 100644 research/mixed-point-scalar-digest/TASK.json create mode 100644 research/mixed-point-scalar-digest/VERIFY.json create mode 100644 research/mixed-point-scalar-digest/baseline.py create mode 100644 research/mixed-point-scalar-digest/benchmark.py create mode 100644 research/mixed-point-scalar-digest/verify.py create mode 100644 tests/test_mixed_point_scalar_digest.py diff --git a/research/mixed-point-scalar-digest/NOTICE.md b/research/mixed-point-scalar-digest/NOTICE.md new file mode 100644 index 0000000000..e2ec9d3e7b --- /dev/null +++ b/research/mixed-point-scalar-digest/NOTICE.md @@ -0,0 +1,19 @@ +# Notice + +This package accelerates the historical mixed-point scalar digest in +`scripts/audit_mixed_point.py:scalar_check` while preserving the mixed-point +and early-sharing mathematical screens. + +Predecessor credit: + +- Douglas R. Colkitt — mixed-point circuits, source/target-span frame cuts, + early-sharing screens and the historical certificates. +- Closest tooling priors on *different* objects: CrocSwap/integer-mult-bounds + PRs #756 (balanced-Fano packed replay), #1793 (inplace-side prefix), #1861 + (parity-side basis/contains), #1922 (joint-frame cleared product), #1217 + (ternary frame-pair memoization), and `research/rational-containment-performance/` + (mixed-point `contained` adapter). + +Prepared by Wentao Li with substantial AI assistance under Apache-2.0. +This is not independent human peer review and is not a formal proof of the +multiplication theorem. diff --git a/research/mixed-point-scalar-digest/README.md b/research/mixed-point-scalar-digest/README.md new file mode 100644 index 0000000000..b2543ab353 --- /dev/null +++ b/research/mixed-point-scalar-digest/README.md @@ -0,0 +1,104 @@ +# Faster exact mixed-point scalar digests with identical receipts + +**Tooling improvement; no new kappa.** At base +`0b1cccf86e2f5132ed286a26ef0a681a495740ea`, the historical mixed-point audit +(`scripts/audit_mixed_point.py`) and the early-sharing screen both call +`scalar_check` on large cancellation-free circuits. Profiling shows a large +share of that helper’s time in per-node `json.dumps((node, args), …)` and +per-output `json.dumps((i, node), …)` while building `circuit_sha256`. + +This change writes the same UTF-8 digest lines with an equivalent hand-rolled +formatter (`[node,null]`, `[node,[a,b]]`, `[i,node]`), keeps every support and +topology `require`, and leaves `circuit_sha256` unchanged. No certificate +`source_sha256` pin lists `audit_mixed_point.py`; the mixed-point and +early-sharing mathematical payloads stay fieldwise identical to the committed +files. + +## Reproduce + +Python **3.12**, standard library only, from the repository root: + +```sh +python3.12 -I -B research/mixed-point-scalar-digest/verify.py +python3.12 -I -O -B research/mixed-point-scalar-digest/verify.py +python3.12 -B scripts/research_package.py --package research/mixed-point-scalar-digest +python3.12 -I -B research/mixed-point-scalar-digest/benchmark.py --rounds 5 +``` + +Expected: + +```text +PASS_MIXED_POINT_SCALAR_DIGEST scalar_cases=7 encoding_cases=5 certs=0 no_new_kappa +PASS_REGISTERED_RESEARCH_PACKAGE research/mixed-point-scalar-digest outcome=completed +PASS_IDENTICAL_MIXED_POINT_SCALAR_RECEIPTS +``` + +Default verify is read-only. Full `make verify`, selected cold replay, Lean, and +multiplication-theorem obligations were not rerun for this isolated +historical-checker change. + +## Result + +On Linux / CPython 3.12 (see [RESULT.json](RESULT.json) for the host pin), five +alternating fresh-process pairs timing only `scalar_check` on the fixed +mixed-point circuit set (block-only and hybrid `h=50`, then four factored +rounds; construction excluded from the timed window) gave median wall time +recorded in RESULT.json. Timing is host-descriptive and is not a correctness +gate. Every scalar receipt matches the baseline checker fieldwise +(`roles`, `circuit_sha256`, flags). + +## Equivalence + +For each active node the historical encoder emitted + +- `json.dumps((node, None), separators=(',',':'))+'\n'` → `[node,null]\n` +- `json.dumps((node, (a,b)), separators=(',',':'))+'\n'` → `[node,[a,b]]\n` + +and for each output index + +- `json.dumps((i, node), separators=(',',':'))+'\n'` → `[i,node]\n` + +with default JSON integer formatting (no whitespace). The hand-rolled writer +emits those exact byte strings. A `None` vs `null` spelling mutant differs and +is rejected by the package controls. Support and topology `require` calls are +unchanged, including under `-O` (they use `require`, not `assert`). + +## Open next questions + +1. **Question:** Can the same byte-identical hand-rolled digest pattern + accelerate `SharedPointCircuit.verify` / `ExclusionCircuit.verify` without + changing `circuit_sha256`? + **Why it matters:** Those verifiers still call `json.dumps` once per active + node on large common-point circuits. + **First step:** Profile `SharedPointCircuit.verify` for the h=50 + bit-compression local circuit and compare a hand-rolled line writer against + the committed digest. + **Blocked by:** Out of this session’s stop rule; `scalar_check` was the + profiled mixed-point bottleneck. + +2. **Question:** Should `certificates/mixed-point-audit.json` refresh its stale + `rational_span_frames.py` `source_sha256` pin (live digest already differs on + main)? + **Why it matters:** The pin is historical provenance for an unchanged + mathematical payload; leaving it avoids mixing a tooling PR with an + unrelated pin repair. + **First step:** Open a dedicated provenance follow-up that only rewrites the + three `source_sha256` entries after a clean certificate regenerate. + **Blocked by:** Pin repair is outside this tooling change. + +## Overlap and credit + +Closest priors (different objects): +[CrocSwap/integer-mult-bounds#756](https://github.com/CrocSwap/integer-mult-bounds/pull/756), +[CrocSwap/integer-mult-bounds#1793](https://github.com/CrocSwap/integer-mult-bounds/pull/1793), +[CrocSwap/integer-mult-bounds#1861](https://github.com/CrocSwap/integer-mult-bounds/pull/1861), +[CrocSwap/integer-mult-bounds#1922](https://github.com/CrocSwap/integer-mult-bounds/pull/1922), +[CrocSwap/integer-mult-bounds#1217](https://github.com/CrocSwap/integer-mult-bounds/pull/1217), +and `research/rational-containment-performance/` (mixed-point `contained` +adapter). No competing open PR on the `scalar_check` digest object at refresh. + +Douglas R. Colkitt authored the mixed-point and early-sharing screens and +original checkers. Prepared by Wentao Li +([VictorLiwentao](https://github.com/VictorLiwentao), +[@Is__Victor](https://x.com/Is__Victor)) with substantial AI assistance, under +Apache-2.0. diff --git a/research/mixed-point-scalar-digest/SOURCES.json b/research/mixed-point-scalar-digest/SOURCES.json new file mode 100644 index 0000000000..b7f58dab90 --- /dev/null +++ b/research/mixed-point-scalar-digest/SOURCES.json @@ -0,0 +1,78 @@ +{ + "schema_version": 1, + "base_commit": "0b1cccf86e2f5132ed286a26ef0a681a495740ea", + "files": [ + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "06c96f5579bb67ed1b86d334e78fbed7da6945f1", + "sha256": "6686ad58f1fbdbc87134a78901b60fd53a20d3984355e91defbbebc9e9fa8075" + }, + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" + }, + { + "path": "certificates/mixed-point-audit.json", + "usage": "provenance", + "git_blob": "5b65e2e08aacc2e58ce4d199fe9f157218fa237f", + "sha256": "4053408adcd8de22edd9ac2b9dde491338f210540ac3a00e8dae9276b3cc2d3b" + }, + { + "path": "certificates/early-sharing-audit.json", + "usage": "provenance", + "git_blob": "344a4582845190583a35f222cb0296e4fa1fc378", + "sha256": "f822ea9e6b69c116f160688caa2b899cb2e209424706f36634e5a9af95480d67" + }, + { + "path": "docs/research/mixed-point-audit.md", + "usage": "provenance", + "git_blob": "31f712b8f78cee8a05b8cb490c8c979c79265ee2", + "sha256": "c80527f9e98c27bd7f5858a06c7273f84c40e0c41505eb4d16029b61f80fb968" + }, + { + "path": "docs/research/early-sharing-and-centers.md", + "usage": "provenance", + "git_blob": "945661f9954155acf87dd9d6dbca47d18509bbdd", + "sha256": "f8706dbda32f7a07081f4010400ba15124b8ae8edacf73867392f1ce2d7d2d50" + }, + { + "path": "scripts/audit_mixed_point.py", + "usage": "provenance", + "git_blob": "0c9e11b9f5d7fae9b5e5a312eca3f246b7aa7d3c", + "sha256": "2eead5d410d1c96f1a7ef47c9c35d16ca6bb6d9c2a6a8d24273290add842214d" + }, + { + "path": "scripts/audit_early_sharing.py", + "usage": "provenance", + "git_blob": "33ce7c0dcffe97acab529700c348e2cd430ad874", + "sha256": "2cf08ee65f8f8610578614d0ff0308eb432732e779f1e8c03e67f1979e75fdc6" + }, + { + "path": "scripts/experiments/mixed_point_circuit.py", + "usage": "provenance", + "git_blob": "b7f561f416f815d0fd135f0a0464c291a9a68468", + "sha256": "f509362b5031976a22af351fd158ae0b4520fa4f286a5176ec37023d672a7ddc" + }, + { + "path": "scripts/experiments/early_sharing.py", + "usage": "provenance", + "git_blob": "671df3d5fb4e13d1758edf4efeb7276c65122468", + "sha256": "1dd42768536bac13727528e51a999152cf9516a53c4001f2c390323e7f453378" + }, + { + "path": "scripts/rational_span_frames.py", + "usage": "provenance", + "git_blob": "755f59a5fc87bffae51b57543b0ad5150fa93da8", + "sha256": "7386947406d5dc4322a39fb7ccd886876a2fa1d163e823f0f231e11cf9ca0cec" + }, + { + "path": "tests/test_mixed_point.py", + "usage": "provenance", + "git_blob": "1d97e9f9bbcd4d61f618fc562a0e22b58af59ad5", + "sha256": "bb279af4bf072e9709d70cefe0cdf0230688d865f9c5e902350c4aade9218452" + } + ] +} diff --git a/research/mixed-point-scalar-digest/TASK.json b/research/mixed-point-scalar-digest/TASK.json new file mode 100644 index 0000000000..bf31b6287d --- /dev/null +++ b/research/mixed-point-scalar-digest/TASK.json @@ -0,0 +1,70 @@ +{ + "schema_version": 1, + "task_id": "replay-runtime", + "priority_revision": 3, + "base_commit": "0b1cccf86e2f5132ed286a26ef0a681a495740ea", + "chooser_seed": "1e60c388106de197fb515e8dc9b5a10f", + "original_card": { + "id": "replay-runtime", + "question": "Can one measured replay bottleneck be sped up without dropping coverage?", + "starting_points": [ + "scripts/run_isolated_tests.py", + "scripts/verify_replay_coverage.py", + "certificates/selected-result.json" + ], + "methods": [ + "Profile one isolated replay and optimize the measured bottleneck.", + "Design source-bound reuse with explicit dependency invalidation and negative controls." + ], + "acceptance_gate": "Report before/after wall time on the same fixture, retained checks and invalidation behavior.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the selected reproduction command and choose a single replay stage for profiling.", + "scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay." + }, + "first_experiment": "Measure one unchanged fixture, preserve check coverage, and test one optimization with invalidation controls.", + "bottleneck_link": "Faster trustworthy replays increase review throughput and let mechanism candidates be checked sooner.", + "allowed_variations": [ + "Profile one stage or design one source-bound cache boundary." + ], + "scope_change_triggers": [ + "Skipping coverage or comparing different fixtures to claim speedup." + ], + "overlap_terms": [ + "replay runtime", + "cache invalidation", + "isolated tests" + ] + }, + "scope_status": "refined", + "actual_scope": "Can scripts/audit_mixed_point.py:scalar_check emit the same circuit_sha256 digest lines (and the same support/topology rejection checks) without per-node json.dumps, so the historical mixed-point and early-sharing scalar streams keep fieldwise-identical receipts?", + "scope_change_reason": "The catalogue card asks for one measured replay bottleneck with before/after wall time and retained checks. Expertise override selected verifier-engineering (seed 1e60c388106de197fb515e8dc9b5a10f) after the complex-mechanisms draw landed on saturated packing/rank-shape work listed as deferred. Profiling named scalar_check's per-node json.dumps stream inside audit_mixed_point / audit_early_sharing as the bottleneck on this fixed historical screen.", + "bottleneck_link": "Side result on review throughput: mixed-point and early-sharing certificates are part of verify-certificates. A faster identical scalar digest does not change kappa or the binding complex supplier.", + "budget_minutes": 60, + "stop_rule": "Ship an equivalence-preserving scalar_check digest change with frozen baseline, identical mixed-point and early-sharing mathematical payloads, registered replay and a measured before/after median. Do not reopen the mathematical screens or run the selected cold frontier replay.", + "outcome": "completed", + "evidence": "PASS_MIXED_POINT_SCALAR_DIGEST via research/mixed-point-scalar-digest/verify.py (also under -O); PASS_IDENTICAL_MIXED_POINT_SCALAR_RECEIPTS via benchmark.py; mixed-point and early-sharing certificate mathematical payloads match the committed files (audit_mixed_point.py is not a source_sha256 pin in either certificate).", + "author": "Wentao Li", + "github": "VictorLiwentao", + "email": "wentaol4@illinois.edu", + "ai_assistance": "Substantial AI assistance for orientation, overlap search, profiling, implementation, packaging, benchmarking and writing. Not independent human peer review.", + "open_questions": [ + { + "question": "Can the same byte-identical hand-rolled digest pattern accelerate SharedPointCircuit.verify / ExclusionCircuit.verify without changing circuit_sha256?", + "why_it_matters": "Those verifiers still call json.dumps once per active node on large common-point circuits.", + "first_step": "Profile SharedPointCircuit.verify for the h=50 bit-compression local circuit and compare a hand-rolled line writer against the committed digest.", + "blocked_by": "Out of this session's stop rule; scalar_check was the profiled mixed-point bottleneck." + }, + { + "question": "Should certificates/mixed-point-audit.json refresh its stale rational_span_frames.py source_sha256 pin (live digest already differs on main)?", + "why_it_matters": "The pin is historical provenance for an unchanged mathematical payload; leaving it avoids mixing a tooling PR with an unrelated pin repair.", + "first_step": "Open a dedicated provenance follow-up that only rewrites the three source_sha256 entries after a clean certificate regenerate.", + "blocked_by": "Pin repair is outside this tooling change." + } + ] +} diff --git a/research/mixed-point-scalar-digest/VERIFY.json b/research/mixed-point-scalar-digest/VERIFY.json new file mode 100644 index 0000000000..bdeabc069a --- /dev/null +++ b/research/mixed-point-scalar-digest/VERIFY.json @@ -0,0 +1,58 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "scripts/audit_mixed_point.py", + "scripts/audit_early_sharing.py", + "scripts/experiments/mixed_point_circuit.py", + "scripts/experiments/early_sharing.py", + "scripts/rational_span_frames.py", + "certificates/mixed-point-audit.json", + "certificates/early-sharing-audit.json", + "docs/research/mixed-point-audit.md", + "docs/research/early-sharing-and-centers.md", + "tests/test_mixed_point.py" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 600, + "checks": "Exact baseline copy of the base-commit audit_mixed_point.py; identical scalar_check receipts on mixed-point full-size and factored circuits plus early-sharing full-size; encoding foil rejects a wrong null spelling while preserving Boolean support checks; mixed-point and early-sharing mathematical payloads match committed certificates." + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 600, + "checks": "Same equivalence and certificate payload discipline under -O (require() gates, not assert)." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "-m", + "unittest", + "discover", + "-s", + "tests", + "-p", + "test_mixed_point*.py", + "-v" + ], + "timeout_seconds": 180, + "checks": "Existing mixed-point unit tests plus focused scalar-digest package controls." + } + ] +} diff --git a/research/mixed-point-scalar-digest/baseline.py b/research/mixed-point-scalar-digest/baseline.py new file mode 100644 index 0000000000..0c9e11b9f5 --- /dev/null +++ b/research/mixed-point-scalar-digest/baseline.py @@ -0,0 +1,173 @@ +#!/usr/bin/env python3 +"""Bounded mixed-point circuits and a reusable source/target-span frame cut. + +Full-size scalar counts are screened before expensive full-size frame work. +The successful frame controls below are small instances, not a new kappa. +""" +from fractions import Fraction as Q +from hashlib import sha256 +from itertools import combinations, product +from math import comb +from pathlib import Path +from types import SimpleNamespace +import gc +import json + +from certify import require, verify_sources +from exclusion_circuit import ExclusionCircuit +from experiments.mixed_point_circuit import build, plan, factored_transpose +from prepare_layers import serializable +from rational_span_frames import audit, basis, dot, join, nondegenerate +from search_network import log_integer_bounds + +ROOT = Path(__file__).resolve().parents[1] +TARGET = Q(1,2**30) + + +def scalar_check(c): + """Every entry of the complete intersection-one map, including zeros.""" + require(c.k == c.l == 3 and c.r == 1, 'Wrong top-level relation') + incident = [0]*c.n + for i,triple in enumerate(c.inputs): + for point in triple: + incident[point] |= 1 << i + require(c.inputs == c.targets, 'Mismatched source and target order') + digest = sha256() + for node in c.active: + if c.args[node]: + a,b = c.args[node] + require(a < node and b < node, 'Non-topological addition') + require(not c.support[a] & c.support[b], 'Cancellation in monotone circuit') + require(c.support[node] == c.support[a] | c.support[b], 'Wrong intermediate sum') + digest.update(json.dumps((node,c.args[node]),separators=(',',':')).encode()+b'\n') + for i,((a,b,d),node) in enumerate(zip(c.targets,c.outputs)): + # Odd intersections are one or three; remove the unique diagonal. + expected = incident[a] ^ incident[b] ^ incident[d] ^ (1 << i) + require(c.support[node] == expected, 'Incorrect intersection-one output') + digest.update(json.dumps((i,node),separators=(',',':')).encode()+b'\n') + return dict(h=c.n,additions=c.additions,outputs=len(c.outputs), + roles=c.additions+len(c.outputs),all_coefficients_exact=True, + every_addition_has_disjoint_support=True,circuit_sha256=digest.hexdigest()) + + +def optimistic_score(h,R): + v = comb(h,3) + m = h**3 + W = 2*v*v*(v+R+h) + D = v*v*(v-6*h*h) + eta = Q(D,W*m) + loglo,_ = log_integer_bounds(m) + upper = eta/((1-eta)*loglo) + qlog = 5*TARGET*loglo + budget = Q(D)*(1+qlog)/(2*v*v*m*qlog)-v-h + return dict(bit_saving_upper_if_no_extra_losses=upper, + kappa_upper_if_no_extra_losses=upper/5, + fraction_of_target=upper/(5*TARGET), + necessary_integer_role_budget=(budget.numerator-1)//budget.denominator, + scope='Retained dimension, central losses, stage sharing and Gaussian assembly; assumes a loss-free frame certificate that has NOT been supplied at this size.') + + +def dirty_side_check(c): + adapter = SimpleNamespace(inputs=c.inputs,args=c.args,active=set(c.active), + outputs=dict(zip(c.targets,c.outputs)),additions=c.additions) + code = ExclusionCircuit.compile(adapter) + v = len(c.inputs) + x = [1 << i for i in range(v)] + scratch = [1 << (v+i) for i in range(code['roles'])] + original = list(scratch) + y = [0]*v + operations = [] + for _,ins,outs in code['gates']: + operations += [(ins[0],slot) for slot in ins[1:]] + operations += [(slot,ins[0]) for slot in outs[1:]] + def mix(inverse=False): + for target,source in reversed(operations) if inverse else operations: + scratch[target] ^= scratch[source] + def copy(): + for source,slot in code['sources'].items(): + scratch[slot] ^= x[c.variables[source]-1] + def inject(): + for i,target in enumerate(c.targets): + y[i] ^= scratch[code['outputs'][target]] + # The two side injections cancel every independent arbitrary scratch input. + mix(); inject(); mix(True); copy() + mix(); inject(); mix(True); copy() + require(scratch == original, 'Dirty auxiliary inputs were not restored') + require(y == [c.support[node] for node in c.outputs], 'Incorrect dirty side map') + return dict(all_independent_scratch_inputs_restored=True,side_map_exact=True, + independent_variables=v+code['roles']) + + +def enclosure_obstruction(): + h = 10 + sources = [(0,1,2),(3,4,5),(6,7,8)] + targets = list(product(range(3),range(3,6),range(6,9))) + vector = lambda t:tuple(int(i in t) for i in range(h)) + U = basis(tuple(map(vector,sources))) + V = basis(tuple(map(vector,targets))) + radical = (1,)*9+(0,) + require(all(dot(a,b) == 0 for a in U for b in V), 'Nonorthogonal rectangle') + require(not nondegenerate(U), 'Expected a degenerate source span') + require(join(U,(radical,)) == U and join(V,(radical,)) == V, 'Missing shared radical') + require(len(U)+len(V)-len(join(U,V)) == 1, 'Wrong intersection dimension') + return dict(ambient_dimension=h,sources=sources,targets=targets, + source_dimension=len(U),target_dimension=len(V), + common_radical=radical,intersection_dimension=1, + scope='No nondegenerate subspace E with U subset E subset V-perp; does not reject arbitrary nonnested matrix frames.') + + +def certificate(): + # Materialize one full-size example of each decomposition strategy. + full = [] + for common in (False,True): + c = build(50,3,3,1,common=common) + full.append(dict(strategy='hybrid' if common else 'block_only', + plan=plan(50,3,3,1,common=common),scalar=scalar_check(c))) + build.cache_clear() + del c + gc.collect() + require(full[0]['scalar']['roles'] == 698661, 'Block-only screen changed') + require(full[1]['scalar']['roles'] == 509194, 'Hybrid does not reproduce baseline') + + c = build(50,3,3,1) + build.cache_clear() + rounds = [] + for step in range(1,5): + c,stats = factored_transpose(c) + rounds.append(dict(step=step,factoring=stats,scalar=scalar_check(c))) + gc.collect() + roles = rounds[-1]['scalar']['roles'] + require(roles == 447488, 'Unexpected bounded factoring outcome') + score = optimistic_score(50,roles) + require(score['kappa_upper_if_no_extra_losses'] < TARGET, 'Target-capable candidate needs further review') + del c + gc.collect() + + controls = [] + for h in (10,12): + c = build(h,3,3,1) + for step in range(3): + if step: + c,_ = factored_transpose(c) + scalar = scalar_check(c) + frame = audit(c) + require(frame['cut_certified'], 'Small frame-cut control failed') + controls.append(dict(step=step,scalar=scalar,frames=frame,dirty=dirty_side_check(c))) + proofs = ['docs/research/mixed-point-audit.md','scripts/experiments/mixed_point_circuit.py', + 'scripts/rational_span_frames.py'] + return dict(status='BOUNDED MIXED-POINT RESEARCH; NO NEW KAPPA', + upstream_commit=verify_sources(),target=TARGET, + full_size_decompositions=full,factored_transposition_rounds=rounds, + role_reduction=Q(509194-roles,509194),optimistic_score=score, + small_frame_controls=controls,enclosure_obstruction=enclosure_obstruction(), + source_sha256={name:sha256((ROOT/name).read_bytes()).hexdigest() for name in proofs}, + full_size_frame_certificate_supplied=False, + decision='Stop this bounded topology/factoring search. Retain the source/target-span cut lemma and exact checker for future circuits; current full-size counts miss 2^-30 even with no extra rank losses.') + + +if __name__ == '__main__': + result = certificate() + (ROOT/'certificates/mixed-point-audit.json').write_text( + json.dumps(serializable(result),indent=2,sort_keys=True)+'\n') + print('PASS mixed-point screen: 509194 -> 447488 scalar roles; target not reached.') + print('Small source/target-span cut certificates pass; no full-size frame or kappa claim.') diff --git a/research/mixed-point-scalar-digest/benchmark.py b/research/mixed-point-scalar-digest/benchmark.py new file mode 100644 index 0000000000..63ac892d42 --- /dev/null +++ b/research/mixed-point-scalar-digest/benchmark.py @@ -0,0 +1,157 @@ +#!/usr/bin/env python3 +"""Alternating fresh-process before/after timing for mixed-point scalar digests. + +Timing is descriptive and never a correctness gate. Receipts must match +fieldwise between baseline and optimized workers. Circuit construction is +shared and excluded from the timed interval so the measurement isolates the +scalar_check digest stream. +""" +from __future__ import annotations + +import argparse +from hashlib import sha256 +import json +import os +from pathlib import Path +import platform +import statistics +import subprocess +import sys + +ROOT = Path(__file__).resolve().parents[2] +PACKAGE = Path(__file__).resolve().parent +sys.path.insert(0, str(ROOT / "scripts")) +from certify import require # noqa: E402 + +WORKER = r''' +import importlib.util +import json +import sys +import time +from pathlib import Path + +root = Path(sys.argv[1]) +mode = sys.argv[2] +sys.path.insert(0, str(root / "scripts")) + +from experiments.mixed_point_circuit import build, factored_transpose + +if mode == "baseline": + spec = importlib.util.spec_from_file_location( + "baseline_amp", root / "research/mixed-point-scalar-digest/baseline.py" + ) + amp = importlib.util.module_from_spec(spec) + sys.modules["baseline_amp"] = amp + spec.loader.exec_module(amp) +else: + import audit_mixed_point as amp + +# Build the fixed historical circuit set outside the timed window. +circuits = [] +build.cache_clear() +for common, label in ((False, "block_only"), (True, "hybrid")): + c = build(50, 3, 3, 1, common=common) + circuits.append((label, c, None)) + build.cache_clear() +c = build(50, 3, 3, 1) +build.cache_clear() +for step in range(1, 5): + c, stats = factored_transpose(c) + circuits.append((f"factored_{step}", c, stats)) + +t0 = time.perf_counter() +rows = [] +for label, circuit, stats in circuits: + record = amp.scalar_check(circuit) + row = dict(label=label, **record) + if stats is not None: + row["factoring"] = stats + rows.append(row) +elapsed = time.perf_counter() - t0 +print(json.dumps(dict(mode=mode, seconds=elapsed, rows=rows), sort_keys=True)) +''' + + +def run_worker(mode: str) -> dict: + env = dict(os.environ) + env.pop("PYTHONOPTIMIZE", None) + env["PYTHONDONTWRITEBYTECODE"] = "1" + proc = subprocess.run( + [sys.executable, "-I", "-B", "-c", WORKER, str(ROOT), mode], + cwd=ROOT, + env=env, + capture_output=True, + text=True, + check=False, + ) + require(proc.returncode == 0, f"worker {mode} failed: {proc.stderr[-2000:]}") + line = proc.stdout.strip().splitlines()[-1] + return json.loads(line) + + +def main() -> None: + parser = argparse.ArgumentParser() + parser.add_argument("--rounds", type=int, default=5) + parser.add_argument("--out", type=Path, default=PACKAGE / "RESULT.json") + args = parser.parse_args() + require(args.rounds >= 1, "rounds") + + samples = [] + for i in range(args.rounds): + order = ("optimized", "baseline") if i % 2 == 0 else ("baseline", "optimized") + pair = {} + for mode in order: + pair[mode] = run_worker(mode) + require( + pair["baseline"]["rows"] == pair["optimized"]["rows"], + f"receipt mismatch on round {i}", + ) + samples.append( + dict( + round=i, + baseline_seconds=pair["baseline"]["seconds"], + optimized_seconds=pair["optimized"]["seconds"], + ratio=pair["baseline"]["seconds"] / pair["optimized"]["seconds"], + ) + ) + print( + f"round {i}: baseline={pair['baseline']['seconds']:.3f}s " + f"optimized={pair['optimized']['seconds']:.3f}s " + f"ratio={samples[-1]['ratio']:.3f}", + flush=True, + ) + + base_med = statistics.median(s["baseline_seconds"] for s in samples) + opt_med = statistics.median(s["optimized_seconds"] for s in samples) + result = dict( + status="PASS_IDENTICAL_MIXED_POINT_SCALAR_RECEIPTS", + fixture=( + "mixed-point scalar_check only (construction excluded): " + "block_only+hybrid h=50 and four factored rounds" + ), + rounds=args.rounds, + median_baseline_seconds=base_med, + median_optimized_seconds=opt_med, + median_ratio=base_med / opt_med, + samples=samples, + environment=dict( + python=sys.version, + platform=platform.platform(), + executable=sys.executable, + ), + source_sha256=dict( + baseline=sha256((PACKAGE / "baseline.py").read_bytes()).hexdigest(), + production=sha256((ROOT / "scripts/audit_mixed_point.py").read_bytes()).hexdigest(), + ), + no_new_kappa=True, + ) + args.out.write_text(json.dumps(result, indent=2, sort_keys=True) + "\n") + print( + "PASS_IDENTICAL_MIXED_POINT_SCALAR_RECEIPTS", + f"median {base_med:.3f} -> {opt_med:.3f} s ({base_med / opt_med:.2f}x)", + flush=True, + ) + + +if __name__ == "__main__": + main() diff --git a/research/mixed-point-scalar-digest/verify.py b/research/mixed-point-scalar-digest/verify.py new file mode 100644 index 0000000000..fbcdf68cb8 --- /dev/null +++ b/research/mixed-point-scalar-digest/verify.py @@ -0,0 +1,196 @@ +#!/usr/bin/env python3 +"""Equivalence, pin and mutation controls for mixed-point scalar digests. + +Read-only by default. Regenerates no certificate. Timing is not a pass gate; +see benchmark.py / RESULT.json. +""" +from __future__ import annotations + +import argparse +from hashlib import sha256 +import importlib.util +import json +from pathlib import Path +import subprocess +import sys + +ROOT = Path(__file__).resolve().parents[2] +PACKAGE = Path(__file__).resolve().parent +SCRIPTS = ROOT / "scripts" +sys.path.insert(0, str(SCRIPTS)) + +from certify import require # noqa: E402 +from prepare_layers import serializable # noqa: E402 +import audit_mixed_point as production # noqa: E402 +from experiments.mixed_point_circuit import build, factored_transpose # noqa: E402 + +BASE_COMMIT = "0b1cccf86e2f5132ed286a26ef0a681a495740ea" +ORIGINAL_BLOB = "0c9e11b9f5d7fae9b5e5a312eca3f246b7aa7d3c" +ORIGINAL_SHA256 = "2eead5d410d1c96f1a7ef47c9c35d16ca6bb6d9c2a6a8d24273290add842214d" +OPTIMIZED_SHA256 = "fc7ca3e07d8a3ad54e894c387a89b310ae0b7048763cd48bb27f5daeb0d73dba" + + +def load_module(path: Path, name: str): + spec = importlib.util.spec_from_file_location(name, path) + require(spec is not None and spec.loader is not None, f"missing module {path}") + module = importlib.util.module_from_spec(spec) + sys.modules[name] = module + spec.loader.exec_module(module) + return module + + +def digest_file(path: Path) -> str: + return sha256(path.read_bytes()).hexdigest() + + +def git_show(path: str) -> bytes: + return subprocess.check_output(["git", "show", f"{BASE_COMMIT}:{path}"], cwd=ROOT) + + +def check_baseline_bytes() -> None: + baseline = PACKAGE / "baseline.py" + original = git_show("scripts/audit_mixed_point.py") + require(sha256(original).hexdigest() == ORIGINAL_SHA256, "base audit_mixed_point.py sha256 drift") + blob = ( + subprocess.check_output( + ["git", "rev-parse", f"{BASE_COMMIT}:scripts/audit_mixed_point.py"], cwd=ROOT + ) + .decode() + .strip() + ) + require(blob == ORIGINAL_BLOB, "base audit_mixed_point.py blob drift") + require(baseline.read_bytes() == original, "baseline.py must be an exact copy of the base commit source") + require( + digest_file(SCRIPTS / "audit_mixed_point.py") == OPTIMIZED_SHA256, + "production audit_mixed_point.py does not match the claimed optimized digest", + ) + + +def check_encoding_foil() -> dict: + """Hand-rolled lines must match json.dumps text, and a mutant must differ.""" + samples = [ + (0, None), + (1, (2, 3)), + (999999, (0, 1)), + (42, None), + (7, (100, 200)), + ] + for node, edge in samples: + old = json.dumps((node, edge), separators=(",", ":")) + "\n" + if edge is None: + new = f"[{node},null]\n" + else: + new = f"[{node},[{edge[0]},{edge[1]}]]\n" + require(old == new, f"encoding mismatch for {(node, edge)}") + # Mutant foil: Python's historical None spelling is lowercase null. + bad = "[0,None]\n" + good = json.dumps((0, None), separators=(",", ":")) + "\n" + require(bad != good, "mutant None spelling must differ from json null") + return {"encoding_cases": len(samples), "none_mutant": "rejected"} + + +def check_scalar_equivalence(baseline, optimized) -> dict: + build.cache_clear() + records = [] + # Mixed-point certificate shapes: block-only / hybrid full size, then four + # factored rounds starting from the default hybrid build. + for common, label in ((False, "block_only"), (True, "hybrid")): + c = build(50, 3, 3, 1, common=common) + old = baseline.scalar_check(c) + new = optimized.scalar_check(c) + require(old == new, f"scalar_check mismatch on {label}") + records.append( + dict(label=label, roles=new["roles"], circuit_sha256=new["circuit_sha256"]) + ) + build.cache_clear() + del c + c = build(50, 3, 3, 1) + build.cache_clear() + for step in range(1, 5): + c, stats = factored_transpose(c) + old = baseline.scalar_check(c) + new = optimized.scalar_check(c) + require(old == new, f"scalar_check mismatch on factored step {step}") + records.append( + dict( + label=f"factored_{step}", + roles=new["roles"], + circuit_sha256=new["circuit_sha256"], + factoring=stats, + ) + ) + require(records[-1]["roles"] == 447488, "unexpected factored role count") + # Early-sharing full-size baseline circuit uses the same scalar_check. + from experiments.mixed_point_circuit import build as mpc_build + + early = mpc_build(50, 3, 3, 1) + old = baseline.scalar_check(early) + new = optimized.scalar_check(early) + require(old == new, "early-sharing full-size scalar_check mismatch") + require(new["roles"] == 509194, "unexpected early-sharing hybrid roles") + records.append(dict(label="early_hybrid", roles=new["roles"], circuit_sha256=new["circuit_sha256"])) + return {"scalar_cases": len(records), "records": records} + + +def check_certificate_payloads(optimized) -> dict: + mixed = serializable(optimized.certificate()) + committed = json.loads((ROOT / "certificates/mixed-point-audit.json").read_text()) + for key in ( + "decision", + "full_size_decompositions", + "factored_transposition_rounds", + "small_frame_controls", + "enclosure_obstruction", + "optimistic_score", + "role_reduction", + "target", + "status", + ): + require(mixed[key] == committed[key], f"mixed-point payload drift on {key}") + # audit_mixed_point.py is not among the certificate's source_sha256 pins. + require( + "scripts/audit_mixed_point.py" not in committed["source_sha256"], + "unexpected pin of audit_mixed_point.py", + ) + + import audit_early_sharing as early_mod + + early = serializable(early_mod.certificate()) + early_committed = json.loads((ROOT / "certificates/early-sharing-audit.json").read_text()) + for key in ("decision", "full_size", "small_trials", "status"): + require(early[key] == early_committed[key], f"early-sharing payload drift on {key}") + return { + "mixed_point_payload": "identical", + "early_sharing_payload": "identical", + "audit_mixed_point_pinned": False, + } + + +def main() -> None: + parser = argparse.ArgumentParser() + parser.add_argument("--write-certificate", action="store_true", help="unused; kept for API parity") + args = parser.parse_args() + require(not args.write_certificate, "this package does not rewrite certificates") + + check_baseline_bytes() + baseline = load_module(PACKAGE / "baseline.py", "mixed_point_scalar_baseline") + encoding = check_encoding_foil() + scalars = check_scalar_equivalence(baseline, production) + payloads = check_certificate_payloads(production) + print( + "PASS_MIXED_POINT_SCALAR_DIGEST", + f"scalar_cases={scalars['scalar_cases']}", + f"encoding_cases={encoding['encoding_cases']}", + "certs=0", + "no_new_kappa", + ) + print( + "payloads", + payloads["mixed_point_payload"], + payloads["early_sharing_payload"], + flush=True, + ) + + +if __name__ == "__main__": + main() diff --git a/scripts/audit_mixed_point.py b/scripts/audit_mixed_point.py index 0c9e11b9f5..53a2e05d0e 100644 --- a/scripts/audit_mixed_point.py +++ b/scripts/audit_mixed_point.py @@ -25,7 +25,15 @@ def scalar_check(c): - """Every entry of the complete intersection-one map, including zeros.""" + """Every entry of the complete intersection-one map, including zeros. + + Tooling note (mixed-point / early-sharing replay): node and output digest + lines are written with the same UTF-8 text that + ``json.dumps(..., separators=(',',':'))`` produced historically, but without + building JSON encoder objects per row. Support checks and + ``circuit_sha256`` are unchanged. See + ``research/mixed-point-scalar-digest/``. + """ require(c.k == c.l == 3 and c.r == 1, 'Wrong top-level relation') incident = [0]*c.n for i,triple in enumerate(c.inputs): @@ -33,18 +41,28 @@ def scalar_check(c): incident[point] |= 1 << i require(c.inputs == c.targets, 'Mismatched source and target order') digest = sha256() + update = digest.update + encode = str.encode + args = c.args + support = c.support for node in c.active: - if c.args[node]: - a,b = c.args[node] + edge = args[node] + if edge: + a, b = edge require(a < node and b < node, 'Non-topological addition') - require(not c.support[a] & c.support[b], 'Cancellation in monotone circuit') - require(c.support[node] == c.support[a] | c.support[b], 'Wrong intermediate sum') - digest.update(json.dumps((node,c.args[node]),separators=(',',':')).encode()+b'\n') - for i,((a,b,d),node) in enumerate(zip(c.targets,c.outputs)): + require(not support[a] & support[b], 'Cancellation in monotone circuit') + require(support[node] == support[a] | support[b], 'Wrong intermediate sum') + # Byte-identical to json.dumps((node,(a,b)), separators=(',',':'))+'\n' + update(encode(f'[{node},[{a},{b}]]\n')) + else: + # Byte-identical to json.dumps((node,None), separators=(',',':'))+'\n' + update(encode(f'[{node},null]\n')) + for i, ((a, b, d), node) in enumerate(zip(c.targets, c.outputs)): # Odd intersections are one or three; remove the unique diagonal. expected = incident[a] ^ incident[b] ^ incident[d] ^ (1 << i) - require(c.support[node] == expected, 'Incorrect intersection-one output') - digest.update(json.dumps((i,node),separators=(',',':')).encode()+b'\n') + require(support[node] == expected, 'Incorrect intersection-one output') + # Byte-identical to json.dumps((i,node), separators=(',',':'))+'\n' + update(encode(f'[{i},{node}]\n')) return dict(h=c.n,additions=c.additions,outputs=len(c.outputs), roles=c.additions+len(c.outputs),all_coefficients_exact=True, every_addition_has_disjoint_support=True,circuit_sha256=digest.hexdigest()) diff --git a/tests/test_mixed_point_scalar_digest.py b/tests/test_mixed_point_scalar_digest.py new file mode 100644 index 0000000000..f813e425e0 --- /dev/null +++ b/tests/test_mixed_point_scalar_digest.py @@ -0,0 +1,79 @@ +#!/usr/bin/env python3 +"""Focused controls for the mixed-point scalar digest tooling package.""" +from __future__ import annotations + +from hashlib import sha256 +import importlib.util +import json +import unittest +from pathlib import Path +import sys + +ROOT = Path(__file__).resolve().parents[1] +PACKAGE = ROOT / "research" / "mixed-point-scalar-digest" +sys.path.insert(0, str(ROOT / "scripts")) + +from experiments.mixed_point_circuit import build # noqa: E402 +import audit_mixed_point as production # noqa: E402 + + +def load_baseline(): + spec = importlib.util.spec_from_file_location("baseline_amp_test", PACKAGE / "baseline.py") + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +class MixedPointScalarDigestTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.baseline = load_baseline() + + def test_baseline_matches_base_commit_bytes(self): + import subprocess + + original = subprocess.check_output( + ["git", "show", "0b1cccf86e2f5132ed286a26ef0a681a495740ea:scripts/audit_mixed_point.py"], + cwd=ROOT, + ) + self.assertEqual((PACKAGE / "baseline.py").read_bytes(), original) + + def test_encoding_matches_json_dumps(self): + samples = [(0, None), (3, (1, 2)), (100, None), (9, (8, 7))] + for node, edge in samples: + old = json.dumps((node, edge), separators=(",", ":")) + "\n" + if edge is None: + new = f"[{node},null]\n" + else: + new = f"[{node},[{edge[0]},{edge[1]}]]\n" + self.assertEqual(old, new) + + def test_none_mutant_differs(self): + self.assertNotEqual("[0,None]\n", json.dumps((0, None), separators=(",", ":")) + "\n") + + def test_small_circuit_receipts_match(self): + build.cache_clear() + c = build(12, 3, 3, 1, common=True) + self.assertEqual(self.baseline.scalar_check(c), production.scalar_check(c)) + + def test_support_rejection_preserved(self): + build.cache_clear() + c = build(10, 3, 3, 1, common=True) + # Corrupt one addition support; both engines must reject. + node = next(n for n in c.active if c.args[n]) + a, b = c.args[node] + c.support[node] = c.support[a] # drop the right child bits + with self.assertRaises(ValueError): + production.scalar_check(c) + with self.assertRaises(ValueError): + self.baseline.scalar_check(c) + + def test_production_digest_pin(self): + self.assertEqual( + sha256((ROOT / "scripts/audit_mixed_point.py").read_bytes()).hexdigest(), + "fc7ca3e07d8a3ad54e894c387a89b310ae0b7048763cd48bb27f5daeb0d73dba", + ) + + +if __name__ == "__main__": + unittest.main() From 3221e1066aacf2f96d18d9989fcd02b93ff337f2 Mon Sep 17 00:00:00 2001 From: Wentao Li Date: Wed, 14 Oct 2026 15:33:08 +0000 Subject: [PATCH 2/2] =?UTF-8?q?Record=20mixed-point=20scalar-digest=20benc?= =?UTF-8?q?hmark=20receipts=20(2.25=C3=97)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Five alternating fresh-process pairs on CPython 3.12.3 / Linux give median 10.004 → 4.444 seconds with fieldwise-identical scalar receipts. Cap package command timeouts under the 1200s generic replay budget. --- research/mixed-point-scalar-digest/README.md | 9 ++-- .../mixed-point-scalar-digest/RESULT.json | 50 +++++++++++++++++++ .../mixed-point-scalar-digest/VERIFY.json | 6 +-- 3 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 research/mixed-point-scalar-digest/RESULT.json diff --git a/research/mixed-point-scalar-digest/README.md b/research/mixed-point-scalar-digest/README.md index b2543ab353..1306958f21 100644 --- a/research/mixed-point-scalar-digest/README.md +++ b/research/mixed-point-scalar-digest/README.md @@ -39,13 +39,14 @@ historical-checker change. ## Result -On Linux / CPython 3.12 (see [RESULT.json](RESULT.json) for the host pin), five +On Linux / CPython 3.12.3 (Linux-6.12.94+-x86_64-with-glibc2.39), five alternating fresh-process pairs timing only `scalar_check` on the fixed mixed-point circuit set (block-only and hybrid `h=50`, then four factored rounds; construction excluded from the timed window) gave median wall time -recorded in RESULT.json. Timing is host-descriptive and is not a correctness -gate. Every scalar receipt matches the baseline checker fieldwise -(`roles`, `circuit_sha256`, flags). +**10.004 → 4.444 seconds (2.25×)**. Timing is host-descriptive and is not a +correctness gate; all samples and environment pins are in +[RESULT.json](RESULT.json). Every scalar receipt matches the baseline checker +fieldwise (`roles`, `circuit_sha256`, flags). ## Equivalence diff --git a/research/mixed-point-scalar-digest/RESULT.json b/research/mixed-point-scalar-digest/RESULT.json new file mode 100644 index 0000000000..415f87e84c --- /dev/null +++ b/research/mixed-point-scalar-digest/RESULT.json @@ -0,0 +1,50 @@ +{ + "environment": { + "executable": "/usr/bin/python3.12", + "platform": "Linux-6.12.94+-x86_64-with-glibc2.39", + "python": "3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0]" + }, + "fixture": "mixed-point scalar_check only (construction excluded): block_only+hybrid h=50 and four factored rounds", + "median_baseline_seconds": 10.004118329999983, + "median_optimized_seconds": 4.444395452000208, + "median_ratio": 2.2509514371628683, + "no_new_kappa": true, + "rounds": 5, + "samples": [ + { + "baseline_seconds": 10.759656437000558, + "optimized_seconds": 4.545425416000398, + "ratio": 2.367139585906609, + "round": 0 + }, + { + "baseline_seconds": 10.004118329999983, + "optimized_seconds": 4.3992744540000785, + "ratio": 2.274038238488088, + "round": 1 + }, + { + "baseline_seconds": 9.629288107999855, + "optimized_seconds": 4.488741446999484, + "ratio": 2.1452089013584397, + "round": 2 + }, + { + "baseline_seconds": 9.663091254000392, + "optimized_seconds": 4.444395452000208, + "ratio": 2.1742194992237924, + "round": 3 + }, + { + "baseline_seconds": 10.133248975999777, + "optimized_seconds": 4.4019990880005935, + "ratio": 2.301965260197803, + "round": 4 + } + ], + "source_sha256": { + "baseline": "2eead5d410d1c96f1a7ef47c9c35d16ca6bb6d9c2a6a8d24273290add842214d", + "production": "fc7ca3e07d8a3ad54e894c387a89b310ae0b7048763cd48bb27f5daeb0d73dba" + }, + "status": "PASS_IDENTICAL_MIXED_POINT_SCALAR_RECEIPTS" +} diff --git a/research/mixed-point-scalar-digest/VERIFY.json b/research/mixed-point-scalar-digest/VERIFY.json index bdeabc069a..fa0e74036b 100644 --- a/research/mixed-point-scalar-digest/VERIFY.json +++ b/research/mixed-point-scalar-digest/VERIFY.json @@ -23,7 +23,7 @@ "-B", "{package}/verify.py" ], - "timeout_seconds": 600, + "timeout_seconds": 480, "checks": "Exact baseline copy of the base-commit audit_mixed_point.py; identical scalar_check receipts on mixed-point full-size and factored circuits plus early-sharing full-size; encoding foil rejects a wrong null spelling while preserving Boolean support checks; mixed-point and early-sharing mathematical payloads match committed certificates." }, { @@ -34,7 +34,7 @@ "-B", "{package}/verify.py" ], - "timeout_seconds": 600, + "timeout_seconds": 480, "checks": "Same equivalence and certificate payload discipline under -O (require() gates, not assert)." }, { @@ -51,7 +51,7 @@ "test_mixed_point*.py", "-v" ], - "timeout_seconds": 180, + "timeout_seconds": 120, "checks": "Existing mixed-point unit tests plus focused scalar-digest package controls." } ]