Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions research/integer-xor-scatter-boundary/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# Integer labels and XOR scatter in one checked export boundary

`integer-xor-scatter-v1` composes PR3100's exact-integer label contract with
PR3273's XOR-normalized scatter contract. It retains PR3273's full symbolic
check before export. The result is an opt-in compiler-boundary repair; it does
not change the selected supplier, frozen inputs, or kappa.

## Why this composition is needed

The two underlying defects and their individual repairs are already known:

- Nick Petalas's PR2977 found that the checker counts scatter occurrences
modulo two while the exporter tests membership. PR3273 supplies the
`xor-scatter-v1` normalizer and checks its complete exported action.
- `josecarlosgonzalezroque-design`'s PR3100 found that the checker applies
`int(a)` to label coordinates while export uses `Fraction(a)`. Its
`integer-labels-v1` guard is composed with PR2992's simple-support wrapper.

PR3273's actual public boundary still admits PR3100's fractional-label witness:
changing `lines[0][1]` from `0` to `0.5`. Its symbolic checker sees the original
integer geometry, while export retains the fractional coordinate. Correct
scatter counts do not detect the resulting geometry discrepancy.

This package supplies the missing composition. It accepts occurrence-based
scatter lists, including cancelling pairs, while rejecting noninteger label
encodings before delegation. The contribution is the combined executable
boundary and its integration controls, not discovery of either underlying bug
or a new normalization theorem.

## Contract and implementation

The schema is `integer-xor-scatter-v1`. It first applies PR3100's authenticated
`validate_labels`: `v` is a positive exact integer, `h` is the integer 8,
`lines` has exactly `v` rows of length `h`, and every coordinate has Python type
`int` after JSON parsing. Booleans, strings, fractional numbers, and integral
float spellings such as `0.0` are rejected. Integer typing does not establish
E8 geometry; the full symbolic check is still required.

It then delegates to PR3273's authenticated XOR boundary on a private snapshot.
That boundary reduces each row's slot occurrences modulo two, runs the full
symbolic checker on the normalized word, and exports only after that check
succeeds. COPY/ERASE pairs remain charged per retained slot; aliases and unused
slots are not coalesced. Its emitted invoice checks are retained.

The input is limited to 5 MiB both compressed and decompressed. The inherited
XOR limits remain: at most 256 targets, 4096 helpers, 256 retained slots,
4096 occurrences per row and 65536 occurrences overall. These are implementation
limits, not mathematical bounds. The API is
`execute(mode, input_path, output=None, root=ROOT, scratch=None)`.

The wrapper authenticates and privately snapshots the predecessor validator,
XOR implementation, its source manifest, and the delegated checker/exporter.
The original input is parsed and label-validated before its snapshot is passed
to XOR validation. Thus replacing the original input after validation does not
substitute unchecked label data. Publication inherits the XOR wrapper's
existing-output protection; copying the output files is not a filesystem
transaction. A copy failure can leave a partial new output directory.

For exact integer coordinates, `int(a)` and `Fraction(a)` represent the same
number. For each retained slot with occurrence multiplicity `m`, the scatter
normal form preserves its characteristic-two coefficient `m mod 2`. These two
predecessor arguments concern different fields and apply to the same private
word snapshot. The full symbolic checker remains responsible for the other
word, frame, endpoint and interface conditions. No claim of complete JSON
schema validation follows from these two contracts.

## Reproduction and evidence

From the repository root:

```sh
python3 -B scripts/research_package.py --package research/integer-xor-scatter-boundary
python3 -I -O -Werror -B research/integer-xor-scatter-boundary/verify.py
```

Use the new entry point with a candidate word:

```sh
python3 -I -B research/integer-xor-scatter-boundary/boundary.py check WORD.json.gz
python3 -I -B research/integer-xor-scatter-boundary/boundary.py export WORD.json.gz OUTDIR --scratch SESSION_SCRATCH_DIRECTORY
```

`OUTDIR` must be new. Check mode takes no output path. The receipt reports
`schema`, `input_occurrences`, `normalized_scatter_terms`, and, in export mode,
the inherited exported invoice.

[RESULT.json](RESULT.json) records the finite regression results. The controls
exercise the public wrapper, exact selected export preservation, cancelling
scatter pairs, the fractional-label counterexample, and their combination.
An integer-coordinate mutation that violates the original geometry must still
be rejected by the full checker, demonstrating that the type guard does not
replace semantic validation. The registered commands and their bounded input
closure are in [VERIFY.json](VERIFY.json); exact predecessor pins are in
[SOURCES.json](SOURCES.json).

