0hmX/am3352-ddr-track-a-local-dfm-wip-20261007
Experimental RJ45-corrected board with isolated PG indication. 1005/1005 source joins pass; 15 expanded-guard physical errors, sourcing and qualification gates remain. Not fabrication-ready.
- Version
- 0.0.4
- License
- unset
- Stars
- 0
scripts/preserve-frozen-dist.mjs
import { readFileSync, writeFileSync } from 'node:fs';
import { createHash } from 'node:crypto';
import { isDeepStrictEqual } from 'node:util';
const frozen = readFileSync('routed/circuit.json');
const expected = '4ed4c784f20a492ac5736e026cdc62ce9ed35da8656c6f70c9132ef3be7e9700';
if (createHash('sha256').update(frozen).digest('hex') !== expected) {
throw new Error('Frozen board hash mismatch');
}
const built = JSON.parse(readFileSync('dist/routed/circuit.json', 'utf8'));
if (!isDeepStrictEqual(built, JSON.parse(frozen.toString('utf8')))) {
throw new Error('Built board records differ from the frozen board');
}
writeFileSync('dist/routed/circuit.json', frozen);
console.log(`Preserved all ${built.length} frozen records and exact ${expected} bytes in dist/routed/circuit.json`);