abse/smartwatch-flex-top-only
Three-panel flex smartwatch with two parallel R3.9 bends, all components flat-top, low-profile JST connector harnesses, split heartbeat optical windows and screw-retained PCB mounting. Modeled 39 × 50.5 × 14.5mm prototype; 100% routing, zero native DRC and shorts. Hardware qualification pending.
- Version
- 0.2.21
- License
- unset
- Stars
- 0
scripts/expand-validation-snapshots.mjs
import fs from 'node:fs'
import path from 'node:path'
import crypto from 'node:crypto'
import {gunzipSync} from 'node:zlib'
import {fileURLToPath} from 'node:url'
export function expandValidationSnapshots(){
const root=fileURLToPath(new URL('../',import.meta.url))
const {snapshots}=JSON.parse(fs.readFileSync(path.join(root,'validation-snapshots.json'),'utf8'))
for(const record of snapshots){
const bytes=gunzipSync(fs.readFileSync(path.join(root,record.compressedPath)))
const sha=crypto.createHash('sha256').update(bytes).digest('hex')
if(sha!==record.sha256)throw Error('Corrupted validation snapshot: '+record.path)
const dest=path.join(root,record.path)
if(fs.existsSync(dest)){
if(crypto.createHash('sha256').update(fs.readFileSync(dest)).digest('hex')!==sha)throw Error('Changed validation baseline: '+record.path)
}else fs.writeFileSync(dest,bytes)
}
console.log(`Verified/restored ${snapshots.length} exact validation snapshots`)
}
if(process.argv[1]&&path.resolve(process.argv[1])===fileURLToPath(import.meta.url))expandValidationSnapshots()