@@ -0,0 +1,22 @@
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
ROOT=Path(__file__).resolve().parents[2]
|
||||
OUT=ROOT/'outputs/investmoz-staff-preparation-20261012'
|
||||
QA=ROOT/'storage/app/private/investmoz-v2/portal-audit/onboarding-qa-internal-20261011_191450'
|
||||
receipt=json.loads((OUT/'delta-contacto-link.json').read_text())
|
||||
manifest=json.loads((Path(receipt['folder'])/'manifesto.json').read_text())
|
||||
declared={row['path'] for row in manifest['files']}
|
||||
differences=[]
|
||||
sha=lambda path:hashlib.sha256(path.read_bytes()).hexdigest()
|
||||
for directory in ['app','config','routes','resources']:
|
||||
paths={str(path.relative_to(ROOT)).replace('\\','/') for path in (ROOT/directory).rglob('*') if path.is_file()}
|
||||
paths|={str(path.relative_to(QA)).replace('\\','/') for path in (QA/directory).rglob('*') if path.is_file()}
|
||||
for relative in sorted(paths):
|
||||
if relative.startswith(('resources/js/actions/','resources/js/routes/','resources/js/wayfinder/')): continue
|
||||
current=ROOT/relative; staged=QA/relative
|
||||
if not current.exists() or not staged.exists() or sha(current)!=sha(staged):
|
||||
differences.append({'path':relative,'declared':relative in declared})
|
||||
proof={'differences':differences,'undeclared':[row['path'] for row in differences if not row['declared']]}
|
||||
(OUT/'source-boundary-check.json').write_text(json.dumps(proof,indent=2),encoding='utf-8')
|
||||
print(json.dumps(proof,indent=2))
|
||||
Reference in New Issue
Block a user