Files
ARCADIA-Studio/harness/experiments/text-diagnostics-20260913/probe/capture_inputs.py
T
sorokin.oleg.edu 9fd76aef3a Add current-draft diagnostic underlines and passive hover
Preserve raw include diagnostic provenance and derive bands from the existing shaped editor. Retain deferred tooltip paragraphs through rendering. Include source, regression, failure and native-trial evidence; corrected native acceptance remains pending.
2026-09-13 01:43:22 -07:00

13 lines
993 B
Python

"""Read-only complete probe input capture; creates only the named fresh receipt."""
from pathlib import Path
import argparse,datetime,hashlib,json
p=argparse.ArgumentParser();p.add_argument('--output',required=True);a=p.parse_args()
b=Path(__file__).resolve().parent;o=Path(a.output).resolve();assert not o.exists()
rows=[]
for f in sorted(b.rglob('*')):
if not f.is_file() or f.resolve()==o or f.relative_to(b).parts[0] in ('records','target'):continue
raw=f.read_bytes();rows.append(dict(path=f.relative_to(b).as_posix(),bytes=len(raw),sha256=hashlib.sha256(raw).hexdigest()))
o.parent.mkdir(parents=True,exist_ok=True)
with o.open('x',encoding='utf-8',newline='\n') as s:json.dump(dict(atUtc=datetime.datetime.now(datetime.timezone.utc).isoformat(),scope='Input bytes only; no Cargo or probe execution',lockfilePresent=(b/'Cargo.lock').is_file(),files=rows),s,indent=2);s.write('\n')
print(json.dumps(dict(path=str(o),files=len(rows),sha256=hashlib.sha256(o.read_bytes()).hexdigest())))