Skip to content

Audit: exact scatter parity contract at the checker/exporter boundary (no new kappa) - #3004

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
kumagi:research/scatter-parity-contract
Oct 16, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
kumagi:research/scatter-parity-contract

Conversation

@kumagi

@kumagi kumagi commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Summary

PR2977 checker parity vs exporter membership
  + exact agreement characterisation (all positive multiplicities odd)
  + guard comparison and selected-producer row-space check
= the schema decision is uniqueness-as-producer-restriction, not semantic necessity

Adds only research/scatter-parity-contract-audit/. It independently answers the boundary question this card names: for the frozen xcheck_p.py scatter loop (one XOR per occurrence) and export_records.py scatter emission (one ADD per membership), the two operators agree on a word exactly when every positive multiplicity in every scatter row is odd. The proposed simple-support guard is sound — it never admits a divergent row — but strictly stronger: on all 1,365 tuples of length 0..5 over four retained-total indices it rejects 296 rows that agree, the smallest being [0,0,0]. The PR2977 mutant [4,5,6,7,8,0,0] diverges and both contracts reject it. The pinned tuned word has 111 simple, ascending rows (527 terms = 527 membership ADDs), so either contract preserves the selected bytes.

Task supplier-boundary-audit, priority revision 6, base 836b19bfa309ceafbc8ee32a15e8c4b10dde7e11 (current main; no rebase needed). Canonical thread: discussion #2976.

Evidence

  • Source-line binding: checker for k in row: val[v + t] ^= copies[k], exporter if k in row: rec.append(...), generator decoder_rows from itertools.combinations, tuner rewrites only A/C (the string scatter does not occur in it). The tuned word is bound by SHA-256 e3e301e6….
  • Exhaustive domain (1,365 rows): divergent 1,004; simple 65; odd-multiplicity admissible 361; agreeing rows the guard rejects 296; occurrence-count vs emitted-ADD mismatches 1,300. Controls: membership-loop substitution makes the mutant agree (isolates the divergence to the occurrence loop); simple ⊆ exact and divergent ∩ simple = ∅ hold on the whole domain.
  • Accounting observation: scatter_terms counts occurrences while the exporter emits membership; the counts coincide on simple supports (527 = 527) and differ on every repeated-index row, including the 296 agreeing ones — a schema must say which is authoritative if odd multiplicities are ever admitted.
python3.12 scripts/research_package.py --package research/scatter-parity-contract-audit
# PASS_SCATTER_PARITY_CONTRACT domain=1365 divergent=1004 simple_accept=65
#   exact_accept=361 over_rejected=296 term_mismatch=1300 mutant=divergent
#   selected_rows=111 selected_terms=527 selected_simple=true
#   guard=sufficient_not_necessary coefficient_unchanged=true
# PASS_REGISTERED_RESEARCH_PACKAGE research/scatter-parity-contract-audit outcome=completed

Local replay passes on Linux with CPython 3.12.13, 3.13.5 and 3.14.4, including -I -O -Werror -B; metadata/pin check passes. Hosted CI is queued.

Limits

Finite, source-bound audit: no native backend, no full cold replay, no formal-kernel result, no independent human review. It does not claim the mutant invalidates the selected construction, and it does not adopt or modify any guard. simple-scatter-v1 remains a valid, producer-compatible choice; the finding is that uniqueness is a producer restriction rather than the exact semantic condition, with [0,0,0] as the smallest agreeing row it rejects.

Credit

Counterexample, prior guard and boundary handoff: Nick Petalas/PR2977 and discussion #2976. Opt-in enforcement at both entry points: Arham Tahir/PR2992. Exporter: Dylan Crow; selected word and checker retain the eumemic / DreamingOfClouds / PR589 lineage. This package adds the exact characterisation as a checked domain statement, the guard-versus-agreement comparison, the producer row-space check and the term-count observation. Apache-2.0.

Prepared by @kumagi with substantial AI assistance (DeepSeek V4.1 Flash in the OpenCode harness). No independent human review claimed.

… (no new kappa)

