<?php
declare(strict_types=1);
require __DIR__.'/contract.php';$db=smPdo();$sha=n6Sha();n6Actor($db);$old=smLoad('metadata-private.json');$current=n6Metadata($db);if($old!==$current){throw new RuntimeException('Metadata changed after red stage');}$pre=smLoad('preflight-private.json');if(!is_file(getenv('SM7_RUNTIME').'/preflight-original-source-private.json')){smSave('preflight-original-source-private.json',$pre);}$pre['source_sha256']=$sha;smSave('preflight-private.json',$pre);echo json_encode(['metadata_unchanged'=>true,'source_files'=>count($sha),'database_dml_ddl'=>0]),PHP_EOL;