The scientific base is canonical main
`6f100d4bb5083f8c35d96fd95a539811c62f245c`, priority revision 6. This package
performs no fresh native C++/Boost replay, nonempty kernel/owner/donor admission,
complete selected cold replay, physical hosting or routing, precision/tape
transfer, all-size multiplication proof, or supplier-moment improvement.
PR3326's native results belong to that predecessor and are not silently
extended to this successor. Hosted CI and independent human review are separate
from local automated verification.

## Overlap and attribution

The initial `find_overlap.py` refresh had no usable remote snapshot because
`gh` was unavailable. Public GitHub API searches subsequently covered all
results for XOR scatter (11), scatter/nonempty (6), scatter/donor (23), and
PR3100 references (4), supplemented by local sources and visible portions of
Discussions 2976 and 1166. No matching combined integer-label/XOR repair was
identified. Further API searches hit the unauthenticated rate limit. This
coverage excludes arbitrary diffs, hidden discussion comments and unpublished
work; absence of a match is not proof of novelty. [TASK.json](TASK.json)
records the scope refinement and coverage.

Credit Nick Petalas for PR2977's mismatch and PR3273's XOR boundary;
`josecarlosgonzalezroque-design` for PR3100's label witness and validator;
Arham Tahir for PR2992's simple-scatter boundary; and kumagi/Hiroki Kumazaki for
PR3004's parity/count analysis. Retained-alias qualifications and native
controls belong to Sricharan Vagvala/PR3128, James Reed/PR3099, and
commdata2338/PR3210/PR3222. PR3326 supplies the separate genuine-Boost native
composition audit. eumemic and DreamingOfClouds retain the selected word/checker
lineage, Dylan Crow the exporter/native lineage, and Douglas Colkitt the
selected bindings and review framework. All source notices remain unchanged.

Prepared for Pierre with substantial OpenAI Codex assistance in research,
implementation, automated adversarial review, verification and writing.
Apache-2.0; no independent human or proof-assistant review claimed.

## Open next questions