Independently classifies all 1365 small scatter rows: the frozen symbolic
checker (occurrence parity) and record exporter (membership) agree exactly when
every positive multiplicity is odd; the proposed simple-support guard is sound
but rejects 296 agreeing rows (smallest [0,0,0]). The pinned selected word is
simple and ascending, so either contract preserves it. No supplier or frontier
change.
@Mister-Meeseeks
Mister-Meeseeks merged commit 5d93a57 into CrocSwap:main Oct 16, 2026
1 check passed
Mister-Meeseeks pushed a commit that referenced this pull request Oct 17, 2026
…ew kappa)

Answers PR #3004's third open question for one full-size word. Row 0
[4,5,6,7,8] of the selected PR #589 bit word is extended four ways and
each word runs through the unchanged symbolic checker, record exporter,
both entry modes of PR #2992's simple-scatter-v1 guard and the native
legality and five-stage column checkers. Appending [4,4] triples an
existing slot: the symbolic and both native checkers accept it, and all
three exporter artifacts and both native receipts equal the baseline
byte for byte (27,234 records, 24,305 ADDs, rank mass 5129, nine
COPY/ERASE pairs). Appending [0,0,0] triples an absent slot: symbolic
and exported actions agree, but both miss the required endpoint at
output 111 (98 columns; dirty input 472 is a one-bit witness), and the
full symbolic and native column checkers reject it. PR #2977's paired
[0,0] reproduces symbolic acceptance with native rejection. The guard
rejects all three repeated rows before creating output, as its stricter
schema intends. Native legality accepts all four words, so legality
does not certify the endpoint. Occurrence counts are not emitted ADD
counts: the accepted triple has 529 occurrences and 527 scatter ADDs.

This is a finite, author-checked audit with a separately written
harness. Native builds use the pinned checked 128-bit cpp_int stand-in.
No schema decision, supplier adoption, cold ancestry, system-Boost
build, physical hosting or kappa change is claimed.

Adds research/scatter-odd-native-audit/ only.

Submitted by @commdata2338 with substantial AI assistance (OpenAI Codex
research and implementation; packaged with Claude Code).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X86sCSXdoDd61SDFfC1PKG
Mister-Meeseeks pushed a commit that referenced this pull request Oct 20, 2026
Destination-free gate source lists always make accumulate-XOR and sequential
ADD agree; destination-in-sources lists can diverge under export-without-check.
Answers the open #2977/#3004 supplier-boundary gate-operand obligation under
priority revision 6. No new kappa.
Mister-Meeseeks pushed a commit that referenced this pull request Oct 20, 2026
…export boundary

Answer the supplier-boundary cascade's remaining open question (PR3696 OQ1,
following #2977/#2992/#3004 and scatter-parity-contract-audit): for one gate
(d, srcs), the pinned symbolic checker operator (accumulate-then-write) and the
pinned exporter operator (sequential per-source ADD) agree as linear maps over
F2^n iff d is absent from srcs, or the destination multiplicity is odd and
every register occurring before the destination's last occurrence occurs an
even number of times there.

Measured on 9330 (d, srcs) pairs (6 registers, source lists length 0..4, the
published census domain, extended to 55986 pairs at length <= 5): destination-
free 4686 all agree; destination-in 4644 split into 3492 divergent and 1152
agreeing; simulation and the independent coefficient prediction agree on 100%
of pairs. Guard census: the checker's own contract and distinct-only and
dest-free-only are sound with 4608 / 4602 / 1152 agreeing rejections (smallest
nonempty destination-free witness [a,a]); a transplanted scatter simple-support
guard is unsound, admitting 1350 divergent gates; the exact minimal guard is
sound with zero over-rejections. The pinned selected tuned word has 5472
D/A/B/C gates, all with distinct nonempty operands, so every sound guard
preserves its export; its 111 scatter rows are simple supports.

No new kappa (selected 0.001672660197076918 unchanged); no production adoption;
frozen packages unchanged. Reproduce:
python3.12 -B scripts/research_package.py --package research/gate-operand-parity-contract
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.

2 participants