,\"gm\"))].map(m=\u003em[1]).sort()\n const result={passed:collect(\"pass\"),failed:collect(\"fail\")}\n assert.equal(result.passed.length+result.failed.length,32)\n return result\n}\nconst baselinePath=\"reports/baseline-module-tests.log\",currentPath=process.argv[2]??\"reports/round3-module-tests.log\"\nconst baseline=cases(baselinePath),current=cases(currentPath)\nassert.deepEqual([...current.passed,...current.failed].sort(),[...baseline.passed,...baseline.failed].sort(),\"same 32 named tests, none removed or skipped\")\nconst addedFailures=current.failed.filter(n=\u003e!baseline.failed.includes(n))\nassert.deepEqual(addedFailures,[],\"no formerly passing test may regress\")\nconst testBase=\"../../checkpoints/nema17-round7-validated-usb-20261020-ed31KT/restore-verified/\"\nconst testFiles=fs.readdirSync(\"modules/f1c100s/tests\").map(n=\u003e`modules/f1c100s/tests/${n}`)\nfor(const p of testFiles)assert.equal(hash(p),hash(testBase+p),`unchanged test implementation ${p}`)\nconst report={status:current.failed.length===0?\"PASS_ALL_32_UNCHANGED_TESTS\":\"PARTIAL_FIX_NO_ADDED_FAILURES\",checkedAt:new Date().toISOString(),\n unchangedPublishedRuntimeFiles:files.length-changed.length,changedPublishedRuntimeFiles:changed,\n baselinePassed:baseline.passed.length,baselineFailed:baseline.failed.length,\n currentPassed:current.passed.length,currentFailed:current.failed.length,addedFailures:0,resolvedFailures:baseline.failed.filter(n=\u003ecurrent.passed.includes(n)),failedTests:current.failed,\n evidence:Object.fromEntries([manifestPath,baselinePath,currentPath,...changed,...testFiles].map(p=\u003e[p,hash(p)])),\n method:\"The same 32 named tests and test-file hashes are retained. Carrier-only mutations are isolated from stored profiles, original stored copper/drills are preserved, and the preview owns its physical module outside schematic sheets. Board geometry/netlist equivalence is checked separately.\",\n caveat:\"Passing simulation/test checks is not hardware qualification.\"}\nfs.writeFileSync(\"reports/module-test-regression.json\",JSON.stringify(report,null,2)+\"\\n\")\nconsole.log(JSON.stringify(report))\n","content_mimetype":"text/javascript","created_at":"2026-10-24T10:39:32.099Z"}; window.SSR_PACKAGE_BUILDS = []; window.SSR_RELATED_PACKAGES = [{"package_id":"6711d713-269d-4ef5-9b16-c3092c520ac2","creator_account_id":"63586009-ac32-446c-b5aa-a60ea81a44bf","latest_package_release_id":"a44a026d-333f-490a-89c7-b4ae57b8387a","last_built_release_id":"a44a026d-333f-490a-89c7-b4ae57b8387a","latest_package_release_fs_sha":"md5-49ede528b8884e7b19962fb2649ccaf5","latest_pcb_preview_image_url":"https://registry-api.tscircuit.com/package_files/view?package_release_id=a44a026d-333f-490a-89c7-b4ae57b8387a\u0026file_path=dist%2Findex%2Fpcb.svg","latest_sch_preview_image_url":"https://registry-api.tscircuit.com/package_files/view?package_release_id=a44a026d-333f-490a-89c7-b4ae57b8387a\u0026file_path=dist%2Findex%2Fschematic.svg","latest_cad_preview_image_url":"https://registry-api.tscircuit.com/package_files/download?package_release_id=a44a026d-333f-490a-89c7-b4ae57b8387a\u0026file_path=dist%2Findex%2F3d.png","latest_version":"1.0.13","license":"unset","owner_org_id":"e4b51b30-273d-4e29-92ed-981078150dff","org_owner_tscircuit_handle":"ShiboSoftwareDev","owner_github_username":"ShiboSoftwareDev","github_repo_full_name":null,"is_source_from_github":false,"description":null,"name":"ShiboSoftwareDev/clip-on-battery-meter-2","unscoped_name":"clip-on-battery-meter-2","star_count":0,"created_at":"2026-04-07T12:04:56.985Z","updated_at":"2026-04-26T12:12:34.734Z","ai_description":"The code defines virtual representations of various electronic components—such as a BAT54WS Schottky diode and LM339 and LM393 voltage comparators—with physical pin configurations, footprints, and 3D models for PCB design.","ai_usage_instructions":null,"is_private":false,"is_unlisted":false,"is_public":true,"public_dist_enabled":false,"has_public_dist":true,"starred_at":null,"default_view":"files","website":null,"github_installation_id":null,"allow_pr_previews":false,"related_type":"same_author","thumbnail_url":"https://registry-api.tscircuit.com/package_files/view?package_release_id=a44a026d-333f-490a-89c7-b4ae57b8387a\u0026file_path=dist%2Findex%2Fpcb.svg"},{"package_id":"f0155dc4-d5c4-4924-b98c-5be0ca6b6bb6","creator_account_id":"97843ce3-26e5-402d-91aa-1f68763ad2dc","latest_package_release_id":"66c53bd4-317b-4137-8137-8b2a26c6547f","last_built_release_id":"66c53bd4-317b-4137-8137-8b2a26c6547f","latest_package_release_fs_sha":"md5-91af0ff278d6de309badac525a13c70f","latest_pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=66c53bd4-317b-4137-8137-8b2a26c6547f\u0026file_path=dist%2Findex%2Fpcb.svg","latest_sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=66c53bd4-317b-4137-8137-8b2a26c6547f\u0026file_path=dist%2Findex%2Fschematic.svg","latest_cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=66c53bd4-317b-4137-8137-8b2a26c6547f\u0026file_path=dist%2Findex%2F3d.png","latest_version":"0.1.5","license":"MIT","owner_org_id":"e6032e13-003f-41f1-b84f-6adfc66f838b","org_owner_tscircuit_handle":"gokul","owner_github_username":null,"github_repo_full_name":null,"is_source_from_github":false,"description":"Engineering draft: four-layer, computer-powered USB 3 hub with one USB-C host socket, two USB-C and two USB-A accessory sockets, and a full-size SD slot. Board and three schematic previews are available. Routing and production checks are incomplete; not fabrication ready.","name":"gokul/usb3-sd-hub","unscoped_name":"usb3-sd-hub","star_count":0,"created_at":"2026-10-11T02:10:47.315Z","updated_at":"2026-10-16T08:50:19.606Z","ai_description":"Four-layer, computer-powered USB 3 hub PCB built around USB5816C/USB2642 controllers, providing one USB-C host, two USB-C and two USB-A peripheral ports, full-size SD storage, regulated 1.2/3.3 V power, per-port current limiting, ESD protection, and high-speed differential routing.","ai_usage_instructions":null,"is_private":false,"is_unlisted":false,"is_public":true,"public_dist_enabled":false,"has_public_dist":true,"starred_at":null,"default_view":"files","website":null,"github_installation_id":null,"allow_pr_previews":false,"related_type":"similar_ai_description","thumbnail_url":"https://api.tscircuit.com/package_files/view?package_release_id=66c53bd4-317b-4137-8137-8b2a26c6547f\u0026file_path=dist%2Findex%2Fpcb.svg"},{"package_id":"4526141e-6f81-4c10-9cec-4d2551d159a1","creator_account_id":"9f398687-69d0-4ef4-a48c-bb6dc990e7df","latest_package_release_id":"57387f49-bd91-4277-8a82-706b1575c5ed","last_built_release_id":"9256f5d4-aa2c-4b42-9939-aec937743978","latest_package_release_fs_sha":"md5-39bf50c27b23653dc748b2f8c6a5c1eb","latest_pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=57387f49-bd91-4277-8a82-706b1575c5ed\u0026file_path=dist%2Fboard%2Fpcb.svg","latest_sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=57387f49-bd91-4277-8a82-706b1575c5ed\u0026file_path=dist%2Fboard%2Fschematic.svg","latest_cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=57387f49-bd91-4277-8a82-706b1575c5ed\u0026file_path=dist%2Fboard%2F3d.png","latest_version":"1.1.6","license":"unset","owner_org_id":"7ca3101d-0ece-4182-a775-d3aee7d7f0a0","org_owner_tscircuit_handle":"astra","owner_github_username":null,"github_repo_full_name":null,"is_source_from_github":false,"description":"USB-PD Power Supply with RP2040 controller","name":"astra/pd-power-supply","unscoped_name":"pd-power-supply","star_count":1,"created_at":"2026-09-28T19:51:44.553Z","updated_at":"2026-10-07T19:01:48.739Z","ai_description":"A USB-PD power supply featuring an RP2040 microcontroller and 3D CAD models for its hardware components.","ai_usage_instructions":null,"is_private":false,"is_unlisted":false,"is_public":true,"public_dist_enabled":false,"has_public_dist":true,"starred_at":null,"default_view":"files","website":null,"github_installation_id":null,"allow_pr_previews":false,"related_type":"random","thumbnail_url":"https://api.tscircuit.com/package_files/view?package_release_id=57387f49-bd91-4277-8a82-706b1575c5ed\u0026file_path=dist%2Fboard%2Fpcb.svg"}]; window.SSR_PACKAGE_ROUTE = {"author":"shibosoftwaredev","packageName":"f1c100s-linux-nema17-stepper-controller","packageNameWithScope":"shibosoftwaredev/f1c100s-linux-nema17-stepper-controller","version":null,"isLegacyRoute":false,"kind":"file","filePath":"scripts/compare-round3-module-tests.mjs"};

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/compare-round3-module-tests.mjs

