Skip to content

Verifier: audit_local.py accepts non-centre cut gates; additive guard and regression fixture (no new κ) - #2478

Merged
Mister-Meeseeks merged 2 commits into
CrocSwap:mainfrom
mdumitrean:audit-local-cut-centre-guard
Oct 16, 2026
Merged

Mister-Meeseeks merged 2 commits into
CrocSwap:mainfrom
mdumitrean:audit-local-cut-centre-guard

Conversation

@mdumitrean

@mdumitrean mdumitrean commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Verifier gap, no new κ. The independent local auditor research/gauge44-frames-x/independent/audit_local.py climbs frames only in sections A and B. In the cut, it checks only gates whose source is a centre. Any other cut gate is applied to the scalar map but never frame-checked, so a word can move priced work into the unpriced cut and still pass with an understated paid profile.

The native provider chain catches it, so claims whose admission runs the native chain are not affected. That includes every T74 claim. The gap matters for any acceptance that relies on the auditor alone.

Package: research/audit-local-cut-centre-guard/, outcome completed (task card supplier-boundary-audit, scope refined).

Counterexample

inputs/PROBE-CUT-502.json.gz starts from the genuine base word of the pivot-566+554 T74 supplier (PR #1672's gauge44-word-566) and makes three changes:

  • width-9 helper 502 becomes entering (start frame of dimension 1), so its width drops to 8;
  • four cut gates 200/203/205/206 += ±½ · 502 cancel its initial-value leak;
  • its two A-section writes are re-timed into B.
Check Base word Probe
Unchanged audit_local.py --main PASS (7,208 compensation gates, 192 entering) PASS (7,204 gates, 193 entering, local profile {2: 501, 3: 415}: one rank level less, about 2.1M units per call)
Native chain (PR635 scripts via PR #1186's native.py) PASS, all 5 steps FAIL at hpe_emit_local.py: emitted column mismatch, register 153
guard.py (this PR) PASS FAIL: exactly the 4 non-centre cut gates

The guard

guard.py (standard library) requires every cut gate to be an add whose source is one of the word's eight centres and whose target is a target row (v <= t < 2v). Every genuine word has this structure, and the native emitter relies on it.

  • It accepts all 146 genuine CANONICAL-WORD/FULL-WORD files with a cut at the base commit, plus both supplier words (evidence/GUARD-GENUINE-WORDS.json).
  • It rejects exactly the probe's four gates.

audit_local.py is pinned by hash in 421 files at the base commit, so this PR does not modify it. The guard is additive: it can run alongside the auditor or be folded into a new auditor version, whichever maintainers prefer.

Verification

  • python3.12 scripts/research_package.py --package research/audit-local-cut-centre-guard gives PASS_REGISTERED_RESEARCH_PACKAGE ... outcome=completed, in about 1 s.
    • It checks the input pins, including both declared repository inputs: the auditor, and the parent CANONICAL-WORD.json.gz that its --main interface check reads. Then it runs the unchanged auditor on the base and probe words; both pass, with receipts equal to evidence/AUDIT-*.json.
    • It runs the guard on all three words, with two mutation controls (a non-centre cut source, a non-target cut row).
    • -O is refused.
  • The native rejection is recorded evidence (evidence/NATIVE-PROBE.txt), not rerun in the hook.
  • tests/test_research_*.py: 65 tests OK, 3 skipped.
  • Revision 2 (aa5baad1, after the maintainer's review):
    • The parent word research/community-k492-audit/pr622/replay/baseline558/complex-global/base/split-centres/CANONICAL-WORD.json.gz is now declared in VERIFY.json and SOURCES.json: base 0fdd7d82, source commit 5c5567d1, blob a2e5a1ff, SHA256 66d3c3c7….
    • A Git-free export with only the package and its two declared inputs passes verify.py. The previous head fails there with FileNotFoundError.
    • Deleting or altering the parent word in the export fails the pin check with a named message.

Open next questions

  • Version the guard into the auditor, or into the registered replays that call it. The first step is done: @ywz65's screen found seven registered packages that actually call the auditor. Their committed words pass the guard with an unchanged 176-gate cut (re-run here on the six distinct words), and no existing claim is shown to use the gap. Adoption waits on a maintainer decision about versioning the pinned auditor.
  • Check the other unpriced sections (precondition, derived compensation, frame-free cleanup) for analogous counterexamples.

Credit

Found during our T74 local-word rounds (discussion #2143). See NOTICE.md.

Prepared by Marius-Paul Dumitrean with substantial AI assistance (Anthropic Claude, via Claude Code). Apache-2.0.

… (no new kappa)

research/gauge44-frames-x/independent/audit_local.py frame-checks only
sections A and B and, in the cut, only gates whose source is a centre. A
constructed word (helper 502 made entering, its leak cancelled by four
non-centre cut gates) passes the unchanged auditor with one rank level less,
while the native provider chain rejects it (hpe_emit_local.py: emitted column
mismatch). guard.py requires every cut gate to read a centre into a target row:
it accepts all 146 genuine words at the base commit and both supplier words and
rejects the counterexample. The pinned auditor (421 hash pins) is not changed.
@ywz65

ywz65 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

DONE / scoped consumer handoff for PR2478's first next question.

At canonical main 0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2, a reproducible literal-reference screen finds 450 ready registered manifests, 299 Python files mentioning audit_local, and 23 candidate registered packages. Source inspection separates 7 actual callers of the affected auditor, 11 references used only for source hashing, and 5 references to different checkers or a local function. This is a bounded discovery screen, not a complete static or dynamic Python call graph.

The affected auditor is copied unchanged at gauge44-frames-x/independent, gauge44-slots/independent, and two-accumulator-saved-arms. All three have SHA256 03afcfc9da428b3f6edac81c1fee7f277ab81b64998efae78380b63498dec6cd. Searching only the first pathname would miss the registered callers.

The seven real callers are below. These hooks execute the local scalar/frame auditor; they do not rerun the complete native provider chain. That statement does not erase their retained native source evidence.

Registered package Actual invocation at the pinned base Why the admitted family preserves the cut guard
complex-frame-plane-rail-seedca04cc verify.py:83 The committed candidate is authenticated against its receipt. The search serializer changes A/B and early-cleanup frame annotations and the paid report; it does not replace cut operations or centre identities. The rejection control changes only the claimed profile.
k8-helper-endpoint-audit verify.py:175 The selected word is authenticated; each of the 78 endpoint adversaries changes only helper_final.
selected-k8-frame-ceiling test_package.py:78 Fixture materialization changes A/B and early-cleanup frame annotations and the report, leaving the cut unchanged.
selected-k8-endpoint-contractions test_package.py:91 Materialization adds endpoint/frame/report changes only; an explicit preceding check preserves every scalar operation in A/cut/B/precondition/cleanup.
selected-k8-unrestricted-ends test_package.py:92 Same structural cut invariant; arbitrary terminal-frame choices do not authorize changing cut operands.
selected-k8-omission-observability verify.py:264 Its negative cases delete a single authenticated operation. Deleting a cut gate cannot introduce a non-centre source, wrong opcode or non-target destination. The negative cases are required to fail the full endpoint check.
two-accumulator-saved-arms verify.py:64 All 256 masks rewrite B, cleanup, helper endpoints and the report. The authenticated cut and centre list are unchanged. Its other controls remove cleanup or change an endpoint.

Concrete guard result: the seven base inputs all pass the unchanged PR2478 guard. Their canonical JSON projection [v, centers, cut] is identical: 176 gates, SHA256 334c4facb13fcd3f61582b3a3c2fe65a6649b5685b4d6102de5b774e59a21596. Reconstructing all 256 saved-arm words independently of their local auditor preserves that exact projection and passes the guard. The unchanged PR2478 probe still produces exactly four violations. The other families' closure follows from their source-reviewed allowed mutations, not from rerunning their complete scientific suites here.

Thus these seven are concrete adoption sites for a versioned/widened auditor API, but this screen does not demonstrate that their presently admitted families exploit the gap or invalidate an existing claim. For future generators that alter cut operands or centre identities, enforce the guard before calling the local auditor, or supply the required native frame proof. Keep frozen auditor pins unchanged until a versioning decision is made.

The eleven hash-only candidates are the ten retained dyadic/temporal-engine users listed in the reproduction script plus p112-linear-endpoint-lifts. Their reference authenticates source bytes; it is not an invocation of this auditor. The five other-checker candidates are complex-signed-prefix-audit, diagonal-batch-commutation, diagonal-retiming-host-boundary, selected1094-extended-labels-seed65, and selected1094-wire-prefix-audit. They must not be labelled affected merely because the substring appears.

Reproduction uses only Python's standard library and Git, reads frozen objects from the named base, and executes the original PR2478 guard after a hash check. Fetch base 0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2 and PR2478 head dc83994c2dda28064c902ee970ce47db602224ae, save the script below, then run it from the repository root with python3.12 -I -B reproduce.py. It prints the complete candidate classification and guard receipt. The classification is an explicit source-review input; the script is not an automatic proof of call-graph completeness or of each source-level mutation invariant.

Prepared for ywz65 with substantial OpenAI Codex assistance. Credit Marius-Paul Dumitrean for PR2478's finding and unchanged guard, icekylinx for the auditor, and the authors of each linked consumer for their original checks. This handoff adds the bounded consumer/invariant classification; it does not reclaim the original counterexample or provide new supplier admission.

Validation: native CPython 3.12.7 replay passed. A separate OpenAI Codex worker inspected the seven invocation/mutation paths, the eleven hash-only references and the five different-checker cases, then reproduced the exact JSON under isolated optimized CPython 3.12.14. This was AI-assisted independent execution and source review, not human review.

Canonical main and PR2478 head were rechecked unchanged at 2026-10-15T13:03:24.712646+00:00. Targeted source comments show no intervening competing handoff. Full Discussion coverage remains the cached 1,197-record snapshot at 12:29:05 UTC because the GraphQL quota is exhausted; later unrelated work may be absent.

Self-contained reproduction script
"""Pinned literal-reference census and cut-guard replay, not a Python call-graph proof.

ywz65 with OpenAI Codex assistance. The executed guard is unchanged PR2478
(Marius-Paul Dumitrean); the saved-arm builder retains its source authors.
Run from a full repository checkout after fetching both pinned commits.
"""
import gzip
import hashlib
import json
from pathlib import Path
import subprocess
import tempfile

BASE = '0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2'
GUARD_HEAD = 'dc83994c2dda28064c902ee970ce47db602224ae'
AUDITOR_SHA = '03afcfc9da428b3f6edac81c1fee7f277ab81b64998efae78380b63498dec6cd'
GUARD_SHA = 'aba3e8a6ac4208072d5288b6dd686a5f1b788942e21390baddae79b1c1b248df'
DIRECT = {
    'complex-frame-plane-rail-seedca04cc', 'k8-helper-endpoint-audit',
    'selected-k8-endpoint-contractions', 'selected-k8-frame-ceiling',
    'selected-k8-omission-observability', 'selected-k8-unrestricted-ends',
    'two-accumulator-saved-arms',
}
HASH_ONLY = {
    'complex-temporal-gauge-pair-seed26', 'k8-coherent-triples',
    'k8-coupled-gauge-stationarity', 'k8-l248-l253-l259-temporal-composition-seed27',
    'k8-l259-temporal-seed32', 'k8-l284-temporal-seed37', 'k8-many-dyadic-seed29',
    'k8-temporal-menu-composition', 'k8-varying-many-gauge-seed27',
    'k8-zero-static-temporal-seed25', 'p112-linear-endpoint-lifts',
}
DIFFERENT = {
    'complex-signed-prefix-audit', 'diagonal-batch-commutation',
    'diagonal-retiming-host-boundary', 'selected1094-extended-labels-seed65',
    'selected1094-wire-prefix-audit',
}

def need(ok, why):
    if not ok:
        raise ValueError(why)

def git(*args, data=None):
    return subprocess.run(['git', *args], input=data, capture_output=True,
                          check=True).stdout

def source(path, ref=BASE):
    return git('show', ref + ':' + path)

def sha(raw):
    return hashlib.sha256(raw).hexdigest()

def projection(word):
    return [word['report']['v'], word['centers'], word['cut']]

def canonical(value):
    return json.dumps(value, sort_keys=True, separators=(',', ':')).encode()

def main():
    paths = git('ls-tree', '-r', '--name-only', BASE, '--', 'research').decode().splitlines()
    manifests = [p for p in paths if len(p.split('/')) == 3 and p.endswith('/VERIFY.json')]
    raw = git('cat-file', '--batch', data=('\n'.join(BASE + ':' + p for p in manifests)+'\n').encode())
    ready, offset = set(), 0
    for path in manifests:
        end = raw.index(b'\n', offset)
        size = int(raw[offset:end].split()[-1])
        data = raw[end+1:end+1+size]
        offset = end+2+size
        if json.loads(data).get('status') == 'ready':
            ready.add(path.split('/')[1])
    matches = git('grep', '-l', 'audit_local', BASE, '--', 'research/**/*.py').decode().splitlines()
    matches = [p[len(BASE)+1:] for p in matches]
    candidates = {p.split('/')[1] for p in matches if p.split('/')[1] in ready}
    need(len(manifests) == len(ready) == 450 and len(matches) == 299, 'discovery universe')
    need(candidates == DIRECT | HASH_ONLY | DIFFERENT, 'source-reviewed candidate classification')
    need((len(DIRECT),len(HASH_ONLY),len(DIFFERENT)) == (7,11,5), 'classification counts')
    # Categories above are a source-review conclusion. This finite discovery
    # cannot prove absence of dynamically formed or indirect auditor calls.
    copies = ['research/gauge44-frames-x/independent/audit_local.py',
              'research/gauge44-slots/independent/audit_local.py',
              'research/two-accumulator-saved-arms/audit_local.py']
    need(all(sha(source(p)) == AUDITOR_SHA for p in copies), 'identical auditor copies')
    guard = source('research/audit-local-cut-centre-guard/guard.py', GUARD_HEAD)
    need(sha(guard) == GUARD_SHA, 'original guard pin before execution')
    namespace = {'__name__': 'credited_guard', '__file__': 'pinned_pr2478_guard.py'}
    exec(compile(guard, namespace['__file__'], 'exec'), namespace)
    violations = namespace['violations']
    words = {
        'complex-frame-plane-rail-seedca04cc': 'research/complex-frame-plane-rail-seedca04cc/BEST-WORD.json.gz',
        'k8-helper-endpoint-audit': 'research/t16-owner-audit-seed67/inputs/k8-seven-slot-word.json.gz',
        'selected-k8-omission-observability': 'research/t16-owner-audit-seed67/inputs/k8-seven-slot-word.json.gz',
        'two-accumulator-saved-arms': 'research/two-accumulator-saved-arms/inputs/SEVEN-SLOT-WORD.json.gz',
    }
    for name in ('selected-k8-frame-ceiling', 'selected-k8-endpoint-contractions', 'selected-k8-unrestricted-ends'):
        words[name] = 'research/' + name + '/references/WORD.json.gz'
    checked, cuts = {}, set()
    for name, path in sorted(words.items()):
        word = json.loads(gzip.decompress(source(path)))
        need(not violations(word), 'base guard: '+name)
        digest = sha(canonical(projection(word)))
        cuts.add(digest)
        checked[name] = {'source': path, 'cut_gates': len(word['cut']), 'cut_projection_sha256': digest}
    need(cuts == {'334c4facb13fcd3f61582b3a3c2fe65a6649b5685b4d6102de5b774e59a21596'}, 'common authenticated cut')
    with tempfile.TemporaryDirectory(prefix='pinned-auditor-consumers-') as temporary:
        directory = Path(temporary)
        prefix = 'research/two-accumulator-saved-arms/'
        for path in ('build.py', 'RECIPES.json', 'inputs/SEVEN-SLOT-WORD.json.gz'):
            destination = directory / path
            destination.parent.mkdir(parents=True, exist_ok=True)
            destination.write_bytes(source(prefix+path))
        module = {'__name__':'credited_saved_arm_builder', '__file__':str(directory/'build.py')}
        exec(compile((directory/'build.py').read_bytes(), module['__file__'], 'exec'), module)
        for mask in range(256):
            word = module['construct'](mask)
            need(not violations(word) and sha(canonical(projection(word))) in cuts, 'constructed saved-arm cut')
    probe = json.loads(gzip.decompress(source('research/audit-local-cut-centre-guard/inputs/PROBE-CUT-502.json.gz', GUARD_HEAD)))
    need(len(violations(probe)) == 4, 'original predecessor negative control')
    print(json.dumps({'base': BASE, 'ready_manifests':len(ready), 'python_literal_hits':len(matches),
                      'candidate_packages':len(candidates), 'source_reviewed_categories':{
                          'actual_auditor_callers':sorted(DIRECT), 'hash_only_references':sorted(HASH_ONLY),
                          'different_emitted_program_checker':sorted(DIFFERENT)},
                      'base_guard_checks':checked, 'saved_arm_masks_checked':256,
                      'original_pr2478_probe_violations':4,
                      'limits':'Literal-reference discovery plus manual pinned-source call-path review; no complete Python call graph, new native admission, or invalid existing claim demonstrated.'}, indent=2))

if __name__ == '__main__':
    main()
Original scoped claim (preserved)

CLAIM / LOCAL-ONLY - scoped registered-consumer follow-up to PR2478

I am checking the requested first step: which ready registered packages actually call the affected local auditor, rather than merely hash it or use a different emitted-program auditor? At canonical main 0fdd7d8, the gauge44-slots and gauge44-frames-x copies are byte-identical (SHA256 03afcfc9da428b3f6edac81c1fee7f277ab81b64998efae78380b63498dec6cd).

The initial literal-reference screen has 450 ready manifests and 23 candidate packages. I will classify their actual call paths and check the structural cut invariant for the real consumers' admitted candidate families. Two inspected frame/endpoint packages preserve the source-authenticated cut, so they are not demonstrated invalid claims. A guard on a widened auditor API is a different assertion.

Expected result: a source-bound consumer/cut-invariant handoff, including direct versus hash-only references, exact call sites, guard checks on committed or constructed words, and the limits of the literal-reference discovery. Stop if this has no substantive addition to PR2478; do not repackage its existing counterexample as a new finding. No full arbitrary-Python call-graph coverage or current selected-supplier defect is claimed.

Main was refreshed for this round and is unchanged, priority revision 4. PR2478 is pinned at dc83994. PR overlap snapshot: 684 open PRs at 12:31:06 UTC. Discussion refresh hit the account's GraphQL limit; the complete team snapshot has 1,197 records at 12:29:05 UTC and can miss later work. Expiry 2026-10-15T13:45:00Z.

Prepared for ywz65 with substantial OpenAI Codex assistance. Credit Marius-Paul Dumitrean for PR2478's finding/guard and icekylinx for the retained auditor; consumer authors retain their own source credit.

@Mister-Meeseeks

Copy link
Copy Markdown
Contributor

The scoped cut-source diagnostic and declared commands pass in the full review fixture. One packaging issue needs a revision before integration: the replay invokes the pinned auditor with --main, whose check_parent_interface also reads:

research/community-k492-audit/pr622/replay/baseline558/complex-global/base/split-centres/CANONICAL-WORD.json.gz

That runtime input is absent from both VERIFY.json.inputs and SOURCES.json. I reproduced failure in a Git-free export containing only this package and its declared input; the direct auditor reports FileNotFoundError for the canonical word. The full fixture conceals the dependency.

Please add the canonical word as an input in both manifests with its base/source commit, Git blob and SHA256 (reviewed bytes: 66d3c3c70983224650643a0a05a21ac6c6959f84d0f4528650601016f5a76844), and rerun a declared-input-only export. This is a reproducibility revision, not a rejection of the finite diagnostic. Retain the explicit distinction between the replayed local auditor/guard and the historical native-provider rejection evidence.

audit_local.py --main also reads research/community-k492-audit/pr622/replay/
baseline558/complex-global/base/split-centres/CANONICAL-WORD.json.gz
(check_parent_interface). It is now an input in VERIFY.json and SOURCES.json
(base 0fdd7d8, source commit 5c5567d, blob a2e5a1f, sha256 66d3c3c7), and
verify.py checks both repository inputs before running the auditor. A
Git-free export with only the package and its declared inputs passes; the
previous head fails there with FileNotFoundError. The open-question entry
records ywz65's registered-consumer screen. No new kappa.
@mdumitrean

Copy link
Copy Markdown
Contributor Author

Revision 2 is pushed (aa5baad1) for the packaging issue above. Thank you for catching it.

Fix. The parent word that audit_local.py --main reads in check_parent_interface is now declared in both VERIFY.json.inputs and SOURCES.json:
research/community-k492-audit/pr622/replay/baseline558/complex-global/base/split-centres/CANONICAL-WORD.json.gz.

  • The entry records base 0fdd7d82, source commit 5c5567d1 (the last change to those bytes), blob a2e5a1ff and SHA256 66d3c3c70983224650643a0a05a21ac6c6959f84d0f4528650601016f5a76844. These are the bytes you reviewed.
  • The same blob is still at current main c719a5e0.
  • verify.py now checks the pins of both repository inputs (the auditor and this word) before it runs the auditor. A missing or changed word now fails with a named message instead of a FileNotFoundError.

Declared-input-only export. I exported the package directory and its two declared inputs, with no Git and nothing else, and ran Python 3.12.13:

  • verify.py passes. Both auditor receipts equal evidence/AUDIT-*.json, the guard rejects exactly the probe's four cut gates, and both controls are rejected.
  • The previous head dc83994c fails in the same kind of export with FileNotFoundError on the canonical word, as you found.
  • Deleting or altering the word in the export fails the pin check.
  • In the full checkout, the registered hook passes (--check-only and the full run, about 1 s), and tests/test_research_*.py gives 65 OK, 3 skipped.

The distinction you asked to keep is unchanged. The replayed checks are the local auditor and the guard. The native provider's rejection of the probe is historical evidence (evidence/NATIVE-PROBE.txt) and is not rerun.

@ywz65: thank you for the registered-consumer screen. I re-ran guard.py at 0fdd7d82 on the six distinct committed words behind your seven callers. All pass, with the same 176-gate cut projection (334c4fac…). I did not re-run the 256 saved-arm constructions. The README, TASK.json and the PR body now cite your screen as the completed first step of the open question. Adopting a versioned auditor still waits on the maintainer decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants