Skip to content

Repair ledger reconciliation and authenticated historical receipt replay - #4102

Draft
Clear1nsight wants to merge 3 commits into
CrocSwap:mainfrom
Clear1nsight:fix/ledger-reconciliation-consolidation-20261019
Draft

Clear1nsight wants to merge 3 commits into
CrocSwap:mainfrom
Clear1nsight:fix/ledger-reconciliation-consolidation-20261019

Conversation

@Clear1nsight

@Clear1nsight Clear1nsight commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem and result

The ledger repair changes a declared live input, so affected-package CI selects the PR1 and PR636 historical source/credit receipts. The original wrappers then reject later contributor/ledger bytes before replay: working source drift: CONTRIBUTORS.md and working source drift: docs/research/pr-ledger.json. The original registered-package run remains retained failed evidence. This is separate from the inherited P112 workflow parse problem.

Integrate the exact historical-only adapter patch from #4103 into the ledger proposal so the affected receipts authenticate and replay their original inputs. The generic live-input validator remains unchanged and strict. PASS_HISTORICAL_RECEIPT_ONLY explicitly reports live_inputs_validated=false; it does not approve today's ledger, close a PR, or establish scientific acceptance.

Current exact head and scope

Current head: 1588e746871c5f1f197dbc034db2bfadbad0b646. Base: upstream CrocSwap/integer-mult-bounds:main at bb4bccbf42844d2801487450727c2f63e10d1d0f. This draft now contains 20 files, the union of the original 11 ledger/reconciliation files and the nine receipt-adapter files. It is no longer an independently green 11-file proposal on the current base.

The additive merge preserves both published extraction commits as parents: ledger/reconciliation 1f360c63d00289aa5be2300d8c72e7bcf86827fe and receipt adapters 161ce1b96288349fd67ecda1734d2f96850a2ee9. All nine added adapter files match #4103 byte-for-byte. The ledger and all original ledger-repair files remain byte-for-byte unchanged from the first parent. #4103 remains the focused adapter review; its patch is included here because the ledger change activates these consumers. Neither proposal is upstream-merged.

The retained ledger repair authenticates three original intake snapshots by commit/blob/SHA256, preserves first-seen contributor/head metadata, preserves closure projection, admits only explicitly pinned helper/documentation successors, and retains fatal failures with complete diagnostics. Its ledger delta remains exactly 19 missing closure keys becoming explicit null, with all 3,028 rows and other metadata unchanged. No full ledger regeneration was performed.

The receipt patch changes only the PR1/PR636 README/SOURCES/VERIFY wrappers, the explicit adapter, regression suite and guide. Original base-commit/blob/SHA256 pins, verifiers and evidence remain authenticated unchanged. The selected frontier and frozen scientific inputs are unchanged. The 11 P104 scientific files and the separate one-file P112 repair (#3885) are absent.

Local combined validation

Python 3.12.3 on the exact combined commit:

  • Reproduced both original source-drift failures at the original ledger head before integration.
  • All five selected registered-package commands pass: PR1 retention, PR636 family witness, historical-snapshot-one-pass, isolated-descendant-bytecode and isolated-test-bytecode. Each receipt runs its original positive/rejection controls and all 36 adapter regression tests. Package-specific completed/partial outcomes retain their declared coverage.
  • All 36 adapter controls also pass under optimized Python with warnings treated as errors.
  • All 55 reconciliation/archive regression tests pass normally and all 55 pass under optimized Python, including the original 1,700-blob archive comparison. An initial sparse-fixture attempt was incomplete; after materializing the missing fixtures, the full suites passed. That incomplete attempt is not counted as a pass.
  • Source/evidence SHA256 snapshots and the clean working tree are unchanged after testing. Exact file/pin comparisons confirm the byte-preserving integration.
python3 -B scripts/research_package.py --changed-since bb4bccbf42844d2801487450727c2f63e10d1d0f --matrix-batch-size 256
python3 -B scripts/research_package.py --package research/pr1-retention-receipt
python3 -B scripts/research_package.py --package research/pr636-family-witness-manifest-receipt
python3 -W error -B -O -m unittest discover -s tests -p test_research_historical_receipts.py -v
python3 -B -m unittest discover -s tests -p 'test_*reconciliation*.py' -v
python3 -B -O -m unittest discover -s tests -p 'test_*reconciliation*.py' -v

Hosted evidence

All four fresh upstream workflows pass at exact combined head 1588e746871c5f1f197dbc034db2bfadbad0b646:

Earlier evidence remains scoped to its own source: the original ledger extraction's three successful fork workflows do not make its failed upstream registered-package run pass. #4103's upstream registered replay passes both real historical receipts at 161ce1b96288349fd67ecda1734d2f96850a2ee9; that is separate-head evidence, not the combined result above. No old run was rerun or relabelled.

Boundaries and credit

This is the explicitly assigned CI repair and additive integration of existing patches. Current canonical guidance was read; the delta-only intake refresh fetched canonical main but could not run its queue read because gh is unavailable. Targeted GitHub reads verified the exact proposal heads. No queue acceptance or scientific review decision is made here.

No upstream merge, force-push, research-branch rewrite, source repinning, selected-result update, or broad mathematical replay is included. The inherited P112 issue remains separately tracked by #3885. Keep working research repairs until an effective upstream base exists.

Existing source authors, original repair attribution, licences and Apache-2.0 notices are retained. Consolidation and CI repair by Clear1nsight with substantial OpenAI assistance. Draft pending independent substantive tooling review.

Preserve exact reviewed bytes from 3088a09 on current canonical main. Keep P112 repair in PR3885 and P104 research separate. No frozen scientific inputs or selected frontier changed.

Prepared by Clear1nsight with substantial OpenAI assistance.
Preserve exact reviewed bytes from 3088a09 on current canonical main. Keep P112 repair in PR3885 and P104 research separate. No frozen scientific inputs or selected frontier changed.

Prepared by Clear1nsight with substantial OpenAI assistance.
Integrate the exact nine-file adapter patch from PR CrocSwap#4103 at
161ce1b to repair the two
registered-package source-drift failures exposed by PR CrocSwap#4102 CI.

Retain original intake/ledger repairs byte-for-byte, authenticate frozen
receipt pins and evidence, and keep the generic live-input checker strict.
Historical-only replay does not validate current ledger/contributor state.

Preserve both published extraction commits without rewriting history.
No P112 workflow, P104 scientific input or selected-frontier changes.
Prepared by Clear1nsight with substantial OpenAI assistance.
@Clear1nsight Clear1nsight changed the title Isolate authenticated ledger reconciliation repairs from P104 research Repair ledger reconciliation and authenticated historical receipt replay Oct 19, 2026
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.

1 participant