Files
Investidor-V2/tools/portal-consolidated-refresh-draft.py
nala 287e991486
tests / ci (push) Waiting to run
oportunidades 7
2026-10-13 11:40:29 +02:00

13 lines
949 B
Python

"""Retain the draft metadata before correcting copied historical statements."""
from pathlib import Path
import json,hashlib,shutil
R=Path(__file__).resolve().parent.parent
O=R/'outputs/investmoz-workflow-consolidated-20261011'
manifest=json.loads((O/'manifesto.json').read_text())
assert manifest['revision'].startswith('50a2188ffe13') and manifest['activation_authorized'] is False
preserved=O.with_name(O.name+'-draft-50a2188ffe13')
assert not preserved.exists() and O.parent.resolve()==(R/'outputs').resolve()
O.rename(preserved)
(preserved/'ESTADO-RASCUNHO.md').write_text('Rascunho preservado, não candidato final. A proposta JSON ainda copiava o estado histórico do bootstrap/ensaios; esses textos foram reconciliados sem alteração de código ou bundle. Não autorizado para disponibilização.\n',encoding='utf-8')
print(json.dumps({'result':'draft_preserved_for_traceability','code_changed':False,'production_rebuild_required':False}))