shibosoftwaredev/f1c100s-linux-nema17-stepper-controller
A four-layer NEMA 17 motor-controller PCB combining an Allwinner F1C100S Linux computer, USB‑PD/buck power system, W5500 Ethernet, STM32 real-time motion control, DRV8825 stepper driver, protection/temperature/current telemetry, USB interfaces, and local LED/buzzer diagnostics.
- Version
- 0.4.56
- License
- unset
- Stars
- 0
scripts/write-round5-status.mjs
import fs from "node:fs"
import crypto from "node:crypto"
import assert from "node:assert/strict"
const read=p=>JSON.parse(fs.readFileSync(p,"utf8"))
const sha=p=>crypto.createHash("sha256").update(fs.readFileSync(p)).digest("hex")
const hash=sha("dist/index/circuit.json"),regression=read("reports/round5-regression.json")
const continuity=read("reports/connectivity-audit.json"),copper=read("reports/coil-all-copper-preflight-meta.json")
const drill=read("reports/drill-clearance-regression.json"),solder=read("reports/solder-process-audit.json")
const stock=read("reports/jlcpcb-stock-audit.json"),catalog=read("reports/bom-validation.json")
const legend=read("reports/round5-legend-audit.json"),module=read("reports/module-test-regression.json")
for(const report of [regression,continuity,copper,drill,solder,stock,catalog])assert.equal(report.circuitSha256,hash)
assert.equal(continuity.sourceFailures,0);assert.equal(continuity.disconnectedTerminalIslands,0)
assert.equal(copper.failureCount,0);assert.equal(drill.currentFindings,0);assert.equal(drill.regressionCount,0)
assert.deepEqual(catalog.findings,[]);assert.deepEqual(legend.findings,[])
assert.ok(stock.parts.every(p=>p.status==="in-stock"));assert.equal(module.addedFailures,0)
const evidence=["round5-final-build.log","round5-final-native-check.log","round5-final-shorts.log","round5-final-style.log",
"round5-final-continuity.log","round5-final-copper.log","round5-final-drill.log","round5-final-kelvin.log",
"round5-final-regression.log","round5-final-catalog-values.log","round5-final-bom-tests.log","round5-final-typecheck.log",
"round5-final-firmware-tests.log","round5-final-linux-tests.log","round5-final-module-tests.log",
"round5-final-module-regression.log","round5-final-export-gate.log","round5-final-copper-gate.log",
"round5-pcb-top.png","round5-pcb-bottom.png"].map(f=>`reports/${f}`)
const status={status:"VALIDATED_LOCAL_INCREMENTAL_FIXES_NOT_FABRICATION_READY",checkedAt:new Date().toISOString(),
circuitSha256:hash,replaySha256:sha("routing/complete-routes.json"),pushed:false,fabricationReady:false,
preWorkCheckpoint:"../../checkpoints/nema17-pre-round5-20261019-ywUpyW/board-checkpoint.tar.gz",
fixed:{ordinarySolderPadViaIntersections:{before:19,after:15,added:0,removedFrom:["C_BUZZER.2","R_ISEN_B.2","C_PD_VDD.2","R_BUCK_BOTTOM.2"]},
fiveVoltCopper:{widenedSegments:51,centreLinesUnchanged:true,narrowNecksRemain:true,newCurrentRatingClaimed:false},
legend:{smallTextBefore:178,smallTextAfter:0,offBoardTextAnchorsBefore:5,offBoardTextAnchorsAfter:0,
labels:9,fontHeightMm:1.7,nominalStrokeMm:.153,originalMountAndPolarityMarksPreserved:true,
notes:"Readable functional marks and actual motor pin numbers. Component references retained in source/BOM/CPL, not printed tiny."},
exportSafety:"Fresh hash-bound solder-process audit blocks handoff; blocked-export preservation test passes."},
checks:{nativeErrors:0,nativeWarnings:150,shortsAllLayers:"pass",emittedOnlyContinuity:"pass",independentCopperPreflight:"0 findings at its stated scope",
independentDrillFindings:0,additionalPadPthDfm:"0 findings",kelvin:"4/4 pass",mechanical:"0 pad/edge/NPTH/screw-land violations",
catalog:"193 populated / 81 codes pass",stock:{checkedAt:stock.checkedAt,boards:stock.boardQuantity,reserved:false},
typecheck:"pass",bomTests:"6 pass / 11 assertions",firmwareHostSanitizers:"pass",linuxClient:"6 pass",
moduleTests:{pass:module.currentPassed,fail:module.currentFailed,added:0},
regression:"All parts, connections, placements, PCB/CAD dimensions, mounting features, schematic records and firmware unchanged; routing-input guard retained.",
throughVias:335,viaHoleMm:.3,viaPadMm:.45,blindOrBuried:0,schematicPlacement:"pass; no fresh cloud AI style analysis claimed"},
rejected:["Oscillator-via move exceeded the existing 15 mm ETH_XI budget: restored original, limit unchanged.",
"Bounded individual driver/enable via moves found no legal local stub path: not installed."],
remaining:["15 ordinary solder-land/drill intersections, plus the 16 deliberately thermal-pad intersection records: no filled/capped or thermal/double-sided stencil process assumed.",
"USB data-receptacle VBUS-controlled attach/isolation is not implemented; a stocked TS3USB31ERSER option was researched, not installed. A GPIO-only addition would not qualify ROM FEL behaviour.",
"Ethernet paired/impedance/stackup, actual magnetics copper exclusion and shield/ESD design remain.",
"Remaining 5 V necks need actual load/drop/thermal budget; long analog output/feedback paths need further placement/routing and PWM noise characterization.",
"26 inherited module/profile test failures and 150 native warnings remain, including stale width diagnostics.",
"Physical rear motor fasteners/spacers, compatible terminated harness and first-article power/Linux/USB/thermal/current qualification remain."],
visualReview:{pcbFaces:["reports/round5-pcb-top.png","reports/round5-pcb-bottom.png"],schematic:"All records equal the previous visually inspected 11-sheet schematic.",cad:"All emitted CAD records equal pre-work checkpoint."},
evidence:Object.fromEntries(evidence.map(p=>[p,sha(p)]))}
fs.writeFileSync("reports/round5-fix-status.json",JSON.stringify(status,null,2)+"\n")
console.log(JSON.stringify({status:status.status,circuitSha256:hash,ordinaryIntersections:15,widened5vSegments:51,smallText:0,errors:0,warnings:150,pushed:false}))