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.20
- License
- unset
- Stars
- 0
scripts/collect-oled-clock-style.py
"""Collect native builds and independent copper/shorts evidence for this edit."""
from pathlib import Path
from datetime import datetime, timezone
import hashlib, json
root = Path(__file__).resolve().parent.parent
out = root/'reports/oled-clock-style'
read = lambda p: json.loads((root/p).read_text())
sha = lambda p: hashlib.sha256((root/p).read_bytes()).hexdigest()
source = 'dist/index/circuit.json'
native = read(source)
assert not any('warning' in e['type'] or 'error' in e['type'] for e in native)
invariants = read('reports/oled-clock-style/invariants.json')
assert invariants['status'] == 'PASS' and invariants['sourceSha256'] == sha(source)
entries = [dict(entry='index.tsx', exitCode=0, source=source,
log='reports/oled-clock-style/native/index.log')]
entries += read('reports/oled-clock-style/native/entries.json')
assert len(entries) == 6
for record in entries:
data = read(record['source'])
assert record['exitCode'] == 0
assert not any('warning' in e['type'] or 'error' in e['type'] for e in data)
record.update(sourceSha256=sha(record['source']), logSha256=sha(record['log']),
nativeErrors=0, nativeWarnings=0)
receipts = []
paths = ['reports/copper-audit.json', 'reports/clearance-audit.json',
'reports/board-edge-audit.json', 'reports/native-drill-audit.json',
'reports/electrical-fixes/thermal-vias.json', 'reports/flex-geometry.json',
'reports/printed-coil-audit.json', 'reports/pour-board-edge-audit.json']
for path in paths:
record = read(path)
if 'status' in record:
assert record['status'] == 'PASS', path
for k, v in record.items():
if k.endswith('Failures') or k == 'failures':
assert not v, (path, k)
if 'sourceSha256' in record:
assert record['sourceSha256'] == sha(source), path
if 'cacheSha256' in record:
assert record['cacheSha256'] == sha('routing/final/cache.json'), path
receipts.append(dict(path=path, sha256=sha(path)))
copper = read('reports/copper-audit.json')
assert len(copper['netResults']) == 94
assert sum(e['requiredPadCount'] for e in copper['netResults']) == 500
assert not copper['orphanTraceIds'] and not copper['floatingGroundPourIds']
shorts = read('reports/oled-clock-style/shorts/manifest.json')['runs']
assert len(shorts) == 16
assert {(r['scope'],r['mode'],r['layer']) for r in shorts} == {
(scope,mode,layer) for scope in ['full','external'] for mode in ['pcb','gerber']
for layer in ['top','inner1','inner2','bottom']}
for r in shorts:
assert r['exitCode'] == 0 and r['reportedShorts'] == 0
assert r['sourceSha256'] == sha(r['sourceFile'])
assert r['logSha256'] == sha(r['log'])
if r['scope'] == 'full':
assert r['sourceSha256'] == sha(source)
style = read('reports/electrical-fixes/pcb-style.json')
assert style['nativeCircuitSha256'] == sha(source)
assert 'PcbTraceSegmentOddAngle' not in style['styleCategories']
assert style['styleFindings'] == 65
assert (out/'typecheck.log').read_text() == ''
report = dict(status='PASS_NATIVE_ZERO_WARNINGS_ZERO_ERRORS',
checkedAt=datetime.now(timezone.utc).isoformat(), localOnly=True,
published=False, baseline='Published v0.2.17',
routingPercent=100, functionalNets=94, functionalPads=500,
nativeDrcErrors=0, nativeWarnings=0, nativeBuildErrors=0,
shorts=0, freshShortsChecks=4, unchangedLayerShortsChecks=12, nativeEntries=entries,
typecheckExitCode=0, changedTraceIds=invariants['changedTraceIds'],
minViaHoleDiameter='0.3mm', minViaPadDiameter='0.45mm', nativeVias=623,
electricalReceipts=receipts, invariants=invariants,
shortsManifest=dict(path='reports/oled-clock-style/shorts/manifest.json',sha256=sha('reports/oled-clock-style/shorts/manifest.json')),
nativeCircuitSha256=sha(source), routeCacheSha256=sha('routing/final/cache.json'),
separateCliStyle=dict(findings=65,categories=style['styleCategories'],
exitCode=style['exitCode'],passed=False,
scope='Separate staircase-style advisories remain; native viewer warnings are zero.'),
prototypeOrderStatus='Existing supplier, mechanical and bench qualification holds remain unchanged.')
(out/'result.json').write_text(json.dumps(report,indent=2)+'\n')
print(json.dumps({k:report[k] for k in ['status','routingPercent','nativeWarnings','nativeDrcErrors','shorts','freshShortsChecks','nativeVias','separateCliStyle']},indent=2))