1. Should a named successor supplier adopt this combined boundary? First bind
its producer and consumer to the schema and source manifest, then replay its
complete symbolic/export/native chain. Maintainer adoption and the complete
supplier obligations remain open; this opt-in wrapper changes no production
caller.
2. Does it compose with a named nonempty kernel, owner and donor construction?
PR3326's native fixture uses empty ownership inputs. First pin a concrete
fixture and enumerate live-source, ownership, bank and complete invoice
obligations. Fresh native and physical accounting are required before
claiming that stronger result.
23 changes: 23 additions & 0 deletions research/integer-xor-scatter-boundary/RESULT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"accepted": {
"baseline": {
"249-records.bin": "ea44aa047a2a9cf034de8b56b2166c49cf2dbdf9cd9ed6a20299a4f2b05ef09a",
"249-states.json": "701ca802279b23ba23ffd502935ae9f34a33fc81fdfd266042f3208a2cb16265",
"frames.json": "d006b3bfe0c04afecfea7aecfa59dfe4298b99501c70da3938e40289bc2f5010"
},
"paired": {
"249-records.bin": "ea44aa047a2a9cf034de8b56b2166c49cf2dbdf9cd9ed6a20299a4f2b05ef09a",
"249-states.json": "701ca802279b23ba23ffd502935ae9f34a33fc81fdfd266042f3208a2cb16265",
"frames.json": "d006b3bfe0c04afecfea7aecfa59dfe4298b99501c70da3938e40289bc2f5010"
}
},
"predecessor_fractional_exports": 2,
"rejected": {
"fractional": true,
"fractional_paired": true,
"integer_wrong_geometry": true,
"wrong_endpoint": true
},
"selected_artifacts_unchanged": true,
"status": "PASS_INTEGER_XOR_SCATTER_BOUNDARY"
}
54 changes: 54 additions & 0 deletions research/integer-xor-scatter-boundary/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"schema_version": 1,
"base_commit": "6f100d4bb5083f8c35d96fd95a539811c62f245c",
"files": [
{
"path": "research/label-coordinate-boundary-audit/boundary.py",
"usage": "input",
"git_blob": "bf0c5558144efe436c213bb058a7b0b5a2cf5481",
"sha256": "d6079e0495c7f6f4badb13676035dc127b0b230548b54658e37b05a9a33804e2"
},
{
"path": "research/xor-scatter-boundary/boundary.py",
"usage": "input",
"git_blob": "5972753580aab6314c4c9cadd2da746029f1e5a2",
"sha256": "65438fa2ac81094127165883fa131e9604939ca7503143b00f993d433dadd8cc"
},
{
"path": "research/xor-scatter-boundary/SOURCES.json",
"usage": "input",
"git_blob": "57cd2b64b810e335f8803bc2bbb4743bc6f057bc",
"sha256": "0a92c54d977d18d5f6bc35068b3584d58c0598b63a627155faebd23bcf6da570"
},
{
"path": "research/e8-bit-p111-tuned/code/xcheck_p.py",
"usage": "input",
"git_blob": "184f5dcf94a486cc7db91ca4db5865916bf26009",
"sha256": "af3decc877e27c00001cf56f50c6c09566e8e101297ab34c7860aed96a06d80e"
},
{
"path": "research/e8-bit-carrier-skeleton/code/bit/export_records.py",
"usage": "input",
"git_blob": "3632d370486a02f5456f7643ced03f8c925b2350",
"sha256": "8a5999601f917dbb492bb9ae9a344611f18cc7cedc53dc3c76496a369e530eb3"
},
{
"path": "research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz",
"usage": "input",
"git_blob": "85a4499bf9e4911a705d50567a2c2ef6cf23739a",
"sha256": "e3e301e62bc2b41dbf1ceac0acf3d35824ebeab1848c5a2142d4577b109da52f"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "67f085acd86acd7d4e03922d9cf4b26bca66fed5",
"sha256": "47b42433f5a85809a3aadd29c2c339da2c6ed728e4f7762df6b88bccb7874cf0"
},
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81",
"sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
}
]
}
96 changes: 96 additions & 0 deletions research/integer-xor-scatter-boundary/TASK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"schema_version": 1,
"task_id": "supplier-boundary-audit",
"priority_revision": 6,
"base_commit": "6f100d4bb5083f8c35d96fd95a539811c62f245c",
"original_card": {
"id": "supplier-boundary-audit",
"question": "Does one selected supplier obligation follow from its actual source-bound checks?",
"starting_points": [
"certificates/selected-result.json",
"research/owner-boundary-audit/README.md",
"research/scatter-export-parity-audit/README.md"
],
"methods": [
"Trace one hypothesis through the source, checker and complete caller.",
"Construct one semantically invalid but superficially well-formed fixture and test rejection."
],
"acceptance_gate": "Pin the current sources and one obligation; the historical owner audit is an example, not evidence of a current bug.",
"first_step": {
"command": [
"python3",
"-B",
"scripts/research_baseline.py"
],
"expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY",
"inspect": "Read #2977 reported duplicate-scatter counterexample and its opt-in repair. The archive is not a production fix or an independently validated selected-result failure; the selected generator emits unique rows.",
"scope": "Source-binding orientation only; does not replay or validate the reported bug."
},
"first_experiment": "First check whether the scatter repair has been adopted. If still open, independently reproduce #2977 symbolic-versus-exported parity on the tiny duplicate fixture, compare the selected unique-row positive control, and define either enforced uniqueness or consistent multiplicity semantics. A bounded guard-adoption patch must preserve valid inputs and test the actual exported action. Stop after this obligation; no full historical replay or frontier change follows from the mutant alone.",
"bottleneck_link": "Closing a current acceptance gap or proof obligation strengthens reliability even without changing kappa.",
"allowed_variations": [
"Audit one named current condition using a new semantic counterexample."
],
"scope_change_triggers": [
"Reporting the historical timing-only diagnostic as a new current acceptance bug.",
"Calling a malformed mutant a failure of the selected construction, or importing an opt-in repair without testing the exporter boundary."
],
"overlap_terms": [
"owner boundary",
"bridge omission",
"hosting",
"2977",
"scatter export",
"duplicate index",
"parity semantics"
]
},
"scope_status": "refined",
"actual_scope": "Compose PR3100 integer-labels-v1 with PR3273 XOR occurrence normalization and full symbolic checking before export, retaining exact selected artifacts and rejecting mixed fractional-label/duplicate-scatter inputs.",
"scope_change_reason": "PR2977 duplicate semantics and PR3100 fractional-label coercion are already known, and PR3273 plus PR3326 already supply normalization and native replay. The missing composition allows the XOR boundary to accept the known fractional-label fixture; this separately versioned wrapper combines both existing contracts instead of rediscovering either defect.",
"bottleneck_link": "A checker/exporter boundary must agree on geometry as well as scalar action. Composing the existing guards closes a concrete reliability gap without a supplier or kappa claim.",
"budget_minutes": 60,
"stop_rule": "Stop after a source-bound compositional wrapper, public-entry regression controls, exact export comparisons, and a focused contribution. No native ownership or construction search expansion.",
"outcome": "completed",
"evidence": "README.md, RESULT.json and the bounded verifier and behavioral controls registered in VERIFY.json. Validation claims are limited to the retained receipt and executed commands.",
"author": "Pierre, with OpenAI Codex assistance",
"ai_assistance": "Substantial OpenAI Codex assistance in source inspection, implementation, automated adversarial review, verification and writing. No independent human or proof-assistant review claimed.",
"selection": {
"method": "User-assigned exporter repair, refined after checking existing work; no random reroll.",
"nearest_predecessors": [
2977,
2992,
3100,
3273,
3326
],
"overlap": "find_overlap.py --task supplier-boundary-audit --refresh --include-closed had no usable remote snapshot because gh was unavailable. Public GitHub API searches then covered all results for is:pr \"xor-scatter\" (11), scatter/nonempty (6), scatter/donor (23), and 3100 (4), with local README/source inspection and visible Discussion2976 and Discussion1166 content. No matching integer-label/XOR composition repair was identified. Further searches hit the unauthenticated API rate limit. Search metadata and visible discussion portions do not cover all diffs, hidden comments or unpublished work; this is not a novelty certificate.",
"public_claim": "None; bounded contribution, no advisory reservation."
},
"open_questions": [
{
"question": "Should a named successor supplier adopt the composed integer-label/XOR boundary?",
"why_it_matters": "This opt-in entry point fixes the combined representation gap, but production callers and their manifests are not changed.",
"first_step": "Bind a named producer and consumer to this contract, review the source pins, and replay the complete symbolic/export/native path.",
"blocked_by": "Maintainer adoption and complete supplier/native obligations; no adoption follows from this finite audit."
},
{
"question": "Does the composed boundary preserve one named nonempty kernel, owner and donor construction?",
"why_it_matters": "PR3326 native composition uses empty ownership inputs and does not supply physical admission for this successor.",
"first_step": "Pin the concrete consumer fixture, enumerate ownership and live-source requirements, and run native controls with its complete invoice.",
"blocked_by": "A concrete nonempty fixture, separate bank and physical accounting, and fresh native replay."
}
],
"validation": {
"registered_replay": "PASS under CPython 3.12.1 on macOS",
"direct_optimized": "PASS under CPython 3.12.1; matching receipt produced with CPython 3.11.6",
"behavioral_test_groups": 5,
"hosted_ci": "Not yet run; reported checks local only"
},
"freshness": {
"upstream_commit": "6f100d4bb5083f8c35d96fd95a539811c62f245c",
"checked_at_utc": "2026-10-17T22:40:09.618856+00:00",
"priority_revision": 6,
"relevant_changes": "Canonical main unchanged on pre-submission fetch; live overlap coverage limitations recorded above."
}
}
38 changes: 38 additions & 0 deletions research/integer-xor-scatter-boundary/VERIFY.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"schema_version": 1,
"status": "ready",
"python": "3.12",
"requirements": [],
"inputs": [
"research/label-coordinate-boundary-audit/boundary.py",
"research/xor-scatter-boundary/boundary.py",
"research/xor-scatter-boundary/SOURCES.json",
"research/e8-bit-p111-tuned/code/xcheck_p.py",
"research/e8-bit-carrier-skeleton/code/bit/export_records.py",
"research/e8-bit-p111-tuned/tune/bitE8mut-p111-tuned.json.gz"
],
"commands": [
{
"argv": [
"{python}",
"-I",
"-B",
"{package}/verify.py"
],
"timeout_seconds": 90,
"checks": "Actual predecessor discrepancy, composed acceptance and rejection, exact selected export artifact equality."
},
{
"argv": [
"{python}",
"-I",
"-O",
"-B",
"{package}/test_boundary.py",
"-v"
],
"timeout_seconds": 120,
"checks": "Malformed schema, delegate corruption, input snapshot replacement, output preservation and optimized CLI checks."
}
]
}
Loading