3 lines
1.7 KiB
JavaScript
3 lines
1.7 KiB
JavaScript
import fs from 'node:fs';import path from 'node:path';import crypto from 'node:crypto';import assert from 'node:assert/strict';import {spawnSync} from 'node:child_process';
|
|
const tags=process.argv.slice(2);assert(tags.length===2&&tags.every(t=>/^[a-f0-9]{12}$/.test(t)));const run=JSON.parse(fs.readFileSync('C:/laragon/data/sgf-tempo/run/modular-regression-current.json')),hash=p=>crypto.createHash('sha256').update(fs.readFileSync(p)).digest('hex'),sources=['BudgetContext','BudgetControl','BudgetFailure'].map(name=>({name,file:'packages/budget-control/src/'+name+'.php',sha256:hash('packages/budget-control/src/'+name+'.php')})),probes=[];for(const tag of tags){const root=path.join(run.root,'private/receipt-composition-'+tag),s=JSON.parse(fs.readFileSync(path.join(root,'state.json')));assert(s.invoices);for(const source of sources)assert.equal(hash(path.join(s.app,source.file)),source.sha256);probes.push({source_copy_matches:true,runtime_reflection_verified:false});}const out='docs/proofs/invoice-budget-writer-manifest-20261103.json';assert(!fs.existsSync(out));fs.writeFileSync(out,JSON.stringify({passed:true,kind:'source_copy_fingerprint_supplement',sources,probes,runtime_probe_limit:'Standalone runtime reflection probe exceeded its30s limit; private diagnostics retained. No business commands were executed or repeated.',invoice_business_proof:{file:'docs/proofs/supplier-invoice-composition-20261103.json',sha256:hash('docs/proofs/supplier-invoice-composition-20261103.json')},business_commands_repeated:false,financial_commands_executed:0},null,2)+'\n');console.log(JSON.stringify({writer_sources:3,qa_demo_source_copy_hashes_match:true,business_proof_unchanged:true}));
|