import fs from "node:fs"
import assert from "node:assert/strict"
import crypto from "node:crypto"

const hash=p=>crypto.createHash("sha256").update(fs.readFileSync(p)).digest("hex")
const manifestPath="../f1c100s-linux-nema17-coil-current-wip-2026-10-17/reports/publish-manifest.json"
const files=JSON.parse(fs.readFileSync(manifestPath,"utf8")).files.filter(x=>x.file.startsWith("modules/"))
const changed=files.filter(x=>hash(x.file)!==x.sha256).map(x=>x.file).sort()
assert.deepEqual(changed,["modules/f1c100s/src/ProfilePreview.tsx","modules/f1c100s/src/index.tsx","modules/f1c100s/src/saved-paths.tsx","modules/f1c100s/src/schematic.tsx","modules/f1c100s/src/selective-breakouts.ts"].sort(),"only the explicitly reviewed module files changed")
function cases(path){
  const text=fs.readFileSync(path,"utf8")
  assert.match(text,/Ran 32 tests across 2 files\./)
  const collect=kind=>[...text.matchAll(new RegExp(`^\\(${kind}\\) (.+) \\[[^\\]]+\\]$`,"gm"))].map(m=>m[1]).sort()
  const result={passed:collect("pass"),failed:collect("fail")}
  assert.equal(result.passed.length+result.failed.length,32)
  return result
}
const baselinePath="reports/baseline-module-tests.log",currentPath=process.argv[2]??"reports/round3-module-tests.log"
const baseline=cases(baselinePath),current=cases(currentPath)
assert.deepEqual([...current.passed,...current.failed].sort(),[...baseline.passed,...baseline.failed].sort(),"same 32 named tests, none removed or skipped")
const addedFailures=current.failed.filter(n=>!baseline.failed.includes(n))
assert.deepEqual(addedFailures,[],"no formerly passing test may regress")
const testBase="../../checkpoints/nema17-round7-validated-usb-20261020-ed31KT/restore-verified/"
const testFiles=fs.readdirSync("modules/f1c100s/tests").map(n=>`modules/f1c100s/tests/${n}`)
for(const p of testFiles)assert.equal(hash(p),hash(testBase+p),`unchanged test implementation ${p}`)
const report={status:current.failed.length===0?"PASS_ALL_32_UNCHANGED_TESTS":"PARTIAL_FIX_NO_ADDED_FAILURES",checkedAt:new Date().toISOString(),
  unchangedPublishedRuntimeFiles:files.length-changed.length,changedPublishedRuntimeFiles:changed,
  baselinePassed:baseline.passed.length,baselineFailed:baseline.failed.length,
  currentPassed:current.passed.length,currentFailed:current.failed.length,addedFailures:0,resolvedFailures:baseline.failed.filter(n=>current.passed.includes(n)),failedTests:current.failed,
  evidence:Object.fromEntries([manifestPath,baselinePath,currentPath,...changed,...testFiles].map(p=>[p,hash(p)])),
  method:"The same 32 named tests and test-file hashes are retained. Carrier-only mutations are isolated from stored profiles, original stored copper/drills are preserved, and the preview owns its physical module outside schematic sheets. Board geometry/netlist equivalence is checked separately.",
  caveat:"Passing simulation/test checks is not hardware qualification."}
fs.writeFileSync("reports/module-test-regression.json",JSON.stringify(report,null,2)+"\n")
console.log(JSON.stringify(report))