diff --git a/research/r492-parent-accounting-audit/CLAIM.json b/research/r492-parent-accounting-audit/CLAIM.json new file mode 100644 index 0000000000..2fd09827c2 --- /dev/null +++ b/research/r492-parent-accounting-audit/CLAIM.json @@ -0,0 +1,25 @@ +{ + "track": "adversarial mathematical audit", + "assignment_seed": 70, + "randomness": "Python secrets.randbelow(100), backed by operating-system randomness", + "base_commit": "66849e1475c930fd7732b1a0067ffee7e1e95f60", + "claimed_at_utc": "2026-10-13T04:46:00Z", + "expected_finish_utc": "2026-10-13T05:19:00Z", + "coordination": "GitHub pinnedIssues returned no pinned issue; claim recorded locally.", + "candidates": [ + "Remapped width-8 spot-helper obligations", + "Provider R=492 versus fixed parent R0=504 in invoice accounting", + "Assembly receipt admission and exact finite guards" + ], + "selection": "70 modulo 3 selects candidate index 1; parent/provider accounting is distinct from open #675's timing and bridge audit.", + "object": "The selected PR626 invoice's R/R0 accounting and the corresponding subset of PROOF-NOTE-R.md revert claims", + "method": "Independent integer recount from pinned receipts, plus isolated one-site mutations of the accounting statements", + "deliverable": "Scoped reproducible audit, exact evidence and negative controls; no new kappa", + "stopping_rule": "One selected invoice and a fixed, documented accounting-mutation set; stop after reproducibility and source review", + "overlap_check": "Open PR metadata through #712 checked; no R0/generalization/revert-accounting duplicate found. #675 concerns owner timing; #704 concerns review-ledger metadata.", + "status": "completed research audit", + "result": "Independent selected-invoice recount agrees exactly. The R0 introductory pass expectation contradicts its own table and evidence; implementation rejects the wrong substitutions. Seven source mutations and four altered inputs reject; one equivalent control passes identically.", + "pull_request": "https://github.com/CrocSwap/integer-mult-bounds/pull/724", + "final_overlap_check": "Queue refreshed through #722 and pinnedIssues rechecked. #717 prices moment sensitivity, not this finite R/R0 invoice or its revert expectations. origin/main remains the exact recorded base.", + "verification": "Normal and optimized Python; deterministic EXPECTED equality; clean committed-file export in unrelated cwd; modified source rejection; make selected-record-check. No full cold replay or full make verify." +} diff --git a/research/r492-parent-accounting-audit/EXPECTED.json b/research/r492-parent-accounting-audit/EXPECTED.json new file mode 100644 index 0000000000..5cdf38b104 --- /dev/null +++ b/research/r492-parent-accounting-audit/EXPECTED.json @@ -0,0 +1,122 @@ +{ + "exact": { + "R": 492, + "R0": 504, + "adapters": 437040, + "charges": { + "bridges": 16128, + "data_sweeps": 32256, + "helper_routes": 70848, + "moves": 7168, + "parent_banks": 4536, + "parent_idle": 16128, + "parent_live": 11704, + "parent_physical": 12218, + "shifts": 3584, + "source_sweeps": 16128, + "wrappers": 4713984 + }, + "compiler": 25934336, + "conservative_pervertex": 4711738180507680, + "nonlocal_items": 4904682, + "outside": 39242128, + "parent_live": 11704, + "parent_physical": 12218, + "pervertex": 1833791190783112, + "rebase_delta": -300156, + "rebased": 1833791190482956 + }, + "finding": "The introductory R0 pass expectation contradicts the table and evidence; the accounting slice rejects R0-to-R substitutions.", + "input_controls": [ + { + "delta": 12, + "field": "physical", + "rejection": "physical stock" + }, + { + "delta": -144, + "field": "wrapper_elementary_factors_charged", + "rejection": "wrapper recount" + }, + { + "delta": -1, + "field": "selected_real_component_primitives", + "rejection": "scalar recount" + }, + { + "delta": 192, + "field": "local_adapters", + "rejection": "compiler and adapter recount" + } + ], + "pervertex_or_rebase_deltas": { + "omit_live_rebase": 4536, + "parent_banks_use_provider_R": -22407266304, + "rebase_64_instead_of_65": 4548, + "routes_use_parent_R0": 358516260864 + }, + "source_mutations": [ + { + "assertion": "assert invoice['unhosted_pervertex']==pervertex and invoice['hosted_rebased_pervertex']==rebased", + "name": "routes_use_parent_R0", + "outcome": "rejected", + "source_line": 126 + }, + { + "assertion": "assert invoice['unhosted_pervertex']==pervertex and invoice['hosted_rebased_pervertex']==rebased", + "name": "parent_banks_use_provider_R", + "outcome": "rejected", + "source_line": 126 + }, + { + "assertion": "parent_banks,rem=divmod(parent_live-2*112*4*8,9);assert rem==0 and parent_physical==parent_live+parent_banks+8+2 # parent R0=504 dedicated helpers per stage bank", + "name": "parent_stock_uses_provider_R", + "outcome": "rejected", + "source_line": 119 + }, + { + "name": "parent_banks_literal_504", + "outcome": "accepted_identical" + }, + { + "assertion": "assert invoice['unhosted_pervertex']==pervertex and invoice['hosted_rebased_pervertex']==rebased", + "name": "omit_helper_routes", + "outcome": "rejected", + "source_line": 126 + }, + { + "assertion": "assert invoice['unhosted_pervertex']==pervertex and invoice['hosted_rebased_pervertex']==rebased", + "name": "omit_wrapper_charge", + "outcome": "rejected", + "source_line": 126 + }, + { + "assertion": "assert invoice['unhosted_pervertex']==pervertex and invoice['hosted_rebased_pervertex']==rebased", + "name": "rebase_64_instead_of_65", + "outcome": "rejected", + "source_line": 126 + }, + { + "assertion": "assert invoice['unhosted_pervertex']==pervertex and invoice['hosted_rebased_pervertex']==rebased", + "name": "omit_live_rebase", + "outcome": "rejected", + "source_line": 126 + } + ], + "source_slice": { + "first_line": 118, + "last_line": 153, + "strict_checks": { + "halving": true, + "literal": true, + "local_primitive_bound": true, + "logical": true, + "mass": true, + "precision": true, + "router": true, + "row": true, + "tape": true + } + }, + "status": "PASS_R492_PARENT_ACCOUNTING_AUDIT" +} diff --git a/research/r492-parent-accounting-audit/README.md b/research/r492-parent-accounting-audit/README.md new file mode 100644 index 0000000000..97b72812f1 --- /dev/null +++ b/research/r492-parent-accounting-audit/README.md @@ -0,0 +1,151 @@ +# Audit of provider and parent helper accounting + +The selected PR626 invoice correctly uses provider `R=492` for helper routes +and fixed parent `R0=504` for its retained bank and stock envelope. This audit +reproduces that finite accounting and resolves a contradiction in the reported +revert-control expectations. It does not claim a new kappa. + +The precise discrepancy is in +[`PROOF-NOTE-R.md`, line 26](../complex-k492-owner-repair/PROOF-NOTE-R.md#L26). +Its introductory expectations say that the R0 controls pass when R differs +from 504. The table's `emit.parent_R0` and `invoice.parent_R0` rows instead +substitute provider R into parent stock and report failure. The evidence +paragraph agrees with those rows. The correct distinction is: + +- Substituting 492 for a required parent count of 504 must fail. +- Substituting the equal literal 504 for the derived parent bank count must + preserve the result. + +The original pinned note is retained unchanged. The +[maintainer review](../../docs/research/community-k492-review.md) already says +the scratch 32-site revert suite was not submitted. This package supplies new +evidence for a smaller, explicitly bounded accounting audit. It does not +reproduce that missing suite or its R=504 fixture. + +## Reproduce + +From the repository root, using only the Python standard library: + +```sh +python3 -I -B research/r492-parent-accounting-audit/verify.py +``` + +Expected output: + +```text +PASS_R492_PARENT_ACCOUNTING_AUDIT: 9 finite guards, 7 source rejections, 1 identical control, 4 input rejections +``` + +`--emit` prints the deterministic evidence in [EXPECTED.json](EXPECTED.json). +The default command also checks that evidence for exact equality. The command +works from another working directory when given the script's absolute path. +It also works under `-O`: the audit's own checks use explicit exceptions, and +the selected source assertions are compiled with optimization disabled. + +Validation passed with normal and optimized Python, and from a committed-file +export containing only this package and the nine pinned inputs in an unrelated +working directory. Normal and optimized evidence is byte-identical. Changing +a pinned source byte is rejected before replay. `make selected-record-check` +also passes. The full `make verify` and cold supplier reconstruction were not +rerun because no supplier, shared verifier or selected artifact changes here. + +## Exact result + +The independent recount reads the parent and provider word dimensions, the +selected dispatch and the per-provider, per-orientation invoice entries. +It does not import the supplier's arithmetic engines. It retains the parent's +nine-bank geometry and the published scalar primitive and wrapper receipts +as assumptions, then sums their charges independently. + +| Quantity | Exact value | +|---|---:| +| Parent helper count, from 728 columns minus 224 data columns | 504 | +| Provider helper count, from 716 columns minus 224 data columns | 492 | +| Helper routes, two directions across 72 complete calls | 70,848 | +| Parent bank charge, nine banks of 504 helpers | 4,536 | +| Parent live / physical stock | 11,704 / 12,218 | +| Hosted live / physical stock | 7,168 / 7,670 | +| Compiler factor | 25,934,336 | +| Nonlocal items / outside work | 4,904,682 / 39,242,128 | +| Complete parent-envelope price P | 1,833,791,190,783,112 | +| Rebase correction | -300,156 | +| Hosted rebased price | 1,833,791,190,482,956 | +| Retained prior allowance plus complete fresh P | 4,711,738,180,507,680 | + +The stock equations are +`parent_live = 7168 + 9*504`, +`parent_physical = parent_live + 504 + 8 + 2`, and +`physical = 7168 + 492 + 8 + 2`. +The rebase correction is +`65*(7670-12218) + (7168-11704) = -300156`. +All charge categories are recorded individually in the evidence. + +The audit also extracts the original `assemble.py` statements from the +`parent_live` assignment through the last finite-invoice check, lines 118–153 +at the pinned base. It executes these unchanged statements on the selected +receipts and checks agreement with the independent recount. The extraction +has unique AST boundaries and the complete source file is hash-pinned. +The nine finite guards use the original implementation; they are replayed, +not independently reimplemented. The invoice recount is the independent part. + +## Controls and their meaning + +The eight source controls each change one uniquely matched expression in an +in-memory copy. Seven fail at the parent identity or exact invoice comparison. +Replacing `9*parent_banks` by `9*504` preserves every captured result. Four +additional input controls exercise the independent recount by changing stock, +wrapper work, scalar work or local adapter work. No source file is modified. + +With all other inputs held fixed, changing provider route R to 504 increases +P by **358,516,260,864**. Changing only the parent bank R0 to 492 decreases P by +**22,407,266,304**. Replacing the rebase coefficient 65 with 64 increases the +rebased price by **4,548**. The source checks detect each mismatch. + +The route substitution overcharges. Its rejection establishes disagreement +with this exact invoice, not that every enlarged conservative allowance is +mathematically unsound. The controls are concrete failed checks. They are +neither counterexamples to the selected construction nor impossibility results. + +## Pins, scope and credit + +Base commit: `66849e1475c930fd7732b1a0067ffee7e1e95f60`. +Assignment seed: **70**, drawn with `secrets.randbelow(100)` from OS randomness. +[CLAIM.json](CLAIM.json) records the candidate selection, stopping rule and +overlap check. No pinned sprint coordination issue was available. + +The selected source is Chafik Boukhalfa's PR626, +`660de893d27bb7abd1d5b01b1640207528a5c851`, building on Jeremy Kothe's +PR622 `f69477f4f6d3c7eb1f740b166881bffed4ffa9f6` and PR623 +`e39a615ca601ce5d62abeb24f3fcdb8644ca1005`. The retained bit supplier is eumemic's +PR543 `2065fe4f72a914d907f1046603f5a36f17018535`; this audit does not replay it. +The accepted conditional kappa remains `51110230636731/31250000000000000`. +[SOURCES.json](SOURCES.json) pins every consumed fixture and source by SHA-256. +Compressed hashes bind committed inputs; no regenerated gzip bytes are used +as a test of mathematical equality. + +GlobalR and AtomReviewer supplied and corrected the R/R0 generalization. +The retained envelope and invoice descend from icekylinx's PR531 and the +PR552/PR558 lineage, with DreamingOfClouds' cold helpers and Rohan Arun's +recurrence work retained. Their [package notice](../complex-k492-owner-repair/NOTICE.md) +and [parent notice](../direct-delivery504-global/NOTICE.md) preserve full credit. +The concurrent [PR675](https://github.com/CrocSwap/integer-mult-bounds/pull/675) +audits owner timing and bridge omission. It is related context, not a dependency +or the same accounting experiment. +The refreshed queue also includes [PR717](https://github.com/CrocSwap/integer-mult-bounds/pull/717), +which prices moment sensitivity to structural changes. This audit instead +checks the selected finite invoice and its R/R0 mutation expectations. + +Only the named accounting slice is replayed. Earlier scalar, frame, phase, +whole-owner and wrapper admission remains inherited from the selected review. +The retained prior allowance is a pinned receipt value, not freshly derived +here. Moment endpoints and the 47 outer assembly constraints are outside this +audit. All-size compilation, common-label and mutable-basis realization, +hosting, normalized residuals, precision/tape and analytic transfer remain +conditional. Finite arithmetic and rejection controls do not prove the full +multiplication theorem. + +Prepared for **thakrarsagar** with substantial **OpenAI Codex** assistance, +including a separate agent's arithmetic and code review. This is not +independent human peer review. New work uses the repository's Apache-2.0 +license. The selected frontier, pinned historical sources and `upstream/` +are unchanged. diff --git a/research/r492-parent-accounting-audit/SOURCES.json b/research/r492-parent-accounting-audit/SOURCES.json new file mode 100644 index 0000000000..b928181bc1 --- /dev/null +++ b/research/r492-parent-accounting-audit/SOURCES.json @@ -0,0 +1,11 @@ +{ + "research/complex-k492-owner-repair/code/assemble.py": "1b1a9024ac910dc9b9d9e30150684e1fa9cb228a4c1c275b75ab04b57fdef1dd", + "research/complex-k492-owner-repair/code/invoice_allcold.py": "141bd2fd58bbfb5b8d0fc8f56f61c45586d5608a5af3487c6b883dd987f998ec", + "research/complex-k492-owner-repair/PROOF-NOTE-R.md": "22312bb347bdf159e6a01a45c47675e6170d33b258e2fd9ed52aee88fb92c0ed", + "research/complex-k492-owner-repair/data/SPEC.json": "2a2577ac526535826fed9d5f7f83f6e2e0ec058a146c64f7286720b995fa2323", + "research/community-k492-audit/pr626/replay/mixed-global/audit/PREFIX-AND-INVOICE.json": "367a73f744ea9b7dd6cca5fa3fda47175f560aa3d37e708c9fa1294dbd4b56eb", + "research/community-k492-audit/pr626/replay/mixed-global/audit/OWNERS-AND-PROFILE.json": "ec7bc4157e7ab1707bddf99994149c932b51365de7e742508fd182051ca57fc1", + "research/community-k492-audit/pr626/replay/mixed-global/base/split-centres/CANONICAL-WORD.json.gz": "66d3c3c70983224650643a0a05a21ac6c6959f84d0f4528650601016f5a76844", + "research/community-k492-audit/pr626/replay/mixed-global/base/providers/ck/CANONICAL-WORD.json.gz": "ae3018c0646be06f47d345bb8baf0e6ea9220096a949fa30a8f7656aa4ad6f45", + "research/community-k492-audit/pr626/replay/mixed-global/base/providers/jp8/CANONICAL-WORD.json.gz": "7a3fec1022d3b2b1bd986302a327735ec521d17b043f4a5acb96253a56f6193c" +} diff --git a/research/r492-parent-accounting-audit/verify.py b/research/r492-parent-accounting-audit/verify.py new file mode 100644 index 0000000000..1863ab5a3c --- /dev/null +++ b/research/r492-parent-accounting-audit/verify.py @@ -0,0 +1,205 @@ +#!/usr/bin/env python3 +"""Audit the selected R/R0 invoice, without importing its arithmetic engines. + +Apache-2.0. Prepared for thakrarsagar with substantial OpenAI Codex assistance. +See README.md for the finite scope and predecessor attribution. +""" +import argparse +import ast +from collections import Counter +from copy import deepcopy +import gzip +import hashlib +import json +from pathlib import Path + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +PACKAGE = "research/complex-k492-owner-repair/" +REPLAY = "research/community-k492-audit/pr626/replay/mixed-global/" + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def load_inputs(): + pins = json.loads((HERE / "SOURCES.json").read_text()) + data = {} + for name, expected in pins.items(): + raw = (ROOT / name).read_bytes() + require(hashlib.sha256(raw).hexdigest() == expected, "source hash: " + name) + data[name] = gzip.decompress(raw) if name.endswith(".gz") else raw + return data + + +def helper_count(word): + require(len(word["start"]) == len(word["final"]), "word column dimensions") + count = len(word["start"]) - 2 * word["v"] + require(count == word["R"] > 0, "word helper count") + return count + + +def recount(invoice, owner, spec, parent, words): + """Use explicit charge categories and native dimensions, not source slicing.""" + counts = {pid: helper_count(word) for pid, word in words.items()} + require(set(counts.values()) == {492}, "selected provider dimensions") + r0 = helper_count(parent) + require(r0 == 504, "fixed parent dimensions") + require(all(w["v"] == 112 and w["h"] == 9 and len(w["centers"]) == 8 + for w in [parent, *words.values()]), "word geometry") + calls = [(s, r, pid) for s, r, pid in spec["dispatch"]] + require(len(calls) == 72 and {(s, r) for s, r, _ in calls} == + {(s, r) for s in range(9) for r in range(8)}, "complete dispatch") + require(Counter(pid for _, _, pid in calls) == invoice["provider_counts"], + "provider dispatch counts") + rows = [invoice["providers"][pid]["local"]["forward" if s % 2 == 0 else "backward"] + for s, _, pid in calls] + scalar = sum(row["real_component_primitives"] for row in rows) + wrappers = sum(row["pre_wrappers"] + row["post_wrappers"] for row in rows) * 144 + require(scalar == invoice["selected_real_component_primitives"], "scalar recount") + require(wrappers == invoice["wrapper_elementary_factors_charged"], "wrapper recount") + require(invoice["factors_per_wrapper"] == 144, "wrapper factor count") + require(invoice["helpers"] == 492 and invoice["centres"] == 8, "provider stock") + require(invoice["live"] == owner["live"] == 7168, "live stock") + require(invoice["physical"] == owner["physical"] == 7168 + 492 + 8 + 2, + "physical stock") + require(invoice["physical_stock_identity"] == dict(data_and_owner_families=7168, + local_helpers=492, private_centres=8, coefficient_work=2), "stock identity") + require(owner["owners_per_call"] == 224 + 492, "owners per call") + require(owner["actual_helper_owner_charts"] == owner["hosted_residuals"] == + sum(counts[pid] for _, _, pid in calls), "helper roles") + require(owner["source_idle_children_charged"] == 16128, "parent idle charge") + compiler = 64 * 74 ** 3 + adapters = max(16 * (max(row["macros"] for row in p["local"].values()) + + sum(p["paid_profile"].values()) + len(words[pid]["start"]) + 8) + + 64 * 73 for pid, p in invoice["providers"].items()) + require(compiler == invoice["compiler"] and adapters == invoice["local_adapters"], + "compiler and adapter recount") + parent_live = 7168 + 9 * r0 + parent_physical = parent_live + r0 + 8 + 2 + charges = dict(data_sweeps=4 * 112 * 8 * 9, source_sweeps=2 * 112 * 8 * 9, + helper_routes=sum(2 * counts[pid] for _, _, pid in calls), + parent_idle=16128, parent_banks=9 * r0, bridges=224 * 72, + shifts=4 * 112 * 8, moves=8 * 112 * 8, parent_live=parent_live, + parent_physical=parent_physical, wrappers=wrappers) + outside = 8 * sum(charges.values()) + 64 * 73 + pervertex = (scalar + charges["bridges"] + charges["shifts"] + charges["moves"] + + parent_live + compiler * (72 * adapters + outside) + 64 * parent_physical) + rebase_delta = -65 * (parent_physical - invoice["physical"]) - (parent_live - invoice["live"]) + require(pervertex == invoice["unhosted_pervertex"], "unhosted invoice") + require(pervertex + rebase_delta == invoice["hosted_rebased_pervertex"], "rebased invoice") + prior = invoice["retained_prior_overcharge"] + require(prior["added_complete_new_pervertex"] == pervertex, "retained fresh charge") + require(invoice["conservative_pervertex_used"] == + max(pervertex, pervertex + rebase_delta, prior["previous_pervertex_allowance"] + pervertex), + "retained allowance sum") + return dict(R=492, R0=r0, parent_live=parent_live, parent_physical=parent_physical, + charges=charges, nonlocal_items=sum(charges.values()), outside=outside, + compiler=compiler, adapters=adapters, pervertex=pervertex, + rebase_delta=rebase_delta, rebased=pervertex + rebase_delta, + conservative_pervertex=invoice["conservative_pervertex_used"]) + + +def accounting_slice(source): + function = next(node for node in ast.parse(source).body + if isinstance(node, ast.FunctionDef) and node.name == "assemble") + starts = [i for i, node in enumerate(function.body) if isinstance(node, ast.Assign) + and ast.unparse(node.targets[0]) == "(parent_live, parent_physical, parent_idle)"] + stops = [i for i, node in enumerate(function.body) if isinstance(node, ast.Assign) + and ast.unparse(node.targets[0]) == "bit_path"] + require(len(starts) == len(stops) == 1 and starts[0] < stops[0], "unique accounting slice") + return function.body[starts[0]:stops[0]] + + +def replay_slice(source, invoice, owner): + body = accounting_slice(source) + env = dict(invoice=deepcopy(invoice), owner=deepcopy(owner), R=invoice["helpers"], + hash_ok=lambda x: isinstance(x, str) and len(x) == 64 and + all(c in "0123456789abcdef" for c in x)) + # Preserve the original assertions even when the audit is invoked with -O. + code = compile(ast.Module(body=body, type_ignores=[]), "", + "exec", optimize=0) + exec(code, env) + return {name: env[name] for name in ("parent_banks", "nonlocal_items", "outside", + "pervertex", "rebased", "used", "actual_checks")} + + +def run(): + inputs = load_inputs() + read = lambda name: json.loads(inputs[name]) + invoice = read(REPLAY + "audit/PREFIX-AND-INVOICE.json") + owner = read(REPLAY + "audit/OWNERS-AND-PROFILE.json") + spec = read(PACKAGE + "data/SPEC.json") + parent = read(REPLAY + "base/split-centres/CANONICAL-WORD.json.gz") + words = {pid: read(REPLAY + "base/providers/" + pid + "/CANONICAL-WORD.json.gz") + for pid in invoice["providers"]} + exact = recount(invoice, owner, spec, parent, words) + source = inputs[PACKAGE + "code/assemble.py"].decode() + baseline = replay_slice(source, invoice, owner) + require(baseline["pervertex"] == exact["pervertex"] and + baseline["rebased"] == exact["rebased"], "independent/source agreement") + mutations = [ + ("routes_use_parent_R0", "2*72*R+", "2*72*504+", False), + ("parent_banks_use_provider_R", "9*parent_banks+", "9*R+", False), + ("parent_stock_uses_provider_R", "parent_live+parent_banks+8+2", "parent_live+R+8+2", False), + ("parent_banks_literal_504", "9*parent_banks+", "9*504+", True), + ("omit_helper_routes", "2*72*R+", "0+", False), + ("omit_wrapper_charge", "+invoice['wrapper_elementary_factors_charged'])", "+0)", False), + ("rebase_64_instead_of_65", "+65*(invoice['physical']", "+64*(invoice['physical']", False), + ("omit_live_rebase", "+(invoice['live']-parent_live)", "+0", False), + ] + controls = [] + for name, old, new, should_pass in mutations: + require(source.count(old) == 1, "unique mutation site: " + name) + try: + got = replay_slice(source.replace(old, new, 1), invoice, owner) + except AssertionError as error: + require(not should_pass, "equivalent control rejected: " + name) + tb = error.__traceback__ + while tb.tb_next: + tb = tb.tb_next + controls.append(dict(name=name, outcome="rejected", source_line=tb.tb_lineno, + assertion=source.splitlines()[tb.tb_lineno - 1].strip())) + else: + require(should_pass and got == baseline, "mutation unexpectedly accepted: " + name) + controls.append(dict(name=name, outcome="accepted_identical")) + input_controls = [] + for field, delta in [("physical", 12), ("wrapper_elementary_factors_charged", -144), + ("selected_real_component_primitives", -1), ("local_adapters", 192)]: + bad = deepcopy(invoice) + bad[field] += delta + try: + recount(bad, owner, spec, parent, words) + except ValueError as error: + input_controls.append(dict(field=field, delta=delta, rejection=str(error))) + else: + raise ValueError("independent recount accepted changed " + field) + c = exact["compiler"] + deltas = dict(routes_use_parent_R0=8 * c * 2 * 72 * (504 - 492), + parent_banks_use_provider_R=8 * c * 9 * (492 - 504), + rebase_64_instead_of_65=exact["parent_physical"] - invoice["physical"], + omit_live_rebase=exact["parent_live"] - invoice["live"]) + note = inputs[PACKAGE + "PROOF-NOTE-R.md"].decode() + require("the R0 and cosmetic sites must pass" in note and + "both R0 controls fail" in note, "pinned prose discrepancy") + return dict(status="PASS_R492_PARENT_ACCOUNTING_AUDIT", exact=exact, + source_slice=dict(first_line=accounting_slice(source)[0].lineno, + last_line=accounting_slice(source)[-1].end_lineno, + strict_checks=baseline["actual_checks"]), + source_mutations=controls, input_controls=input_controls, + pervertex_or_rebase_deltas=deltas, + finding="The introductory R0 pass expectation contradicts the table and evidence; the accounting slice rejects R0-to-R substitutions.") + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--emit", action="store_true", help="print deterministic evidence as JSON") + args = parser.parse_args() + result = run() + if args.emit: + print(json.dumps(result, indent=2, sort_keys=True)) + else: + require(result == json.loads((HERE / "EXPECTED.json").read_text()), "EXPECTED.json mismatch") + print(result["status"] + ": 9 finite guards, 7 source rejections, 1 identical control, 4 input rejections")