Files
ARCADIA-Studio/harness/experiments/text-workspace-initial-20260913/helpers/archive_initial.py
T
sorokin.oleg.edu 2df7f580aa Make the Text workspace compact and preserve editing context
Replace the oversized header and reference rail with stable editor slots and a retained supporting drawer. Bind diagnostic, result and menu actions to their original publication and visit; preserve effective selections on navigation and dismiss Actions, Find and the drawer one surface per Escape.

Retain exact Windows source captures, eight final gates (871 desktop passes), independent reviews, native selection/rename/recovery trials and the original failures. All 526 tested inputs and staged evidence were byte-checked before commit. Combined preview integration and packaging remain with issue 27; Linux remains paused.
2026-09-12 22:00:36 -07:00

40 lines
1.9 KiB
Python

"""Preserve original trial evidence and exact gate capture without runtime binaries."""
from pathlib import Path
import hashlib
import json
import shutil
base = Path(__file__).resolve().parent
root = Path('C:/ar-text-9e8r6t')
dest = root / 'harness/experiments/text-workspace-initial-20260913'
dest.mkdir()
records = []
def keep(source, relative):
target = dest / relative
target.parent.mkdir(parents=True, exist_ok=True)
assert not target.exists()
shutil.copyfile(source, target)
raw = source.read_bytes()
assert target.read_bytes() == raw
records.append({'path': relative, 'bytes': len(raw), 'sha256': hashlib.sha256(raw).hexdigest()})
trial = base / 'trial-text-1'
for source in sorted(trial.rglob('*')):
rel = source.relative_to(trial)
if source.is_file() and (len(rel.parts) == 1 or rel.parts[0] == 'screenshots' or rel.parts[0].startswith('verification-')):
keep(source, 'trial-text-1/' + rel.as_posix())
gate = root / '.local/text-workspace-gates-20260912'
for attempt in ['attempt-3', 'attempt-4']:
for source in sorted((gate / attempt).iterdir()):
if source.is_file() and source.suffix in ['.json', '.log', '.zip']:
keep(source, attempt + '/' + source.name)
for name in ['fixture-manifest.json', 'launch.py', 'verify_saved.py', 'bind_gates.py']:
keep(base / name, 'helpers/' + name)
keep(gate / 'gate.py', 'helpers/gate.py')
keep(Path(__file__), 'helpers/archive_initial.py')
with (dest / 'manifest.json').open('x', encoding='utf-8', newline='\n') as stream:
json.dump({'scope': 'Original failed native trial and passing attempt4 gates; runtime binaries remain locally preserved by SHA, no native acceptance.', 'files': records}, stream, indent=2)
stream.write('\n')
print(json.dumps({'directory': str(dest), 'files': len(records), 'bytes': sum(r['bytes'] for r in records), 'manifestSha256': hashlib.sha256((dest / 'manifest.json').read_bytes()).hexdigest()}))