Repository navigation
Replay physical-ordinary-interchange against its pinned selected record (no scientific change) - #5434
Conversation
…rd (no scientific change) The frozen PR2809 loader inside inputs/pr2809.tar authenticates certificates/selected-result.json against the record pinned at this package's base, so every frontier promotion broke the replay (working source drift, flagged in CrocSwap#5417). Vendor those exact bytes (blob b1fea0c, sha256 bb2eaa58...) as inputs/selected-result-pinned.json and let source.py serve them to the loader from a private repository view; every other declared input is copied unchanged and still authenticated. SOURCES.json marks the selected record as provenance and VERIFY.json drops it from the live inputs. Archives, checkers and RESULT.json are unchanged; all eight registered commands reproduce the stored receipt digests. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…wap#5420) Byte-for-byte the docs/ci-verification.md repair of CrocSwap#5420 (head baa8fbb, Clear1nsight); canonical main still names frontier4610-verify, which fails the shared onboarding test before package replay. No scientific file changes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
FINDING — complementary independent repository-view/source-bridge check at exact PR head Native Windows Python 3.12.15 ran the standalone script below successfully (
Scope limit: this executes only the exact view function with source-bound inputs. It does NOT execute the frozen loader or eight registered commands, assess engine timing, certify arbitrary/malicious path manifests, approve the PR, or verify any theorem. In particular the nonselected-corruption control shows forwarding, not downstream rejection; the frozen loader remains responsible for authentication. Hosted selected-package success and the five dependent-package failures remain separate evidence. Credit: jmbarrancoml's #2899 package, Nick Petalas #2808, PR2809/PR2753 and retained authors; jwr404's drift finding; Mark/Matarener's repair and Claude attribution. This independent check used substantial OpenAI Codex assistance; Apache-2.0. No repository files changed. Reproduce from a clone with both pinned commits available: save the following as """Independent bounded PR5434 repository-view check; no full loader/engine replay.
Run: python -X utf8 -B view-audit-20261024.py PATH_TO_REPOSITORY
Prepared with substantial OpenAI Codex assistance; Apache-2.0.
"""
import ast
from hashlib import sha256
import json
from pathlib import Path
import subprocess
import sys
import tempfile
BASE='1a3ced60b2f7a46bc70280a04f2eeb8ca027c700'
HEAD='1a61b69b87e8e1269446f0a874c08503bde9339a'
PACKAGE='research/physical-ordinary-interchange/'
REPO=Path(sys.argv[1])
def blob(head,path):
return subprocess.check_output(['git','-C',str(REPO),'show',head+':'+path])
def require(ok,message):
if not ok:raise ValueError(message)
old=json.loads(blob(BASE,PACKAGE+'VERIFY.json'));new=json.loads(blob(HEAD,PACKAGE+'VERIFY.json'))
require(new==dict(old,inputs=[p for p in old['inputs'] if p!='certificates/selected-result.json']), 'unexpected manifest change')
os=json.loads(blob(BASE,PACKAGE+'SOURCES.json'));ns=json.loads(blob(HEAD,PACKAGE+'SOURCES.json'))
expected=json.loads(json.dumps(os));row=next(x for x in expected['files'] if x['path']=='certificates/selected-result.json');row['usage']='provenance'
require(ns==expected,'unexpected provenance change')
pinned=blob(HEAD,PACKAGE+'inputs/selected-result-pinned.json')
require(sha256(pinned).hexdigest()==row['sha256'],'pinned SHA mismatch')
require(blob(ns['base_commit'],row['path'])==pinned,'base bytes mismatch')
require(subprocess.check_output(['git','-C',str(REPO),'rev-parse',ns['base_commit']+':'+row['path']],text=True).strip()==row['git_blob'],'base blob mismatch')
require(blob(BASE,row['path'])!=pinned,'drift control is vacuous')
changed=subprocess.check_output(['git','-C',str(REPO),'diff','--name-only',BASE,HEAD,'--',PACKAGE],text=True).splitlines()
require(set(changed)=={PACKAGE+p for p in ['SOURCES.json','VERIFY.json','source.py','inputs/selected-result-pinned.json']},'other package bytes changed')
code=blob(HEAD,PACKAGE+'source.py').decode('utf-8');tree=ast.parse(code)
functions=[n for n in tree.body if isinstance(n,ast.FunctionDef) and n.name=='repository_view'];require(len(functions)==1,'missing view')
with tempfile.TemporaryDirectory() as temporary:
root=Path(temporary);here=root/'package';repo=root/'repo';here.mkdir();repo.mkdir()
(here/'inputs').mkdir();(here/'inputs/selected-result-pinned.json').write_bytes(pinned)
(here/'VERIFY.json').write_bytes(blob(HEAD,PACKAGE+'VERIFY.json'))
for name in new['inputs']:
require(not Path(name).is_absolute() and '..' not in Path(name).parts,'unsafe input path')
target=repo/name;target.parent.mkdir(parents=True,exist_ok=True);target.write_bytes(blob(HEAD,name))
live=repo/'certificates/selected-result.json';live.parent.mkdir(parents=True,exist_ok=True);live.write_bytes(blob(BASE,row['path']))
namespace=dict(HERE=here,ROOT=repo,PINNED_SELECTED=('inputs/selected-result-pinned.json',row['sha256']),sha256=sha256,json=json)
exec(compile(ast.Module(body=functions,type_ignores=[]),'exact-PR5434-repository_view','exec'),namespace)
view=namespace['repository_view'](root/'positive')
require((view/row['path']).read_bytes()==pinned,'wrong selected view')
require(all((view/n).read_bytes()==(repo/n).read_bytes() for n in new['inputs']),'input masking')
require({p.relative_to(view).as_posix() for p in view.rglob('*') if p.is_file()}==set(new['inputs'])|{row['path']},'view inventory mismatch')
original_live=live.read_bytes();live.write_bytes(b'changed live selection')
require((namespace['repository_view'](root/'changed-live')/row['path']).read_bytes()==pinned,'live selection leaked')
live.write_bytes(original_live)
test=repo/new['inputs'][0];original=test.read_bytes();test.write_bytes(original+b'\nCORRUPTED\n')
require((namespace['repository_view'](root/'corrupted-input')/new['inputs'][0]).read_bytes()==test.read_bytes(),'live drift was silently masked')
test.write_bytes(original)
(here/'inputs/selected-result-pinned.json').write_bytes(pinned+b'!')
try:namespace['repository_view'](root/'bad-pin')
except ValueError as error:require(str(error)=='pinned selected record changed','wrong pin rejection')
else:raise ValueError('corrupt pinned record accepted')
require(not (root/'bad-pin').exists(),'pin failure wrote output')
(here/'inputs/selected-result-pinned.json').write_bytes(pinned);test.unlink()
try:namespace['repository_view'](root/'missing-input')
except FileNotFoundError:pass
else:raise ValueError('missing live input accepted')
print(json.dumps(dict(status='PASS_PR5434_VIEW_AUDIT',head=HEAD,declared_live_inputs=len(new['inputs']),controls=['changed-live-selection','unmasked-nonselected-corruption','pinned-corruption-before-write','missing-input'],scope='Exact repository_view function and Git source bridge only; no frozen loader, eight-command replay, engine, theorem, or PR approval'),sort_keys=True)) |
…hat contains them The runner resolves each SOURCES.json row at base_commit unless it carries an explicit pin. Rows refreshed after CrocSwap#5434 now carry head:32890bc5de034ab8fc93ac88ead7279a6a416d04:<path>, so their blobs resolve exactly. scripts/research_package.py --check-only passes for all five packages. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Requested by Mark
Change and mathematical scope
Replay repair only. No scientific change and no new κ. Before this change,
research/physical-ordinary-interchange(jmbarrancoml, #2899) failed its registered replay on main withworking source drift: certificates/selected-result.json. jwr404 flagged this in #5417. The frozen PR2809 loader insideinputs/pr2809.taraccepts only the two exact selected records that existed when the package was written, so every frontier promotion broke the replay.After this change the replay passes again with identical receipts. The package now carries the exact record pinned at its base:
b1fea0c9…, sha256bb2eaa58…) is vendored asinputs/selected-result-pinned.json.source.pyserves it to the loader from a private temporary repository view. Every other declared input is copied unchanged from the working tree, and the loader and the PR2753 verifier still authenticate all of them.SOURCES.jsonnow marks the record asprovenance, andVERIFY.jsondrops it from the live inputs.The archives, all checkers and
RESULT.jsonare unchanged.Task and overlap
This is maintenance following #5410/#5417 (jwr404). #5417 fixes jwr404's own packages and names this one as blocked; it also blocks three of jwr404's packages that run this loader. Base is
1a3ced60b2f7a46bc70280a04f2eeb8ca027c700. No other open PR touches this package.Validation
python3 -B scripts/research_package.py --package research/physical-ordinary-interchangewas run locally. All eight registered commands pass and reproduce the storedRESULT.jsondigests:setup,rootandcontrols, each in normal and-Omode;binary;engine.The run used Windows 10 and Python 3.12. For that local run only, I used a small wrapper that makes relative
Pathstrings use/. The frozen PR2753 verifier comparesstr(path.relative_to(...))with POSIX names, so it fails on Windows independently of this change. The wrapper is not part of the PR.On this slow laptop CPU the engine suite takes 650–700 s, which is above its 600 s allowance. VALIDATION.md records 165.53 s on the author's machine, so hosted CI is the decisive timing check. Hosted run 40094446546 passed plan and this package's registered replay (engine 241.2 s). Five dependent packages that this change re-triggers fail with their own pre-existing
working source drift: certificates/selected-result.json; they fail identically on main and are not touched here: encoded-body-depth-borrowing, high-cube-b1-fit-bridge, ordinary-one-factor-stock, sealed-strict-root, unconditional-batched-crt.check_research_commit.pypasses. The second commit reuses, byte for byte, thedocs/ci-verification.mdnavigation repair from #5420, because main still fails that shared onboarding test.Credit
The package is by jmbarrancoml (#2899) and its PR2809/PR2753 predecessors. jwr404 identified the drift in #5417. Mark (Matarener) with substantial Claude Code (Claude) assistance. Apache-2.0.
Open next questions
None justified. Any future selected-record change no longer affects this replay.
🤖 Generated with Claude Code