Tests and tools
The suite
.venv/bin/python tests/run.py # every tests/test_*.py, one line each
.venv/bin/python tests/run.py app jobs # only files whose name contains a word
.venv/bin/python tests/test_projects.py # one file, verbose on failureUse the venv's interpreter: the system Python has no numpy, and a bare python may be another interpreter or none (under pyenv it can be "command not found"). run.py takes words and nothing else (no flags; --help is read as a word, matches no file and runs none).
Each test file is a plain script that ends on N passed, M failed or n/m passed (both forms are in use; run.py shows whichever last line a file prints) and exits non-zero on failure. They run against throwaway directories (SOLDERMASK_PROJECTS, SOLDERMASK_CACHE, SOLDERMASK_CORPUS) and never touch real projects; none of them needs the model, Java or the network. run.py holds that: it counts the real corpus's index and the real projects directory before and after each file and fails the file if either grew, whatever the file printed -- a build writes its route to the corpus as a lesson, and a test that builds without redirecting it teaches the next model a fixture (one such example sat in the corpus from 7 to 16 Sep 2026; it is under .cache/corpus-quarantine-tests/).
They do need one thing that is not in git. test_symgraph.py, test_symbol_substitute.py and test_alternates.py read the vendored KiCad symbol library from .cache/kicad-symbols, which tools/fetch_symbols.py downloads. Without it they fail as though the parts were missing from the library — NE555D found fails — rather than saying there is no library, so a fresh checkout or a CI runner reports three broken tests and names the wrong cause. Fetch the symbols, or point SOLDERMASK_CACHE at a copy that has them.
Everything else outside pip is optional to the suite: without it, the checks that need it are skipped and the file still passes. Most print a skip line naming what was missing; a few drop the check silently.
| Without | What happens | Where |
|---|---|---|
.cache/kicad-symbols (tools/fetch_symbols.py) | three files fail, naming the wrong cause (above) | test_symgraph.py, test_symbol_substitute.py, test_alternates.py |
| kicad-cli | the DRC, plot, drill-file and netlist halves skip; test_judge_shipped.py holds that a build without it is "not judged" | some 27 files, among them test_pour.py, test_npth.py, test_sheet.py, test_fillet.py, test_referee.py, test_polygon_pads.py |
the Lightcycle wheel at router.LIGHTCYCLE (soldermask setup) | the routing checks skip (skip routing -- <router.ready()>); test_router_choice.py holds that a build then goes to the A* router | some 18 files, among them test_router.py, test_pairs.py, test_tandem.py, test_planes.py, test_handroute.py, test_file_geometry.py |
the A* router's checkout (soldermask setup --astar) | its routing checks skip | test_astar.py, test_power_corridor.py, test_sides.py, test_body_keepout.py |
| Java and the freerouting jar | the research tools' router checks skip | test_sides.py, test_body_keepout.py, test_pour.py |
| ngspice | every engine check skips and says why | test_spice.py, test_conditions.py, test_designcheck.py's audio corner |
| torch | the training and torch-parity halves skip | test_gnn.py, test_routability.py |
the compiled mould (pip install ./mould) | says so and passes; only the reference loop (numpy, or the Python anneal) runs | test_mould.py, test_mould_anneal.py |
| the parts catalogue on disk | the live-resolve checks skip, or skip a part and count it | test_net_gaps.py, test_acceptance.py, test_jlcparts.py's catalogue checks, test_gnm.py's fixtures |
the parametric index (tools/parametric_index.py build) | skipped | test_params.py |
the EasyEDA cache (and easyeda2kicad, for test_eeformat.py's cross-check) | the checks on real vendor records skip | test_npth.py, test_polygon_pads.py, test_eeformat.py |
Workers in a test. cli.main(), app.serve(), mcp_http and the evaluator set SOLDERMASK_ANNEAL_WORKERS and SOLDERMASK_ROUTER_RETRY_WORKERS to one a core when they are unset (placer.parallel_by_default, router.parallel_by_default), and a spawned worker re-imports the file that started it. So a test that reaches any of them sets both to 1 first, as test_cli_build.py, test_evaluate.py, test_gnm.py and test_mcp_http.py do. Retry workers at 1 also keep placements from racing in processes (workspace.race_processes() needs more than one). A test that wants the race or the retry pool sets SOLDERMASK_ROUTE_WORKERS, SOLDERMASK_ROUTER_RETRY_WORKERS and SOLDERMASK_ROUTE_PROCESSES itself, restores them, and keeps its body under a main guard, as test_route_race.py and test_router_wall.py do.
CI (.github/workflows/tests.yml) runs tests/run.py on Python 3.11, 3.12 and 3.13 after pip install -e ., with the symbol library fetched (and cached) and the mould built with cargo. Lightcycle is installed only when the repository has a LIGHTCYCLE_TOKEN secret that can read soldermask-org/lightcycle; without it the routing checks skip as in the table. A second step runs SOLDERMASK_MOULD=numpy tests/run.py physarum pitch, so the numpy loop is exercised too.
| File | Covers |
|---|---|
test_bundle.py | a project out and back in as one zip: versions, files, draft, chat and variations equal after the round trip; scratch and half-writes left behind; every refusal by name (a member off the layout, a path that escapes, a table version the zip lacks, a newer format) and that a refused zip leaves no directory; the API both ways including a bundle over the app's 8 MB body cap; and that a design.json carrying constraints keeps them into a fresh project, yields to a project's own, and is refused by field when malformed |
test_projects.py | versions on disk: save, revert, fork, labels, diff, zip, migration from format 1, refusal of newer formats, trash, atomic writes |
test_app.py | pages render, the API reads and writes projects and versions, exports, 404s — and, because the workbench keeps its functions global on purpose and that makes one flat namespace (workbench.js alone is 9,554 lines), that workbench.js, schematic.js, projects.js and platforms.js declare each top-level name exactly once (the last two share the home page's scope). A second loadPins() is not an error in JavaScript; it is the first one silently replaced |
test_jobs.py | the job queue and the job endpoints with the model stubbed |
test_turns.py | one chat turn with the model and the pipeline scripted: what the model is told, a question builds nothing, a dirty build is revised once and kept only when it measures better, one stage on its own; and the thread on disk reads back whole — a revised turn is one entry with its first version folded in, a rebuild is the app's note and not the person's words, a turn that failed is remembered red with its reason and left out of what the model is told, and the project's lock is released after it |
test_claude_code_backend.py | the default design backend, Claude Code on its own login (design._gen_claude_code), against a fake claude on PATH so no model is called: the subprocess gets no Anthropic key or token, no settings, hooks, plugins or CLAUDE.md, no built-in tool, only the three catalogue tools with every other MCP tool refused by name, dontAsk, no kept session, the prompt on stdin and an empty directory to run in; only its schema lets a component carry lcsc; a code search_parts returned is kept and one only check_design echoed is taken off and named in unsupported, and on an edit in the reply; a plan's turn records no cost and the list price apart; each tool call is a step line; no install, no login, an answer without the schema and a turn past its time each fail in words; status reads the login and the plan; SOLDERMASK_MODEL_CALLS=none refuses before claude runs; with nothing set the default backend is claude-code |
test_groq_backend.py | the Groq backend is comparable, not merely present, with no network call: the schema keywords Groq's strict mode refuses are taken out, every object stays closed and complete, the schema's shape survives, the relaxation is disclosed on the design, a placeholder key is refused before the SDK, and the backend is wired into the dispatch |
test_auth.py | the access rule, login, bearer, the QR path, lockout, proxies; headers, compression, caching |
test_wsgi.py | requests through Hypercorn's WSGI wrapper — the 204/304 case the Flask test client cannot see; and the body caps of app.server_wrapper (16 Nov 2026): a project zip past 8 MB with the token, or from a local client the guard trusts, reaches POST /api/projects/import, one without credentials is stopped at 8 MB before its body is held, and every other route keeps the 8 MB cap (app.BODY_MAX) |
test_docs_style.py | the manual's writing rules (Writing the manual), on the pages in its STYLED list: no sentence over 25 words (a code span, a key and a link count as one word or their text), no em dash, no "since <date>" history in the prose, and a first paragraph under the title; and, on every page, that each link into a heading (page.md#anchor) lands on one, with MkDocs' slugs and _1 repeats, because a rewrite renames headings and the anchor it breaks is on another page. It checks itself too: a sentence from the old workbench page is caught, a decimal is not a full stop |
test_fonts.py | the type on both surfaces, wiring not files: the app declares the seven licensed faces, each with a local() source before its file, the text stack starting with Neue Montreal and the display stack with Monument, both falling through to Manrope, while the manual declares none it would only 404 on; Libertad Mono declared once for every weight over JetBrains Mono, the code and drawing tokens on JetBrains whole (the face is unicase and has no block glyphs), no sheet or script naming a face first outside a token, the open files present; the licensed files reported, never required |
test_release.py | semver, changelog parsing, release note, release bump (on copies; never git) |
test_harness.py, test_repair.py | the pass rule, where it is applied, and the repair loop's judgement. passes() was reachable from the evaluator and from --repair N (off by default) and nowhere else, so no board anybody built was ever asked whether it passed; workspace.verdict() is that same rule reading the report the build already produces, and the tests hold the wiring rather than restate the rule — a clean board passes, a net the design asked for going missing fails and says which, an ERC error counts whether it arrives as a dict from board.json or an object from erc.check(), a pour DRC that did not run is not a pour DRC that passed, --no-route is not a failure, an incomplete net is unrouted — and, across four combinations, that verdict() and passes() return the same answer, because the moment they disagree the number a user sees and the number the harness measures have come apart; and the clause under dropped_nets: a connection dropped from a net that survived fails the rule, the verdict, the evaluator's row and its printed line, the why names the pin and elides past three, and dropped_connections_of() reads the count back off a stored board's gaps, survivors of a removed net included |
test_judge_shipped.py | routed copper is judged before it passes (25 Sep 2026): a board with nothing poured is checked by KiCad's DRC as shipped (workspace.judge_shipped), a track across another net's pad fails on the copper as shipped, a net KiCad finds unreached fails as unrouted, and without kicad-cli the board is not judged (passed: null) with a gap saying why; test_harness.py holds the rule's side -- an ERC that did not run and copper no DRC saw are "not judged", a failure among the checks that ran is still "failed" |
test_poll.py | the verdict as a go/no-go poll (repair.poll, 8 Oct 2026): over all 768 combinations of the fields passes() reads, workspace.verdict()'s passed and the poll's word agree, a station holds exactly when the verdict failed on a finding and is unjudged exactly when it is "not judged"; the copper station reads a rejudge's findings over the build's; attach_poll() recomputes on read; and the project summary and load_board() carry the current version's poll, re-read when board.json changes under them |
test_markers.py | where DRC found what the copper is charged with (8 Oct 2026): pour.markers_of() keeps what _errors() counts and drops what it sets aside, flips KiCad's frame into the board's, places a marker off the zone's corner, names the parts and stops at its limit; stored_markers() reads the judge in _judge_of()'s order and tells "none kept" from "none found"; markers_for_version() runs DRC on a copy, writes nothing into the version and is re-asked only when the file changes; the endpoint serves it; the copper station names the part every error is on. kicad-cli is stubbed |
test_alternates.py, test_availability.py, test_category.py, test_query_ladder.py, test_parts_count.py, test_symbol_substitute.py | the parts and symbol stages, each named after the regression it prevents; test_parts_count.py also holds that a footprint's row count is the shorter pad axis, so KiCad's vertical 1x2, pads in a column, is one row and a real 1x2 header fits it (15 Sep 2026: read as two rows, it fitted only parts stating no count, and an out-of-stock IDC socket was ordered for every 2- and 5-pin header of the suite); and test_availability.py also holds the order (16 Nov 2026): the ~2% assembly allowance rounds up (one board of a part used twice orders 3, ten order 21, 25 order 51), and stock read from the catalogue on disk is not checked_live, while a lookup sent to the server (SOLDERMASK_PARTS=jlcsearch) is |
test_jlcapi.py | JLCPCB's open API as a parts source, the transport stubbed: the Authorization header matches the vendor's own documented sample byte for byte; the string signed is method, path, timestamp, nonce, body, one a line; a 200 body's data comes back, a 403 is NotAuthorised with the trace id to quote, another code is a JlcApiError that is a PartsError, no credentials is NotConfigured, and offline never reaches the transport; a record in each of the three shapes the endpoints answered on 16 Sep 2026 -- a detail record, a dump row, a library row, held as the vendor sent them -- is a Part with the break covering one as its unit price and the breaks riding along in the mirror's string form, its category both levels joined so category_ok() reads a kind off it, a numeric code gets its C, a record with no code is not a part, and every name the three shapes use is in the field table; the parameters read as {name: value} with an empty one dropped; a parameter value is typed by its unit and never by its shape (10kΩ is 10000 resistance, 1.8V~3.3V is filed low end first, ±10% minus then plus, 600Ω@100MHz keeps its condition in the format, 0603 stays a string) and the vendor's names become the ones the pipeline reads (Current Rating → Rated Current); the dump follows lastKey until a page is empty and a limit stops it early, the library pages by cursor; a snapshot is the dump and then a detail record a code, resumable after the codes its partial file holds; ingest() writes shards, buckets, the attribute table, the search index and a manifest naming each with a hash, and jlcparts.by_lcsc() reads a part back with the vendor's package, joints, stock, price and basic flag, its category off the shard's name spelled as the mirror spells it, jlcparts.search() answers a text query from the vendor's words, the table carries Package, Basic/Extended and Manufacturer as identifiers and the parameters typed, and a manifest the API wrote is not refreshed from the mirror on the TTL; by_codes batches and keys by code; and authoritative() takes stock, price and the basic flag from the API, keeps the mirror's package, description and category, names its source, and falls to the mirror's lookup when the app is not granted the API |
test_datasheets.py | the datasheet is read as the sheet wrote it and nothing is guessed (21 Sep 2026), no network and no model: two spellings of one pin are one pin (3V3(OUT) and 3V3_OUT; ~RST, /RST, RST#, nRST and RST_N; GPIO20, GP20, IO20 and P20; +IN and IN+; DO/IO1 and DO (IO1); RESET# and the RESET whose overbar pdftotext dropped; Anode and A) and two names are not (VREG_IN and VREG_VIN); the pages sent for transcription are the ones carrying the symbol's own pin names, so a long sheet's pin list outscores its registers and a short sheet goes whole; of two tables with the same numbers the part's own variant is chosen (a PCM2902E takes the PCM2902 table), then the catalogue's package (an INA219AIDR the SOIC table, not the SOT-23 that is its reverse), then the fewest numbers the symbol lacks; compare() sorts the numbers into agreeing, agreeing under another spelling, differing and one-sided; compare() also names a swap -- the sheet's name for a number is the symbol's name for another -- and marks both ends suspect, unless most of the table is swapped, which is another package's table; a rail (GND, IOVDD) on another number is never a swap, and a pad the symbol names only by its number is unnamed, not compared; and locate() finds a pin through the sheet's name, alias or function text and answers none to a name the sheet does not carry. Since 9 Nov, fetch() with the network stubbed: a network failure may pass, is believed for an hour and then asked again; a 404 or a page is final; a scan gives way to a later link with text and is kept, marked, when none has it, then fetched again when a new link appears; LCSC's script redirect and viewer page are followed to this part's PDF, and a page cached before that is fetched again; and the reader calls an unreachable sheet a ReaderError, not NoSheet |
test_componentlib.py | the component library (componentlib.py, a pilot of 2 Oct 2026 that designcheck now reads in every build's ERC, and the grader too; 97 records), offline: applied() returns verified items and never an unverified or rejected one; every item with a claim carries a page and a verbatim quote; every record names the sheet it was read from by sha256; a record of a scanned sheet carries no pins or rules; and index.json's counts match the records |
test_datasheet_reader.py | the on-demand datasheet reader (datasheet_reader.py, 8 Nov 2026), offline with a fake model client and a three-page sheet, urlopen made to fail: two reads' external parts merge one item a part (the same kind, non-ground pins and value in any spelling) with found_by naming both, and of two the verified one is kept; a quote not on the sheet, a number not in its quote and a value read off an image are stored and never applied; a read goes to <cache>/components/, never the shipped library, and a shipped record wins in componentlib.get; off, read() is None, no client is made, nothing is fetched or written; the spend guard stops a read before a call whose worst case would pass SOLDERMASK_READER_MAX_USD and stores nothing; module_internal drops a module's own crystal and keeps a peripheral part, figure_agreement keeps a figure value both reads gave and drops one a single read gave that the text never prints; read C (the drawing read, 8 Nov 2026) is off unless SOLDERMASK_READER_DRAW names it, is one call after the pair at 300 dpi and detail original, is made only when a figure value needs a second reading, confirms a B-only figure value it drew (marked "the drawing read") and not a different value, never has its own parts applied unless adopt (off), is stopped by the spend guard before its call, and on failure leaves the record stored without it; its answer is stored with the others and reread rebuilds a record from them calling nothing, or read C alone with redraw; the rules hook runs between merge and audit; the record names reader, version, models, deployments, date, tokens and list-price cost; the MCP tool off says how to turn the reader on, check_design's note names an IC with no record, and parts read off exits 1. Since 9 Nov: the Azure client waits 300 s a call, tries a timed-out or reset call twice more and answers on the third, gives up after three with "could not be reached", and does not retry a refusal (HTTP 400) |
test_datasheet_warm.py | the datasheet warm-up's ranking (tools/datasheet_warm.py and tools/board_parts.py, 8 Nov 2026), offline with tiny fake boards and a fake JLCPCB library: an LCSC code is a field named for LCSC, JLC or a supplier part holding a bare C-number (not a C-number in any other field, not a rotation), a part number is one of the named MPN fields and never a placeholder or a distributor's number; a KiCad 8 and a KiCad 6 board, a KiCad 5 board (no fields), a schematic (its library cache is not a use), a KiCad 5 schematic, an Eagle board and a BOM are each read; a code on two footprints counts its board once, a fork with the same parts is one board, a .git and an imported copy are skipped, and a tar streams the same boards as the folder; a part number maps to one code, or to the one in stock of several, and to nothing when several are in stock; the ranking puts boards first, then basic, then our designs (once a project), names each row's sources, and drops a resistor, an LED, a thermistor, a connector, a part with no datasheet link, and a code the library does not know, the NE555 kept although parts.kind_for calls it a crystal, and ranks an IC out of stock on the full library's link; --all-kinds keeps the kinds and not the missing link; plan fetches, reads and writes nothing. Since 9 Nov: a part the build found by search is read off the version's BOM, and the user's projects only when asked for; a "no sheet" the network caused is not dead; the name a sheet must carry (W25Q16, STM32F030, EL817); find keeps the maker's sheet, not the original's for a clone (TECH PUBLIC's AP2112K), not a scan, another part or a web page, never fetches the catalogue's own host, and skips a failure that may pass |
test_resolve_fidelity.py | the part ordered is the part asked for, or the notes say why not (20 Sep 2026): every row a real catalogue row from the audit that found 29 silent substitutions on the failing replay boards -- a rating, tolerance or dielectric below the ask is refused and with no row at or above it there is no part; a passive is not ranked by text similarity; packages.standard_name() names SOT-563, 1210, SMB and the rest for the filter and package_mismatch(); right-angle against a vertical footprint and through-hole against SMD rank below; the exact number outranks a suffix variant (the Pico over the Pico W, BSS138 over BSS138K), a reel suffix is exact; an exact-number listing survives the category gate (the USBLC6-2SC6 filed under circuit protection); a search's family word (JST, tactile) that the chosen row does not carry is named |
test_jlcparts.py | the local mirror of the catalogue, offline: known codes resolve, the typed lookups answer in their package, the index answers from any thread, every file kind the manifest names is read or named as unread; a refreshed manifest naming under half the cached one's components is refused as a build in progress, and with nothing cached a mirror naming under half of a whole build's refuses to answer -- by code, every lookup after, and by search, whose index never reads the manifest -- with a PartsError (so parts.py asks jlcsearch) where it used to answer None, while a catalogue JLCPCB's API wrote is its own size; the listing text corrects a package the attribute table got wrong and leaves one it agrees with, says nothing about, or names two for; and a cached file whose sha256 is not the manifest's is stale, decided once a process, never under a manifest rebuilt from the disk itself; the catalogue checks run only on a whole catalogue on disk (catalogue_state() missing nothing), the logic checks always |
test_series_led.py | the simplest board there is, and the two gates that took it apart: a two-terminal polarised part is resolved through the pad its own symbol calls the anode — before the raw-number test, and whether or not it has a symbol — so a tutorial LED keeps both its nets and the right way round, while a bare number on an IC's named pin is still refused; and a header footprint still constrains the part when JLCPCB cannot speak its name, so a two-pin battery clip cannot resolve to a 40-pin header longer than the board, without that geometry test catching the three-pad LED footprint that also looks like a header |
test_acceptance.py | a design resolved offline with its bill of materials read: every resolved part has an orderable code and a footprint with pads, none is filed under a kind the design did not ask for or has more pads than its kind can have, and every net asked for is on the board; a part the cache cannot reach is skipped and counted, so the test gets stricter as the cache fills; and the pass rule is shown to fail a board with a failed pour, an unresolved part, an ERC error, an unrouted net or a lost net, while a pour that never ran is not a pour that failed |
test_net_gaps.py | a net that loses connections says which and whose fault: a connection to a part that never resolved is named, not silent; a pin that will not place blames the pin and no gap calls a resolved part unresolved; every removed net names the pin left behind and the cause; and every dropped connection is on the netlist's count. Skipped without the parts catalogue |
test_params.py | the parametric index (built by tools/parametric_index.py): values parse and a net name or an empty string is not one; a hit really is the value and package asked for, most stocked first, carrying the fields a Part needs; a 0R link resolves; a value not made in that package returns nothing rather than a near miss; and parts.capacitor() answers from the index. Skipped when the index is not built |
test_pin_aliases.py | a pin under another spelling is the same pin: TX finds TXD and D+ finds DP; a reversible USB-C pair wired on one side resolves and says so; a direction is never a spelling, so TX never finds RXD; an exposed pad falls through to ground; a Pico's GP4 finds its multiplexed pin by the leading token and a number never matches another number; and a token that names more than one pin (I2C0SDA) is refused, not guessed |
test_module.py | pre-built modules: an ESP32-S3-WROOM-1 filed under IoT/Communication Modules resolves while real category contradictions still contradict; FROM_PART can be asked for and carries no geometry of its own; and a module still needs a rail and decoupling and has its floating pins reported, as an IC does |
test_dual_row.py | a dual-row header is one part: the grid is the right size, pins 1 and 2 share the first column as KiCad's PinHeader_2xNN numbers them, it is through-hole, a single-row part cannot pass for it, and the search asks for the grid (2x20P) |
test_platforms.py | the quickstart MCU picker: ids are unique and URL-safe, every platform offers a mount and names a symbol, a provisional keepout or number says so, and each mount's prompt names the part exactly, asks for FROM_PART with its code, and asks for sockets rather than the module's footprint. Offline by default; --live resolves every part, footprint and 3D model through the API's path |
test_assembly.py, test_ses.py, test_kicad.py, test_models3d.py, test_symgraph.py | fab files, the router round trip, the KiCad frame (and the Gerbers' via pad and drill are the board file's via, not 0.60 / 0.30 literals), 3D models, the schematic graph |
test_sheet.py | the schematic sheet: on a board with every role on it, zero wires through a symbol body, zero text over text, zero wires over two inches, zero stacked symbols; supply pins are ports and never wires, adjacent ones share a port; a short two-pin net is a wire and a five-pin net is five labels; a pinned position is honoured to the mil and the LED under a moved resistor follows it; a doubled pad folds onto its pin, a tab pad with no pin is reported, a pad on two nets is said; the written .kicad_sch reads back by the module's own connectivity check as the board's netlist, and — with kicad-cli — KiCad's netlist of it is the design's net for net with 0 ERC errors |
test_rules.py | the clearance is the board's: a 0.4 mm pitch pulls it to 0.15, a gap below the fab's floor stops there and names the footprint, one pad in two shapes and two pads on one net are not gaps, the DSN, the label and the .kicad_pro all carry it, and a board with nothing fine on it writes the DSN it always wrote, byte for byte; and one rule, three writers — for each router's rule the DSN, the A* command line and the project file carry the same track, clearance and via, every DRC floor sits under what the routers' geometry gives (hole clearance and hole to hole included), and ses.floor() raises a sub-floor wire to the judge's own track floor and counts it |
test_designcheck.py | the design check's rules on netlists built in the test, no catalogue: each of the three silent defects the held-out pilot found (USB-C CC open, a TP4056 with CE grounded, I2C with no pull-ups) fires on its fault and stays quiet on the fixed board; enable polarity by name; a pin's recommended rows read as a union and logic-level rows ignored; a crystal behind its series resistor counted; the off switch; a rule that crashes says so instead of passing; the power tree's sources and loads. The 7 Nov rules the same way: a motor driver's supply on bypass only (error), under its sheet's figure (warning) and with 100 uF (clean), the figure not also a datasheet-part warning; a strip's supply, "strip" with and without a data line, a data line given a voltage; servos at 100 uF each; a FET-switched motor's supply but not its switched side; a driver's outputs called power not taken for its supply; a half-bridge found through a gate resistor and G1/D1 pins; a crystal's resistor on XIN against XOUT; an ESP32's EN with and without 1 uF; LEDs at 1.3 mA (clean), dim, short of headroom, unable to conduct, of unknown colour (not judged) and with pins named 1 and 2; SWD with and without NRST, and an RP2040's RUN not asked for; a headphone coupling corner (skipped without ngspice). Since 8 Nov: a TMC2209's VS under its sheet's 100 uF (warning) and at it (clean), a stepper connector on its OA1/OB2 outputs not taken for a supply, and an LED on an RP2040's GPIO driven from IOVDD's 3.3 V, not DVDD's 1.1 V core. Since 8 Nov night: diode-direction on the three wirings A/B boards shipped backwards (a flyback diode into a FET's drain, a bootstrap diode out of VB, a clamp across a rail) and on an LED with its anode on ground, each wrong and right; a diode from a negative rail and an OR-ing diode beside a PFET left alone; diode-pins as one warning a part number. Since 9 Nov: a record's limit measured from another pin (VOUT to VIN, BST to SW), across a split supply (±18) or below the sheet's own operating voltage (TP4056's "BAT: -0.3V~0.7V") is not a ceiling to ground, while ± on one pin and "±18 or 36" stored as 36 still are; a record's "output" capacitor from SW or LX2 to ground is not asked for, while its missing input capacitor still is |
test_electrical.py, test_ohms_law.py, test_width.py | copper sized for the current it carries rather than for the median: the IPC-2221 maths against published values, per-net widths and via counts, the LED/resistor/regulator/capacitor checks Ohm's law made writable — and, as much as any of those, that a board declaring nothing is routed exactly as it was before |
test_congestion.py, test_incomplete.py | the placer's picture of the board is the board — pads, pins, courtyards and RUDY where they should be; a net with copper on some of its pins is named incomplete, pin by pin, where coverage() was blind; two wires are one piece by the distance their round ends reach and not by a square around them (a 0.1 × 0.1 mm step on a 0.127 mm track is open, 0.08 × 0.08 is joined, a via is reached at its radius), and close_joints() bridges a dangling end short of its own net by less than the rule, extends one stopped short of its pad, and leaves a gap of the rule or more open; copper that ends on a tab reaches the pads of the same net drawn inside it (a TO-252's 2, 2_4 under 2_3), and a pad of the net beside it, not overlapping, is still owed its own ; and the walk's grid index (test_incomplete.py, 12 Nov 2026): on 400 random boards dense with near-misses -- ends a hair short of touching, vias on and off wires, rounded and square pads on either side -- the indexed walk answers exactly as the full scan, and on one net of 3,000 segments and 300 pads it agrees at least five times faster |
test_corpus.py, test_routability.py, test_candidates.py, test_keepout.py | the DSN round trip to the byte and the width through IPC-2221 and back; the split is by board, the metric is right by hand, the numpy forward pass is torch's, the winner is judged on held-out boards; one candidate is one anneal, the incremental cost is the full cost, the retry loop keeps the least bad board and says why; copper stays out from under an antenna the footprint can locate -- the router's keepout, the rule area, and since 25 Sep 2026 the placer: a part under the antenna is charged on either side, the anneal on a crowded two-sided fixture leaves none there where the term switched off leaves three of eight, seating and centring do not bring a zone over a part, and the gap for one left there is written of the placement the build kept |
test_asked_edge.py | a part the design puts at an edge (constraints.edges, read by nothing from 3 Sep to 28 Sep 2026) goes there: apply_constraints carries each named part and a ref the board does not have is a gap; placer.edge_goal is the side named whatever the part's kind, the nearest for a connector or antenna module with none, and none otherwise, and a named part sits flush; the edge term charges the distance to the named edge, and _Index.local() moves exactly as _cost() over 300 random moves; six anneals seat a USB-C asked for the top against the top opening off the board and a switch asked for the left against the left, where with nothing named the same seeds put them elsewhere; a named part pinned elsewhere is a gap saying the pin won, a connector that cannot face off its edge is a gap, and centring does not slide a named part off its edge |
test_asked_keepout.py | an area the design asks to keep clear (constraints.keepouts, read by nothing from 3 Sep to 27 Sep 2026) is kept clear: apply_constraints carries each rectangle onto the netlist with (x, y) its lower-left corner; keepout.asked makes one keepout a copper layer, four on a four-layer board, clipped to the board, and one off the board keeps nothing and is said; the placer prices it as the first board zone, three anneals of a chain leave it bare and the report clean, and a part pinned inside it is a gap naming the part and the keepout; the .kicad_pcb has a rule area on every copper layer, the plane included, refusing tracks, vias, pads and pour, drawn in KiCad's y-down frame and read back clean; the DSN has it on the layers it routes only; Lightcycle is handed it as a wall and routes a net round it with every pin reached and no copper inside; a pad inside it is said as the keepout's, not its footprint's; and a board that asks for none is written without any of it |
test_body_keepout.py | copper stays out from under a connector's body (keepout.py, 25 Sep 2026): a connector, and a USB, card-socket or DC-jack package whatever its kind, gets one, an IC package named Type_C and a resistor do not, and a 2.54 mm header's pad cuts leave it none; a right-angle USB-C's region is inside its body, reaches the mouth, covers the path in front of its pad row and nothing between the row and the back edge, and holds no pad -- at each quarter turn and on the back, on the side it is mounted on and toward the way it opens; a through-hole jack's on the side its body sits on with its pins cut out; a body over the outline kept only on the board, and a part off the quarter turn given none and said; the DSN's structure keepouts and the .kicad_pcb's rule areas on that layer, tracks and vias not allowed, pads allowed, read back clean and never read as a fill; the pour allowed under the body only when the shell is on the poured net and no other pour reaches it there, and the notes saying which; the ground grid's vias and an island's stitch kept out. Then the real tools, each skipped and said when absent, on a USB-C at the top edge with a signal whose straight path runs under its shell: freerouting and the A* router each run it under the shell with the keepout taken out of what they read, and with it neither lays F.Cu copper or a via there and every net closes, the connector's own pads included; kicad-cli's DRC flags the control's copper as items_not_allowed and finds the kept-out board with no error; and on a board a person placed, a body with another part's pad inside it keeps nothing, where on one this pipeline placed every body keeps |
test_physarum.py, test_rna.py, test_pitch.py | the research instruments: the mould's block solve against a dense one at 1e-10 and its room model on hand-drawn boards; the fold; and the pitch counts the Mendicant paper reports beside the windows' 0.829 — edge-to-edge pad gaps, fine-pitch pins, density — on boards whose right answer can be read off the page |
test_mould.py | the compiled loop is the numpy loop: on random grids of every kind the two callers draw (whole boards fed at a middle pin, windows escaping to a rim, with and without negotiation, a rotating feed, a track three edges wide, a sigmoid growth, odd sizes, one net) the conductivities agree to 1e-9, and one power rail grown alone (physarum.rail) agrees tube for tube and current for current; a batch of windows grown at once is the windows grown one at a time, bit for bit, on one thread or all; the wall of headers and its escape agree scalar for scalar, the integer counts exactly; a job whose shapes disagree is refused. Says so and passes when the core is not built |
test_mould_anneal.py | the compiled anneal is the Python anneal, to the bit and not to a tolerance: CPython's random stream (random, _randbelow, gauss with its cached second value) over 24,000 mixed draws on four seeds up to 2^63; CPython's hypot, which is not libm's, on 100,006 pairs; _Index.local() summed by each for every part of a hand-drawn board carrying every term (decoupling, a crystal, an ESD array at its USB connector, a fine-pitch QFN's ring, a radio's antenna keepout, connectors seated at the edge, a through-hole header) on 200 random placements spread and piled, at quarter and odd angles, on both sides; _clamp() and _fits() on 2,000 asks each; whole anneals compared coordinate for coordinate and rot type for rot type: three seeds as shipped, every term on and two-sided with parts flipped to the back, a warm start at 45 degrees with a part pinned at 30, tandem.repair's re-anneal (courtyards grown on a dataclasses.replace copy, the rest pinned, warm 0.25), the pre-24-Sep anneal (quarter turns folded, no swaps), and a watched anneal's frames; a harness term the compiled loop does not carry falls back to Python and is counted. Says so and passes when the core is not built with the anneal; and on a board read from a file, its outline, hole and copper as board zones (placer.board_zones): local() to the bit and whole anneals alike, and fewer parts on them than an anneal that does not know them; and the areas a design asks to keep clear (Netlist.keepouts) handed to the compiled anneal as the first zones, whole anneals alike with them alone and before a file board's own; and the edge a design names for a part (Netlist.edges) handed to it as a side code, 0 for every other part and nothing at all when none is named, local() to the bit on 200 placements on and off the board and whole anneals alike; and with the pad-access term on a board whose connectors and a switch carry holes: local() to the bit on 300 placements (the term charged on a share of them, or the check says it checks nothing), whole anneals alike, and at weight 0 alike |
test_pic.py | a photonic chip as tools/pic.py and pic_place.py see it, on chips drawn in code: the port transform is LiDAR's for N, FN, FS and S; two nets whose ends swap rows read as one crossing by both readings and two that keep their rows as none, and a waveguide passing a device at its own row as none; the layering finds three layers, a virtual node for a skipped stage and every sink on the last layer; the order search takes a crossing netlist to zero, fixed couplers stay put and the free devices are ordered to suit them; and the row projection keeps ordered targets, spreads a collapsed row about itself rather than up from it, and meets a swapped pair in the middle |
test_fabrules.py | JLCPCB's published table on board.json (fabrules.py), each rule held on both sides of its figure with a board built by hand: board size and thickness, track width by copper weight, the via sizes refused and the ones that cost more, a component hole's ring against the absolute minimum and the recommendation (an oval read on its narrow side), a non-plated hole, a hole outside the plated range, pad holes and via holes too close edge to edge (a via hole touching a pad's included), a via of the pad's own net opening into it said with its depth and one of another net left to DRC, a via in a large exposed pad said as common practice and not blocking, SMD pads of different nets against the pad gap and the mask dam and pads of one net allowed to touch, a thin silk stroke (a filled shape has no width), silk near a pad, the label height, a part on the back needing Standard assembly and a panel under 70 x 70 mm, 0201 and 01005 parts, 0.4 / 0.37 / 0.3 mm pitch, a board too small to assemble singly; a blocking below-minimum finding a gap and the rest notes; the report naming its pages, the day they were read and what it cannot see; the board it read left as it was |
test_fillet.py | the router's segments chained into tracks and the corners rounded: what may be joined and what may not (a T ends a track, a width change is a break, a net crossing layers is two paths), the arc tangent to both segments at the radius asked for or the largest that fits, a corner with no room left sharp rather than shrunk away, the arithmetic of the copper a fillet ADDS on the inside of a bend and the guard that keeps it the rule's clearance from every other net (a pad placed by search, the radius cut to clear, sharp at the floor, all three writers on the one arc, kicad-cli clean on the guarded board and not on the unguarded one), and the copper a fillet REMOVES at the vertex: a sharp V whose tip is the only contact with its own pad stays sharp, a deep tip whose legs still lie on the pad rounds, a gentle bend a neighbouring track hangs on rounds, a sharp V it hangs on stays. Since 8 Nov 2026: a keep-out on the inside of a bend, which the segments clear and the unguarded arc fills into, keeps the guarded arc out; and a pad that asks more clearance than the rule is kept clear by what it asks; and an arc keeps the edge rule from a cut inside the board, not only from its box |
test_escape.py | escape stubs (16 Nov 2026): on a row of 0.2 mm pads at 0.4 mm pitch under a 0.2 mm rule, placed off the grid, the pads the grid cannot end on get a stub each: escape copper of the pad's net, from the pad's centre straight along its long axis, the rule kept from every other net's pad; a stub is not counted as a person's track. Then the build's gate (16 Nov 2026), at the default SOLDERMASK_ESCAPE (on): through workspace._route_once a board Lightcycle routes first gets its stubs and one routed by the A* router gets none, and astar.refuses() does not refuse a board for its stubs while it still refuses one carrying a person's track |
test_pour.py | the ground pour: which nets it takes, the zones it draws, the islands DRC names and the vias that stitch them, offline on hand-made parts. Since 8 Nov 2026, parallel_vias(): a 5 A crossing gets the six vias its current needs, joined on both layers and spaced; a crossing walled in by another net gets fewer and says so; a poured net and a half-amp net are left alone. ses.via_report counts a layer change at a time, and width_report leaves out necks into a pad and the stubs between parallel vias ; and two of a part's own pads closer than the rule but apart (an LGA's corner pads, 12 Nov 2026) are its land pattern and set aside, while its own short, a gap between two parts' pads and a track by a pad still count. Since 14 Nov 2026, an exposed ground pad ringed by its pins takes its via at its own centre: as its ground site before routing, laid with no stub and kept off by the router on every layer, and in stitch() where the fill missed it, unless another net's track runs under its centre. Since 15 Nov 2026, an antenna keepout holds out a via's copper, not only its centre: a stitching grid point 0.26 mm off the keepout's edge gets no via (the hard set's X14), _antenna_keepouts() puts the keepout on every copper layer, and no ground site reaches into it |
test_pour_geometry.py | the pour's geometry made fast and held to its reference to the bit (13 Nov 2026): pour._inside, _point_clear, _edge_gap, join_pieces' box and point tests and prune._on_fill against the one-at-a-time versions they replaced, on random rings small and large, a ring with a hole let in through a slit, points on vertices, edges and a hair either side of every limit, and copper appended or replaced after it was asked about |
test_power_pour.py | power-net pours, opt-in, beside test_pour.py's ground: power_nets() is off unless the netlist or SOLDERMASK_POWER_POUR asks, 0 in the environment wins, and on it takes a rail typed power or named like one whose current wants a 0.5 mm track, highest current first -- not ground, not amps on a signal's name, not 0.8 A, not a rail declaring nothing -- or the nets named; a rail's zone is one, on the side most of its pads are on, the hull of its pads grown by the margin and inside the outline, written with a priority over ground's unwritten 0 and joined to its pads solid; two overlapping rails give the copper to the larger current, and the smaller one is moved to the other side where a pad of it is clear, or not poured and said, never stranded; the version's file replans the zones the judge filled; a back pad is stitched with the four 0.95 A vias 3 A needs, inside the zone, each stub sized for its share, a pad on the zone's own layer gets none, a ground island is stitched as it was, and the ground grid keeps out of the zone; which pads are islands is read off the copper (_net_islands), and the account puts every pad in the fill, stitched, routed or lost, with a narrow track and a router via on the rail as gaps; off, the zones, vias, row and note are the goldens captured before power pours existed, and the power code never runs; with kicad-cli, a pad a signal walls off on a scrap goes to the router with its anchor at the rail's width and KiCad finds the board clean; with Lightcycle built too, it routes the rest, KiCad finds the board clean under both pours, and every pad of the rail is joined ; and the fallback (workspace.realise, 12 Nov 2026), with the build stage stood in for: a board whose copper alone fails is built again with its power nets poured in power-pour/, the poured build is kept when it fails less and says it was built twice, the first is kept and says so when it fails no less, and a board that passes, one with no rail wide enough to pour, or SOLDERMASK_POWER_FALLBACK off is built once; a failure that is a missing part, an ERC error or a dropped connection is not a copper failure |
test_power_corridor.py | a poured rail drawn where its current runs rather than over the hull of its pads (corridor.py, 25 Sep 2026), on a 40 x 24 mm board with a regulator's VO at one end and three 1 A loads spread out: power_shape() is the hull unless the netlist or SOLDERMASK_POWER_SHAPE asks, the environment wins, a word that is not a shape draws the hull and says so; the source is found by a VO/VOUT pin, a P-FET's drain, a fuse from a connector, a buck's inductor off its switch node, an input connector (the VIN pin among three, never a motor's flyback diode), and guessed and said when nothing names it; each load draws what it passes on (1 A), a buck Vout Iout / (Vin 0.9), a capacitor nothing, and unknown loads split the rail's current evenly, said as an assumption; the tree holds every pad in one piece inside the outline less the edge clearance, a fifth of the hull's area, its legs 3 A, 2 A, 1 A each at the width IPC-2221 asks and the trunk the widest; a USB-C body across the way is gone round by the tree and by the mould with no leg drawn over another; the mould's corridor is one piece, its widest tube the rail's 3 A; two rails: priority by current, the smaller kept off the larger, moved to the back where its corridor crosses none, and not poured -- said -- when every pad sits in the larger's corridor; kept on the front, crossing, when the back would leave its front pads no room for a stitching via, and the note names them (corridor.stranded(), the stitcher's own tests at plan time: PCBGolf's four VBUS rails, 25 Sep 2026); the keepout is other nets' pads cut out to the nearest edge (a pad beside it, not in it, is not cut), closed round the rail's own pads and opened only at those a router is handed; the filled board draws a zone a piece and no corridor rule area, the router's DSN and the A* router's board carry it; the judge, router and kicad-cli stubbed, never hands the rail to the router whole, the fallback included, only the pad the fill missed with its anchor, and the notes say it is a corridor, where it is fed and how wide; with the tools, Lightcycle and the A* router route a signal that crosses the trunk underneath, and KiCad fills every pad clean; the hull, switch on, is the bytes it was before corridors (goldens) |
test_layout_rules.py | the datasheet layout rules (layout_rules.py): the loader rejects a rule with no quote, a limit with no source, a "datasheet" limit not in its quote, a pin the part's table lacks and an unknown family, keeps unverified rules and never evaluates them, and a missing file is a no-op; each of the four checks says ok on a board that keeps the rule and violated on one that breaks it, with the quote, page and limit source on the row; a no-solder exposed pad is flagged only when tied, and a placement says not-checkable for vias and layer changes; a raising checker is one note; realise_netlist() carries the section on the board and a summary on the verdict and leaves verdict.passed and every other field equal to the same build without the rules file |
test_physics.py | each part's job read off its wiring (roles.py) and its loops measured (physics.py): the inductance engine against Grover's rectangle to 2%, a via's partial self-inductance in closed form, a path back over itself cancelling to about zero and a trace over a plane near the transmission line's; a cap from a chip's rail to ground decouples it and a connector wired the same way does not; bulk from 4.7 uF; a crystal found directly and through a series resistor, with its load caps; a buck's switch node with input and output caps, catch diode, bootstrap and divider, and a boost told apart by the inductor's far end (an input rail with an inductor on it is not a switch node); ESD by wiring (a two-pad diode from a connector line to ground, an unnamed array on two lines) and not an LDO, an LED, a pull-down or a USB chip with a pin elsewhere; D+/D-, DP/DM with a side's suffix and CANH/CANL as pairs; a refdes-guessed jumper, test point or CON connector is no chip and an addressable LED is one; a cap further from its pin, a plane further down and a ground return the long way round each cost nanohenries, a plane beneath is taken over a long ground track, and a cap its rail's copper does not reach is not measured; review() says a loop past people's upper quartile with the cap, the pin and the long way round, says nothing of one inside it, reviews an unrouted board on its placement, and ships a reference of people's poured boards; pour.decap_ground_pads() sites a 100nF's ground pad and its chip's ground pins and not a bulk cap's, and a switcher's input cap and ground; the board reader keeps a pad's pinfunction, reads KiCad 10's name-only nets on copper and says the frame it moved the parts into, so copper from a board off KiCad's origin lands on its pads |
test_pairs.py | differential pairs laid as pairs (pairs.py, router.route_placement(pairs=True), 12 Nov 2026): an offset runs its distance from the centre line on every segment and the two sides are the gap apart; a trim takes its length off each end; on four layers a USB pair's width makes about 90 ohm by the formula physics.pairs measures with, on two it is the board's track; a P pad and an N pad side by side are an end; with Lightcycle, a USB pair across a board with other nets is laid and kept, every pin reached, its sides coupled over most of their length at the clearance, the copper legal by router.violations(), and a route not asked for pairs lays none; a USB-A receptacle's D+ and D- inside its body keepout get a start for the middle past the body (REACH_SHELL_MM, square to the pin row) where REACH_MM found none, and the why names the layer tried; a pair the route could not lay comes back kept False with why, and a note on the board says it was left as routed; pairs.restate takes every route's pair notes off and puts back the kept route's, and pairs.standing says a pair as lost where the copper that stands has no track at its width; on a four-layer board with ground on In1.Cu and SOLDERMASK_PAIRS_IN2 on (it is off by default, as is the negotiated pass below, SOLDERMASK_PAIRS_NEGOTIATE), a pair's middle may go on In2.Cu as well as F.Cu, and on F.Cu alone with the switch off or where In2.Cu is a plane; In2.Cu's width is solved against B.Cu, its nearest copper, as physics measures it; with F.Cu walled off by another net, the pair is laid on In2.Cu, kept and coupled, its note not calling B.Cu a plane, and with the switch off it is left as routed and the why names F.Cu. test_pour.py holds the rows riding the router's outcome out of pour._route (not into the corpus label) and onto the pour's row (12 Nov 2026) Since 14 Nov 2026, the negotiated pass (router._negotiate_pairs): the same walled four-layer pair, left as routed by the laying alone, is laid across the wall, side by side for at least NEG_SHARE of it, every pin reached and the hand copper where it was. A later route of the same placement follows the middle that pass kept (router._MIDDLES), with no route of the wide net, and lays the same pair.; and a laid track whose joint sits off its line is reached by a spur, not turned to meet it |
test_planes.py | four copper layers (planes.py, 27 Sep 2026). The default stack is F.Cu signal, In1.Cu ground, In2.Cu signal, B.Cu signal (12 Nov 2026, held at the end of this row); most of the row is the power-plane stack, SOLDERMASK_PLANES=gnd+power, held as an option: ground takes In1.Cu and the power net with the most pins In2.Cu, a board with no rail gets ground on both, one with no ground net gets no planes and says so; the router is handed F.Cu and B.Cu (the netlist pour.without hands it keeps its planes, which the first cut did not) and a four-layer board without planes all four; the placer's congestion divides by the layers a router has; the A* router refuses a plane board; the DSN declares the routed layers only; the KiCad file pours ground on F, B and In1 and the rail on In2 alone, and a two-layer board's zones are unchanged; the Gerbers add In1_Cu.g1 and In2_Cu.g2 with fill and vias and no surface pad; board.json, the stackup and the fab check carry the layers; a prompt's "four-layer" lands in board.layers, "layers of LEDs" does not, and a count not built is built on the nearest and said; a site is laid once however often the re-route asks; a pad drawn on the far side (Pad.opposite) gets its stub there; a via keeps the hole rule from a non-plated hole; a pad's via to its plane survives prune; two plane nets' sites keep the rule from each other (058's LDO corner as the suite built it, which the logic before 27 Sep failed by 0.031 mm); a plane pad's stub necks to its pad where two layers keep the net's width; the wide site search (pour.WIDE_PLANE_SITES) is allowed on only with a pinned Lightcycle of 0.1.4 or later, whose legaliser carries the guard against the hang it found (the pin is 0.1.5, and the switch is still off); one via a drilled hole however many layers the search steps; with Lightcycle and kicad-cli, the board is clean under its planes with ground filled on three layers and the rail on its plane ; the default stack since 12 Nov 2026 is ground alone on In1.Cu, with the router handed F.Cu, In2.Cu and B.Cu and every power rail left to it, and the power-plane stack is held as an option |
test_layers.py | a board with more than two copper layers, and the three places that assumed two: two layers are the outer ones and four bury two under the stackup's own names; the DSN declares each signal layer and no plane; a two-layer board declares no inner layer; four layers size for internal copper, so the same current asks for wider copper; and a fixed board survives validation and fit_board refuses to grow it |
test_stackup.py | the laminate and the fab sheet: a stack has the copper layers it names, is symmetric, and runs silk to silk; 2- and 4-layer boards are 1.6 mm and the 6-layer build is 1.566 mm, as the real fabrication file measures; outer copper is 1 oz finished at 0.035 mm and inner copper 0.5 oz of bare foil at 0.0152 mm; every dielectric names a material and a permittivity; an odd layer count, or one past sixteen, is refused by name; 8 to 16 layers are JLCPCB's default builds at JLC's own totals (1.6196 mm for eight, its two 1080 plies listed apart), the 6-layer build is named JLC06161H-3313; the count is the deepest inner layer, so planes on In1 and In6 are eight layers, on a saved board too; and pairs and physics draw an eight-layer board on its own stack, not the two-layer one |
test_eeformat.py | EasyEDA's format read by this tree (eeformat.py, 26 Sep 2026, in place of easyeda2kicad): on payloads written by hand, a pad's centre, size and hole in millimetres and a track's points and an arc's path left in canvas units, a rectangle's stroke as its eighth field, cutouts kept, primitives it does not read passed over, a pad row cut short still read, the pad number the one printed beside the pin (the SPICE one only when there is none), the 3D model's offset from the head in mm with Y up and the outline's centre winning past 0.1 mm, no SVGNODE or a broken one no model; and, when easyeda2kicad is installed beside the tree, every payload in the EasyEDA cache through both readers -- the Package whole, the pin pairs and the model's uuid and offset identical (1,194 of 1,194 on 26 Sep 2026) |
test_polygon_pads.py | a vendor footprint's polygon pads drawn as the polygons they are (packages.Pad.poly, 12 Nov 2026), on the vendor's own records for four of the UCS2114's (C635426) pins and two of the L76's (C2916232): a polygon pad's box and corners are its outline's and its anchor a circle inside it, its declared centre, size and turn not used; C635426's pins 5 and 6 are the vendor's 0.212 mm apart where the declared rects overlapped (X10's VBUS1 to +5V short); the L76's pads run the way their outlines do; the ERC's merged pads, the rule's clearance (dsn.rules) and the fab rules' pad gap measure the polygons, and the ERC says a short as this pipeline's drawing; board.json carries the polygon; the .kicad_pcb writes a custom pad that copperjudge.read reads back as the box its polygon fills, and the Gerbers a region on copper, mask and paste; with kicad-cli, its DRC finds pins 5 and 6 apart; and, where the EasyEDA cache is present, no two pads drawn touching where the vendor's outlines are apart; the file's own check (kicad.verify) holds a custom pad's anchor, not its box's centre, to the placement (14 Nov 2026) |
test_symbol_library.py | what setup takes from the KiCad symbol archive (symbols.extract_library): the top level's libraries and their .dcm, never a legacy/ or obsolete/ copy over a current one (the fetcher before 26 Sep 2026 flattened them by basename in tar order), nothing that is not a library, nothing outside the directory |
test_twins.py | a pin its footprint draws as several pads (packages.TWIN, 25 Sep 2026): the EasyEDA reader keeps every pad of a repeated number and names the repeats <n>_<k> (it kept the first until then: a USB-C came through with one shell leg of four), twin_of() reads a repeat back to its pin and does not take a pad simply called EP_2 for one, join_twins() puts every repeat on its pin's net once and leaves a repeat already on a net (a board read from KiCad) where it is, and the .kicad_pcb and the DSN both carry the repeats on that net |
test_body.py | where a part is, not only where its pads are: a symmetric package's extent is unchanged and centred, while a body offset from its pads (a WROOM-1 in miniature, its body hanging off one end of a five-pad row) moves the courtyard, sets width and height, and never shrinks below the pads; the vendor's silk extent comes back in millimetres, ignores other layers, and a footprint with no silk falls back to its pads; overlap is measured where the bodies are, and a turn carries the offset round; and a vendor 3D model held against its footprint: one turn_for already corrected and one that agrees say nothing, one bigger than its footprint is reported with how far out it reaches, and the cached bounds give the same answer, walked once |
test_unstarve.py | a ground pad the pour reaches by one thermal spoke, joined to it solid (pour._unstarve, 14 Nov 2026): kicad.write(solid=) gives (zone_connect 2) to the pads named and no other; starved_pads reads them off DRC's items; the change is kept where DRC, refilled, is no worse, put back where it is worse, and a pad the first refill leaves starved is joined in the next round; SOLDERMASK_UNSTARVE=0 keeps every relief; the MCP build names kicad_drc_errors, the verdict's set-asides included; with kicad-cli, KiCad loads the solid pad, fills onto it, finds nothing wrong and keeps the token when it saves |
test_mounting_holes.py | the mounting holes a design asks for (mounting.py, 14 Nov 2026): board.mounting_holes read as true, a count or {count, screw}, and a bad ask said; a prompt read for holes, a count and a screw, and not for a standoff voltage or a Cortex-M3; four holes at the corners, two on a diagonal, placed again when the board is resized and taken off when not asked; a board too small gets none and a gap; occupancy counts their squares and shrink_board keeps a side for two; each keepout is a ring the hole sits in; the drill file, the KiCad file and the rubric carry them; with kicad-cli, the board is DRC-clean |
test_prune.py | copper that joins nothing taken off (prune.py, 25 Sep 2026): on two 0805s, a stub into nothing goes segment by segment back to its pad, a track that runs over a pad on its way to a dead end keeps that pad's joint, a via reached on one layer goes and then the track that led only to it, a via chain from F to B to F stays whole, a poured net's via stays where no fill of its net is there to read (none given, or KiCad did not fill) and goes where the fill reaches it on one layer, a net carrying hand-drawn copper is never pruned. test_pour.py holds the judge around it, stubbed: the anchored re-route is kept when it leaves fewer connections missing than the first board and the fallback (pour.worse()), not only when the board comes out clean, and a net the fill reached no pad of hands its islands over to be joined to each other; the fallback's route runs in its own work directory beside the re-route's (pour.PARALLEL_FALLBACK) and the same board is kept either way |
test_handroute.py | copper a person drew: what the constraint block will store and what it refuses by name, the mapping from constraints to the netlist (including a track whose net the design has since dropped, which is reported rather than carried), the DSN's protected wiring, the pour taking hand copper out with its own net; the A* router refusing a board with hand copper, so Lightcycle takes it whether or not the A* router was named, with a gap in the person's words when it was; and, against the real Lightcycle, a hand-drawn detour that no router would choose coming back in its copper, counted as kept, while the net is still joined |
test_sides.py | parts on the back of the board: the mirror against the numbers measured from freerouting and kicad-cli, every geometry copy in the placer agreeing with the one function, opposite sides not in each other's way and a through-hole part in everyone's, the anneal using the back only where the front is out of room and never on a board held to one side, _Index.local() moving as _cost() moves through flips, a side surviving the corpus row, a pin, a DSN and a .kicad_pcb read back, the B layers of the Gerbers and the assembly file, the pin walk knowing a pad's layer -- and, with the tools installed, KiCad plotting a back pad where pad_position() says, freerouting reaching it on the back copper, and a crowded fixed board placed on both sides routing, pouring and passing DRC. Since 8 Nov 2026: a board that may grow is grown on one side rather than sent to the back, and only a fixed outline is offered the back |
test_packaging.py | the package works when it is not a checkout: the shape of an install is built in a temp directory -- the package with no pyproject.toml over it -- and asked where its data root, priors and router are, and whether git was consulted. Installed, home is the platform's data directory and not site-packages, the priors come from inside the package and hold the same library, the jar is looked for in the cache, and describe() reports no commit or branch rather than a stranger's. SOLDERMASK_HOME moves the data root without hiding the repository's priors, and SOLDERMASK_FREEROUTING_JAR moves the router and the label with it; and pyproject's lightcycle extra installs the version router.LIGHTCYCLE pins (16 Nov 2026: it named v0.1.0 while the pin moved to 0.1.5, and router.ready() refuses any other) |
test_cache_paths.py | the cache is where the caller says it is: all four cache directories follow config.cache_dir() rather than __file__, SOLDERMASK_CACHE wins over SOLDERMASK_HOME, and with neither set the cache is the repository's, as it always was |
test_edits.py | the smaller unit: a part nobody mentioned survives an edit and remove is the only way anything leaves; an instruction aimed at a selection may alter or take away only what is in it and may always add; the design handed in is never modified, because a proposal that will be reviewed must not have already happened; the gate reports parts, nets, the ERC delta and the cost delta, and says them in words; and a proposal is not a version until it is accepted — with the model and the pipeline both stubbed, since what is under test is the gate |
test_palette.py | the library as the palette and the board see it: a row carries what a block is made of, what it offers and how much of the corpus agreed; the ones that build are offered first and the ones that do not are listed anyway rather than hidden; searching narrows it and a search that matches nothing is empty; and adding a block builds a proposal that writes nothing until it is accepted — whose board a reloaded page can fetch until then, and not after |
test_addpart.py | a part a person picked, rather than one a model described: the catalogue read backwards into a kind (an LDO filed under “Power Management” is not an inductor, a switching diode is not a switch, and a bucket that says nothing gets no guess); a refdes allocated around the board rather than after it; the pick pinned by its LCSC code, in a field no model can write and an edit to that part does not unpin; and the claim the palette rests on — a design wired with the pin names it offered resolves with no gaps, on the pads it said they were. Then the API: rows carry what the pipeline can draw for them, a kind is never defaulted, and a net that does not exist is refused before anything is built |
test_removepart.py | a part somebody deleted, and what goes with it: a removal takes the part's pins off every net it was on and a net left with fewer than two pins goes too, named as removed rather than as changed — where before the design went on naming the refdes, resolve.py reported it as a "connection to an unresolved part", and the one-pin net was dropped there, silently, after the gate had already shown the change. Only this edit's removals, so a design that already carried a dangling pin builds the board it built yesterday. Then the turn, with the pipeline stubbed: the board that gets built is the board without the part, no model is asked, the reply names the nets that could not survive, a proposal is not a version and accepting is what makes one — and the refusals happen before anything is built, because a refdes nobody can point at is a bug in whatever asked and not a board to go and route; and POST /propose builds on its base, the version on screen, made current first as /chat, rebuild and route do, while a base that is not a version is not followed (16 Nov 2026) |
test_blocks.py | the block library and what composing means: every block names its parts, nets and ports and earned its place on more than one board; a block instantiates around the refdes a board already uses; connecting two blocks merges their nets into one carrying the pins of both, keeping the rail rather than flattening it; a port the board already has is that net rather than a second one wearing its name; and two of the same block can sit on one board |
test_constraints.py | a drag is a constraint: the block is validated rather than trusted and one bad entry refuses the whole of it; a design carries it and one without it writes the file it always wrote; the model cannot write it, by the schema and again by the commit; a drag is saved without making a version and is scoped to the version it was made against; and a pinned part comes out of a rebuild exactly where it was pinned, with the rest annealed around it; and board.mounting_holes (16 Nov 2026): true, a count or {count, screw}, and what a prompt writes, survive validation, false or 0 stores nothing, a count outside 1 to 4, a word, a screw it does not take (M5) or another key is refused by name, and a PUT of a block carrying them keeps them |
test_cli_build.py | the command line builds through workspace.realise(), once: the source imports it and never places or routes on its own; a build counts one realise() call and one placement; --seed, --no-pour, --no-route and --qty reach it; the output directory holds what came back; the verdict printed is the one realise() stamped; and a --project build is one build saved as printed rather than rebuilt inside commit(), against the project's own pin -- set as a draft on the version the way the app saves one -- with the pinned part where it was pinned, in the version and in the design written to --out. Then the stages on their own: --route-only is one realise() call with every part of the version handed in as fixed where it was and one candidate, the version says what it is, the saved design carries no part codes and the board records that its placement was given; --route-only without --from is refused; --sim-only makes no build and no version and its exit says whether there was a simulation |
test_mcp.py | the pipeline as an MCP server (mcp.py): the transport in process through two pipes -- initialize echoes the client's protocol version when it is one we speak and answers our latest otherwise, ping, tools/list names the fourteen tools each with an input schema, an unknown method is -32601, an unknown tool -32602, an unknown resource -32002, a line that is not JSON -32700 and the next line still answered, a notification gets no reply, resources/read hands back DESIGN_SCHEMA itself, a call whose arguments miss the schema is a tool error the model can read, a progress token brings progress notifications, the result comes as text and as structured content and they are the same thing; then the tools called directly with the resolver, the stock sweep, the 3D fetch and the router stubbed as test_cli_build.py stubs them: a design refused by field and path with every fault named at once, a sound design resolved and priced with nothing placed, a bad constraints block refused as the app refuses it, place as one realise() and one placement with nothing routed and no fab output, a placement of the caller's scored with its coordinates untouched and two parts on one spot named as overlap, a placement short of a part or off a quarter turn or naming a ref the design lacks refused by ref, build as one realise() and one placement through the one router loop with the caller's placement pinned whole into the block the version records and the outline fixed, verdict reading it back, rebuild as a new version and route_only handing every part in as fixed and saving the version's own design rather than the copy the parts were pinned onto, a partial placement as pins, a version's file as a resource and a path that climbs out of the version refused; the catalogue for a chooser: a component carrying lcsc passes the check and one whose code is not a code is refused by path, search_parts with a kind is the resolver's own ladder for a component written that way with chosen from a one-part resolve and without a kind the text search with nothing chosen, a value without a kind refused, pins as resolve.pinout on the wire with the design line pinned and a missing code a refusal; a search result and a pinout as lines (tables.py) decoded back to every row, price, flag, chosen mark, design line and note, the wire carrying the lines without structuredContent beside them and format: json the JSON with it, a refusal staying JSON and marked as an error; and the real process, python -m soldermask.cli mcp spawned and spoken to over its pipes, every request answered and nothing but protocol on its stdout; and the server calls no model: every backend stubbed to raise, design_brief is the design stage's own system prompt and accepted schema with the prompt's constraints read, a bare-prompt build is refused at the schema and in the tool with nothing built, and backend is no longer an argument; and nothing inside it calls one either (SOLDERMASK_MODEL_CALLS=none, as the server starts, with the network allowed and a Jev key present so only the switch stands in the way): a pin table not on disk is not transcribed, fetched or cached, Jev is not available and a stored answer of its is not read, a design backend refuses as a missing key does, status says none and the instructions promise it; with the switch lifted, Jev and its stored answer are back and status and the instructions say so; the spawned server promises none though its environment allowed models, and SOLDERMASK_MCP_LOG holds one line a tool call with the arguments sent, the text returned, the seconds and the error flag; a capacitor missed in the 0603 search_parts tries when no package is named is told to name one, and not when 0603 was asked |
test_mcp_http.py | the MCP server over HTTP (mcp_http.py), run with model calls off as soldermask mcp --http starts: keys issued with the prefix and stored as a digest in a file that is the owner's alone, looked up, refused when wrong, absent, unprefixed or revoked, a second key under a live name refused, bad names refused, rows without the digest; the door -- no key is 401 with a Bearer challenge, a foreign Origin 403, a protocol version we do not speak 400 naming the ones we do, a body that is not JSON -32700 in a 400, one that is not a message -32600, GET 405; sessions -- a request before initialize 400, an unknown session 404, initialize 200 JSON with a session id and the protocol the client asked for, a notification 202 with no body, one key's session under another's bearer 404, DELETE ends one; the wire -- ping as JSON, a batch as a JSON array in order, an unknown method a JSON-RPC error in a 200, a tool call an event stream carrying the session id, a client that accepts only JSON given JSON; the tools with the resolver, the sweep, the 3D fetch and the router stubbed as test_mcp.py stubs them -- status naming the transport, the key and the key's own directory and not the cache, check_design's progress notification then its answer, a build as one realise() saved in that key's directory with progress on the caller's token counting from one, config.PROJECTS reset after the request, projects and resources/list seeing only their own, another key's board "no such resource", fab.zip the Gerbers, drill, BOM and CPL as a blob and no JSON, verdict carrying the same resources; the precedent's placement withheld under GPL-3.0 and no licence found and handed over under MIT, permissive() on the bank's spellings; the build slot -- a heavy tool with no slot says it is waiting, keeps the stream alive, gives up in the time it was given, a light tool runs meanwhile, the heavy one runs once the slot is free; the source -- Remote subclasses Server and calls no stage, the command line dispatches --http and keys; the real process spawned on a free port -- initialize over TCP with a session id, a tool call as an event stream whose first bytes arrive before the answer, a stale session 404, the banner; and keys add/list/revoke on the command line |
test_gnm.py | a board's state as gnm text (gnm.py): the token census's encoder in every form -- full, minimal, decimal millimetres, 0.001 mm, with copper -- decoded back to its source on a board written to break it (refs, nets and pins with spaces, brackets, quotes, commas and dots, a pin called 3.3V beside a 3.3V rating, parts on the back, angles of 22.5, 45, -90 and 359.99999, a part off the outline), a pin with a comma and a ref with a space kept out of a pin group where either would read back wrong, and tools/tokens_ab.py importing the package's encoder with no copy of its own; the three hand-written fixtures resolved and placed by the placer and round-tripped in every form, searched and coded, and their MCP placement through the answers' gnm block and back to the micrometre (skipped, and said, where the catalogue is not on the machine); the answers' millimetres to the micrometre with the zeros off, a part seated at 1.905 staying there where 0.01 mm put it past the edge; a gnm text read as a placement -- from its gnm line on, so a whole result or a code fence reads the same, unit=mm as decimal millimetres -- and refused, with the line, when it carries nets or copper, places nothing, has a coordinate that is not a whole number of its unit, a word after the side, no header, a part line outside a section or a part placed twice; place, score_placement and build over the wire with the resolver and router stubbed as test_mcp.py stubs them: format on all three, the legend once on build, placement taking a string; lines by default without structuredContent, JSON with it on format: json, the lines decoded back to the JSON result exactly, the placement to the micrometre; a gnm block or a whole lines answer taken as a placement and scored as place scored it, and refused by ref where a line's kind or pinned code is not the design's, a turn is not a quarter, a ref is not the design's, a line is unreadable or a part is missing; a build's hand copper in the gnm block, marked by=human as the build marks it, and read back into constraints.tracks and vias; a refusal still JSON and marked; the HTTP door's resources in the lines and read back; and what the renderer has no table for as a line of JSON, strings that look like something else staying strings |
test_front_half.py | the front half of the pipeline on what the 11 Sep 2026 suite failed on, one check per spelling or rule: a vendor-decorated pin name resolves by its token (PB0 in (PCINT0/CLKO/ICP1)PB0, PD0 in PD0-OSC_IN) and a token that is a number, a letter or a prefix never matches; a token on two pads is refused with both names; six spellings of an inverted pin find each other and NC is not C; an en-dash, KiCad's _, a separator inside a name and a polarity sign at either end are one pin; V+ finds VS+ and IN does not; a supply on several pins (GND ×4, VSS_1..3) is every one of them and a signal on several is still a choice; USB-C positions map to the standard and a connector asked by position finds its function, an IC is not asked; a two-pad switch and a two-pin crystal take 1/2 and a four-pad one does not; a connector's merged pads join their net and a group on two nets is left for the ERC; SOP-16 is SOIC-16; ranked() is best() and the rest; a named part is named, a value is not, and a substitute package still has to be the part; a single-row header is searched by its grid; a relay has no ground pin to miss, a split-rail amplifier returns to its negative rail, an untied GND pin is still the finding and a part with no symbol says it cannot tell; a rail fed through a switch, a FET or a diode is driven, a capacitor is not a source, and an untyped regulator output is not proof of nothing. Then what the local catalogue's first live day found (15 Sep 2026): a measurement (2.54mm, 100R, 4k7) is not a part number and is not searched on its own, where a JEDEC number (6N137, 1N4148) still is; a near number differs by letters only, so REF3020 is not REF3025 and an RS-485 transceiver is not the CAN one a digit longer; a value pick is held to the listing text, 22Ω is not 100Ω and a listing that states nothing is not refused; a search outage on the package-filtered lookup does not skip the unfiltered one; and an IDC or IC socket on a 2.54 pitch is not a header. Since 8 Nov 2026: a pad no name reaches (the second pad of a name a vendor symbol repeats) is taken by number on its own net (an INA128's RG) or tied on the name's net with a note (a USBLC6's I/O1), a number a name does reach is still refused, a transistor's leg stays on its name's net, and a motor driver's VS and VM tie every pad |
test_enclosure.py | the enclosure research tool (tools/enclosure.py, 11 Nov 2026), its plan and not its solid (build123d lives in its own venv): a board file's outline, footprints, turned courtyards, sides, mounting holes and heights are read; an edge connector gets a window in the wall it faces, as wide as its courtyard plus clearance and as tall as its body; a connector set back from the edge opens the lid, a button gets a hole and an LED a 2 mm light hole; the floor clears a through-hole part's pins, the ceiling the tallest part; a resistor asks nothing of the case |
test_widen.py | the thin route's widening and the heat judge (widen.py, 11 Nov 2026), with no router: a segment with room reaches its net's width and one by the edge keeps the edge rule; beside another net's track, pad or via it grows to the clearance and router.violations() finds nothing; another layer and its own net are no obstacle; two wide nets side by side share the room; a polyline keeps its ends and joints and never narrows; a shoulder is laid on the free side of a segment held on one, overlaps it, and the union reaches the width legally; hand copper (skip) stays; a keepout is not entered; pad_seg matches the router's sampled measure on rotated, rounded pads; runs names a narrow run with its length past the neck and the run's rise, says nothing of a neck, reads width across the copper (a shoulder counts, once), and the two heat models hold: conduction goes as length squared and a long run is IPC-2221's |
test_wire.py | the wiring turn (wire.py), with no model and no catalogue: the pins offered are addressable() names, once each, a polarised two-terminal part as A/K rather than by pad, with or without a vendor symbol, and the resolver landing A, K and the vendor's C on their ends, a bare 1 by position and marked when the part numbers its cathode 1; the strict schema has one property a part and one a pin, every pin required, additionalProperties: false at both levels; either form of answer becomes nets and under the relaxed form a pin the part was not shown is refused and said in unsupported; a net the answer leaves with one pin is kept so the build reports it and the verdict counts it; the draft's voltage and current fill what the answer leaves null; replace re-searches a part, puts the rejected code on its avoid list, leaves a pinned pick alone, and the resolver skips an avoided code; wire() with the call stubbed makes one call, a second after a replace and never a third, takes no call under only_if_needed when the draft resolved whole, falls to the relaxed schema when a backend refuses the strict one, and leaves the draft's design with error set when the call fails |
test_evaluate.py | the evaluator builds through workspace.realise(), once a board, and scores the verdict it stamped: the source imports it and never places, routes or plots on its own, and the route helper it used to call is gone from repair.py; a scored board is one realise() call and one placement; the row's fields are the verdict's and the row passes exactly when it does, with a disagreement refused as a harness fault rather than counted; the Gerbers handed to gerbonara carry the build's copper; --repair builds the control the same way, in its own directory; a saved design is named by the prompt's place in the suite and a replay finds it there, falling back to sorted position for a directory from before the index and saying so; and a --tier run numbers its designs by the whole suite; and --rescore: a stored run re-read under today's rule from what it recorded, the hollow pass turning and the clean one standing, the first files kept beside the rewritten ones, a second rescore changing nothing, and nothing built |
test_conditions.py | the board under conditions (conditions.py), on circuits worked by hand: where each rail comes from (a USB receptacle, an adapter's terminal, a coin cell, a li-ion cell behind a charger; a motor output and a header on a rail the power path feeds are no inputs; a rail behind a fuse and a reverse-polarity MOSFET is fed through them); that a World changes nothing until it asks, then puts a source behind its lead, ESR on each capacitor, a stepping load, a corner and an LED's drive in the deck; an enable a part with no model drives is assumed on; a TVS breaks down at its catalogue voltage; an AC sweep's complex raw file read as magnitudes. With an engine: 100 nF on a 12 V adapter rail rings past a 16 V capacitor and a 100 uF electrolytic damps it; a coin cell under a step drops a rail under a chip's minimum; an LDO with its enable on ground never turns on and one pulled up does; an AMS1117 on li-ion drops out before the cell is half gone (a fail) and a 120 mV LDO after (a note); a blue LED on 1k from 3.3 V is dim at the low corner and a red one on 330 ohm is not; an LED a module drives is lit through that pin; 10 uF into 32 ohm rolls off near 500 Hz and 470 uF near 11 Hz |
test_spice.py | the circuit simulated before it is placed: a resolved netlist becomes a deck with ground at node 0, passives from their values, the LED pointed the way the resolver's A/K say, a linear regulator as one behavioural source from its part number (with the numbers' provenance said), a two-pin switch closed and said, a part with no model named with its reason and a part on no net absent rather than said twice; a feedback pin held at its reference so the divider sets the output (not 1.25 V above it), a buck driving the rail past its inductor and a boost the rail past its diode, a diode whose cathode is named C in the deck, and a voltage that opens a range (an AP63205's 3.8V~32V) never read as a converter's output; the stimulus is the design's own -- a declared rail steps from zero, a declared current is a load, a regulator's rail is checked rather than sourced -- and no ground or no declared rail is refused with the reason; the raw-file reader reads both forms ngspice writes. With an engine: the fixture LDO settles where Ohm's law says and the LED draws what its resistor allows, a rail the regulator cannot reach and an LED past its rating are gaps, an LED on an unmodelled GPIO is not simulated and a dim one a note, a deck ngspice rejects comes back with the engine's reason, and the scope's file has the shape the page checks; without one every engine check is skipped and says why. Then realise_netlist() writes sim.json when handed a simulation and nothing when not. Since 8 Nov 2026: the 78L and 78xx dropouts, a power-bank chip left unmodelled and a PMIC-filed LDO not, the record's electrical feedback reference over its absolute maximum, a TP4056's current at 1 k (a fault) and 2 k against a declared 0.5 A (a note), and a 3.3 V chip's enable pulled to its own rail (nothing) and to 5 V (a gap), with a reset button on the pin or not |
test_rack.py | the build's knobs as constraints: rules.seed, rules.pour, rules.precedent taken and refused by name; macros_of() picks the knobs out of a block and with_macros() writes a variation's over one, every knob it carries set and every one it does not carry cleared, the pins untouched; pour and precedent ride on the netlist; realise() takes its seed from the block when the caller gives none and the caller's when it does; a block that says no pour gets none and a note; one that says no precedent asks the corpus for nothing to seed from and still lists the precedents |
test_router_wall.py | the wall behind Lightcycle's clock (router.WALL_S, 12 Nov 2026): with worker processes allowed, a solve stopped at the wall is a router that did not run, with no copper and a gap that says so; a solve behind the wall that finishes lays the in-process solve's copper exactly; with one retry worker the solve stays in-process whatever the wall. Its body is under a main guard, so a spawned worker that imports it again runs nothing |
test_route_race.py | the placements' race in processes (workspace._Race, 13 Nov 2026), on a four-resistor board routed as traces: with worker processes allowed and three placements shown at once, the race keeps the placement, the copper, the attempts recorded and the notes and gaps that the one-at-a-time loop keeps; no placement's process is left running; and a placement whose process dies is routed in the main process instead. Its body is under a main guard |
test_router.py | Lightcycle lays legal copper and reaches every pin or names it: every board is checked by router.violations(), which measures clearance plus both half-widths, no via in a pad and the edge with exact geometry and shares no code with the search -- two resistors, a 0.5 mm-pitch chip with a resistor on every pin (and, with kicad-cli installed, that board judged by it with no copper error and nothing unconnected), a TO-252 tab drawn as overlapping pads reached as one, a plated hole with a 0.01 mm pad on a net reached, a walled-in pad reported unreached by name and not dropped, a 2 A net laid at its own width, a back-side part reached; the same board routes the same way twice; a watcher hears of every net routed, every round and the end last, and the copper it was last told of is the copper that comes back, and watching changes nothing; the problem carries the pipeline's clearance, edge, via and hole rules and a margin covering a diagonal step; rules.router: lightcycle lands in the block from the constraints and from a prompt, apply_constraints() puts it on the netlist at its own rule, and the attempt loop stamps its label and asks the A* router nothing, no second opinion, of a board left short; the search's heap closes cells in the order the lazy binary heap it replaced did, on a made-up search whose improvements come a key step higher as well as lower, which an f32 g allows (the Lightcycle wheel's own route_heap_check, reached through router._core(), on five seeds); a short board is routed again at the finer pitch, but not when both pitches coarsen to one pitch past MAX_CELLS; a board still short is routed again under each of RETRY_SETTINGS at both pitches with its own knobs, a pad none reaches is still named, a board left more than RETRY_SHORT pins short is not and its notes say so, one left more than RETRY_GRID_SHORT short is routed once at the default pitch, a whole board is routed once, and tandem's ranking pass does not retry. Since 11 Nov 2026, the thin rung (THIN_CAPS): a 3 A rail the ladder leaves pad-bound closes when routed thin, says so in the notes and the result's retried, its widened copper is legal by violations(), and it is widened back to its width where there is room. Since 8 Nov 2026, without the router installed: a path's stub ends just inside its pad, not at its centre, and keeps the rule from the pin beside it |
test_astar.py | the A* router's seam: it is pinned to one full commit and the recorded router name carries the pin; a missing checkout is reported with where it looked, and route() without the router does not run and is not a failed route; a checkout at the wrong commit is refused with what is actually there. The one check that routes is skipped when the router is not installed |
test_referee.py | the public bench's referee (bench/referee.py, 26 Sep 2026) judges what it is handed and leans on nothing it grades: it imports the standard library alone, and its default rules are the .kicad_pro the pipeline judges its own boards against at 0.127/0.127; its reader round-trips a written board and lands every pad where placer.pad_position() does, turned and on the back; the two holes in router_ab's judge, each on a board where the two judges disagree -- copper that closes four connections and adds three clearance errors (old judge: clean, 3 <= 4; referee: fail) and a stub whose "unconnected end" the old judge counted as an open net (old: fail; referee: pass, one stub); an entry contributes copper only -- a part it moved stays where the task put it, a blind via and a track off the copper layers are dropped and counted, a net the task lacks is named, a names-only task (KiCad 10) gets names-only copper, and every item the entry contributes carries the referee's own uuid; an error between two of the task's pads that the bare report missed is inherited, not the entry's (30 Sep 2026: KiCad 10.0.6 reported 0, 3 or 7 of one bench task's pad-to-hole errors run to run, and referee 0.2 failed a route for the ones its bare run missed), while a solder mask bridge naming only the task's items counts unless the bare task has it (KiCad names one of the items an aperture bridges, and named the task's pad for A*'s bridge in 14 of 24 runs); the placement track turns a moved part's pads as the writer would, turns a part over to either side whether the entry was written this tree's way (mirrored left to right) or KiCad's editor's (top to bottom and half a turn), and refuses a part off the outline, turned over on a one-sided task, fixed and moved, missing, with pads that are not the task's footprint's, or on top of another (a courtyard overlap, never inherited); the command line exits 0, 1 and 2; and a part's keepout travels with the part -- bench/tasks.py moves a connector's body keepout into its footprint, KiCad still enforces it there, and a moved or turned part's keepout lands where the writer draws it for the new pose, so copper where the part used to be is not judged against it; courtyards that overlap with no copper touching are counted (courtyard_overlaps) and not failed, while pads of two nets touching are; and an author's board made a routing task (bench/tasks.py): every track, via, pour, net class and group taken off, the keepout and every part left exactly as the author had them, an item on a layer the board does not name (Eagle's UNDEFINED) taken off, the canary stamped once beside the author's own title-block comments, and kicad-cli's rewrite in the current format moving no pad. Without kicad-cli the DRC half is skipped and said ; and the board track (12 Nov 2026): a board with every net closed and no error passes, an open net fails and says how many, overlapping courtyards fail, copper too close fails as a rule error, and of one footprint's own errors a gap between its pads, a pad by its own peg hole and no-net pads touching are its drawing while a short or a mask bridge between its netted pads, or anything between two parts or a pad and a track, still counts |
test_bench_v2.py | the held-out routing bench's own arithmetic and converter (tools/bench_v2.py, 4 Oct 2026): the exact McNemar test and the Wilson interval give the run's published values; the tscircuit converter negates y back, names a trace's net by its connection name or the longest task net it begins with (so SDA_PU is not SDA), joins a wire to the via that ends it on its own layer, writes once a via two pieces of one net both place at one point (the pilot drew six holes_co_located errors from that alone), counts and drops a trace that names no task net, and never writes a track under 0.127 mm or of zero length; and the post-hoc mask-fix arm drops exactly the netless solder-mask strokes |
test_flow_bound.py | the flow bound's certificate (tools/flow_bound.py, 4 Oct 2026): the certificate's arithmetic gives the hand value and counts out a net no weights reach; weak duality holds, so on a graph where three nets fit no weights (200 random draws) force one; five nets across a cut with room for three force 2 and three force none; the cheapest tree reaches every pin |
test_route_limit.py | the floor's keepout geometry (tools/route_limit.py, 4 Oct 2026): the polygon signed distance is negative inside, right in value and blind to winding; a tracks-not-allowed area walls its own layers and not the other or the vias, a vias-not-allowed area the vias and not the tracks, and no keepouts leave the maps as they were; on the held-out task whose capacitor sits in a rule area the floor forces its two connections with keepouts and none without (skipped when the bench is not in .cache) |
test_reader_heldout.py | what the held-out routing bench (4 Oct 2026) found the file reader getting wrong, each held to what KiCad itself does: copper text boxed off its anchor by its justification (left runs right, right runs left, top runs down, bottom runs up, mirror flips the run) and turned by its angle, ${REFERENCE} and ${VALUE} sized as the part's own, a footprint's property text read where it is drawn on copper or mask and hidden text skipped in all three of KiCad's spellings; a zero-width mask stroke no obstacle, an empty mask window crossable by one net and given to the net with the most copper when a route puts two in it (KiCad 10.0.6: one net across an empty F.Mask rectangle is clean, two are a bridge), a window over drawn copper still a wall, a window over pads of several nets let in to those nets with MASK_SHARED on (the default) and a wall with it off, and one over a pad of no net a wall either way; and a pad's copper offset from its hole read, turned with the pad and the part, used by the router (copper row at the offset, hole row at the anchor), the walk and the writer, the written board reading back to the same copper and hole, and every pad with no offset unchanged; and the walk's box for a pad turned off the quarter turns holds the turned copper; and a footprint's or pad's own clearance read (the pad's over its footprint's) and kept by the router as the pad's outline grown by the difference, owned by its net, with no row for a pad asking less than the board |
test_copperjudge.py | the copper half of the second judge (soldermask/copperjudge.py, 12 Nov 2026), on boards written in the test: a thin track carrying the whole current fails and the same net's thin branch that carries none does not; two parallel tracks share the current; one via at 6 A fails where three pass; a pour carries 10 A that its 0.25 mm track could not; a track ending on another's middle, a widened end off the centre line, a pad on a rotated footprint and KiCad 9's numbered nets all join; a gap fails the path and a part with no pad on the net is unknown; a coupled pair passes, one spread 5 mm apart or 5 mm longer on one side fails, a short one passes, a half-routed one fails; four layers in the stack with nothing inside are not four layers; diff_pins pairs TXP/TXN, D+/D- and USBDP/USBDM and leaves a crystal and bare pad numbers alone |
test_grade.py | the model index's second judge (soldermask/grade.py, 27 Sep 2026) reads a board as ordered and its checks fail what they should: a part's value and class come from its catalogue row before the design's text (a resistor written 47k and ordered 4.7k is 4.7k, and task 010 fails the divider it makes); an LED's current spans its row's Vf range; a fixed regulator's output comes from its part number, an adjustable one's from VREF and its divider whatever it calls the pin, a part VREF lacks is unknown rather than the design's declared volts, and an inverting charge pump makes minus its input; the tags that went wrong on real boards -- a switching diode is not a switch, an LED driver is not an LED, a power MOSFET's G1/S1/D1 answer to G/S/D, a pin is found by a token of its name (PD0-OSC_IN, (PCINT6/XTAL1/TOSC1)PB6); the traps mutation found -- an LED with its anode grounded has no feed, pins named only by number are unknown, a rail fed through a switch or a P-channel's channel is supplied and one behind a reversed diode is not, a supply pin on a net nothing feeds is not powered, one ohm across 5 V is over its rating; the general checks -- SDA on ground fails while an address pin or a shared SDO/SA0 does not, an N-channel with its gate grounded is strapped off while a reverse-polarity P-channel is not, an LED turned round is not forward-biased, a power-path diode out of a regulator's input is reversed; the MCU helpers -- a crystal across XIN/XOUT through a series resistor at 12 MHz with load caps sized, the resistor on XOUT passing and on XIN failing, an optocoupler as an isolation barrier; a failed clause is declared only when unsupported says so; mutants() covers values, removals and shorts, catches a short to ground though ground is on the terminal, and leaves its board alone; and all sixty task files load, carry the evaluator's own prompt and tier, and neither raise on nor pass an empty board; and a board read from its KiCad file and BOM (board_from_kicad): footprints become parts and a part-less NPTH does not, an LCSC code from a footprint property or the BOM reaches its catalogue row, pins carry pinfunction where the file has it and the pad number where not, a rail's voltage is read from its name (3V3, +5VA, -12V, VBUS; none from VCC), the verdict is left unknown, and task 010 grades such a board as it grades our own; and what the first held-out boards found: a BME280 strapped for I2C may ground SDO while one in SPI mode may not, a WS2812 is an active part whose VDD on ground is unpowered, a cell or resistor with both ends on one net is shorted, a diode whose pins are numbers only has a direction the files do not give, and best() counts clauses and not the values a judge carries under _ keys; and what the hard held-out set's checks ran into (12 Nov 2026): a high-side switch's exposed pad on its own supply is its supply tab and not a misplaced ground, while one on a signal still is; a 100 µΩ shunt parses; an RJ45 is a connector and not an audio jack; a WS2812B-2020 is an addressable LED; a Hall switch is not a switch; an XT90 is a connector; a solder jumper is not active; an STM32F405 has native USB on PA12/PA11; ground reads 0 V under an adjustable regulator's feedback divider; an en dash in a pin name is a minus; and what a part's datasheet record settles (15 Nov 2026, the records stubbed): a supply pin only its own part and a capacitor touch is in place when the record calls it the chip's own regulator's output, failed when the record's words call it a supply input, and still unknown when the record says neither or the reader's audit did not verify the row; a chip pin its symbol only numbers takes the record's name, while a connector's pins are left alone; a regulator in no VREF table takes the record's reference voltage, never an absolute maximum on its FB pin |
test_index_agent.py | the model index's neutral agent (tools/index_agent.py, 27 Sep 2026) prices what it spends and talks to the real server without calling a model: every accepted model has a price row with output dearer than input and cache reads cheaper, and a call's dollars are its four token counts at those rates; a tool result's text is what the model sees, and an empty one is shown as JSON; Claude and Gemini models get their providers and any other is refused; a model with no price counts no dollars rather than zero; the MCP client starts the real server in a directory of its own, negotiates the protocol, lists fourteen tools, calls status (which reports the client's projects directory, not the tree's), reads the design schema, and the server logs the call where the client pointed it; and the review page's template carries the placeholder tools/index_review.py fills |
test_place_bench.py | the placement bench samples only boards the bank keeps (27 Sep 2026: 28 of the 24 Sep sample of 100 were files the bank's manifest excludes, 25 of them PCBench copies): on eight boards written in a temporary bank with a manifest excluding two, excluded() reads the manifest and passes over a line that is not JSON, and bank_boards() never returns an excluded board under twelve seeds while still filling its band from the six it keeps |
test_kicadpcb.py | a finished KiCad board read back as one this pipeline can place and route: y mirrored so the frame runs up, rotations kept, a pad turned a quarter turn swapping its width and height, a hole with its drill, nets from the pads, the outline from Edge.Cuts, a bottom part brought to the front, the DSN round trip; and the two opt-ins the public bench reads an author's board with (27 Sep 2026): custom_pads reads a solder jumper's custom pad as the copper its primitives draw (1.0 by 1.5 mm) where the default reads its anchor (1.0 by 0.5), at 0 and 90 degrees, leaving other pads alone; nudge=False leaves a part hanging past the edge where the file has it, where the default nudges it in; and a KiCad 10 board, which keeps no net table, reads a net named with digits alone ((net "0"), (net "12")) as that name, pads and tracks both, where a file with a table still reads a number as the table's net; and a file's rule areas (16 Nov 2026): one forbidding tracks or vias is read, a pour-only one is not, a footprint's moves with its part, *.Cu is every copper layer, and the router walls a track area on its layer and a via-only area on an inner plane off every layer for vias alone; and a custom pad shaped as a frame (a shield's ground ring) is read as its anchor, its polygon copper of its net, so a part inside it is not under it; and a logo opened in the mask, which no pad shows through, is one box the placer charges a part on, where an opening over a pad is not; a custom pad is drawn back about its anchor; and with a pad in a notch the router keeps the rest of the notch's edge |
test_import_kicad.py | a finished .kicad_pcb brought in as a version: the report says what was read (parts up from the back, snapped rotations, pad-free footprints dropped, the author's traces not read, a pour with nowhere to go); the design has every part and every net and is writable; it is a version like any other; and the gaps name the stages that cannot run |
test_pad_shapes.py | a pad is the shape its file says: ovals as stadiums, rounded rectangles with their radius, chamfered pads as their rect with a track ending only inside the inscribed arc; Lightcycle ends every track in a pad's copper, the KiCad file and the Gerber macro draw the rounded corners, and the walk does not count a corner ending as reaching the pad; with kicad-cli, a routed board of rounded and octagon pads is connected |
test_merged_pads.py | copper that touches is one node, whatever the netlist says, checked in ERC before the router: touching pads are one group and separated ones are not; a floating pad on live copper is an error and two named nets on one pad are a short; a correctly tied connector is quiet; and a wholly unused pair is not invented into a fault |
test_npth.py | a footprint's non-plated holes reach every file: EasyEDA's HOLE read onto Package.holes, written into the .kicad_pcb as np_thru_hole and read back at the part's placement (turned, and on the back), drilled in an NPTH drill file of their own with the mask open over them and not in the plated one, kept clear by the router wherever the part is placed, carried in board.json and held to JLCPCB's smallest non-plated hole; a plated slot (Pad.slot) read from EasyEDA's hole length and a KiCad file's oval drill, written as an oval drill and drilled as a G85 slot exactly where kicad-cli's own drill export of the written file drills it, turned and on the back; a board read from a file writes its holes back and KiCad drills them where ours does; kicad.verify passes a pegged part; a footprint's cut-out is milled |
test_file_fab.py | a board imported from a KiCad file goes to the fab as its file draws it: its outline edge for edge (a curve sampled, not boxed), its exact copper and mask art (a net kept, a part's own inside its footprint) in the .kicad_pcb and the Gerbers, read back the same and plotted alike by kicad-cli; copper text and the file's silkscreen counted into the gaps, not drawn; placed again, the box and the part's own art only; an imported board routed end to end; routed and placed again from its project, as the app does it, built from its stored file with every part, its outline and its art, where it had made an empty board |
test_file_geometry.py | a board read from a file is what the file draws: a pad with no angle is at angle 0, a pad on the other side from its part is read there, a mask opening wider than the clearance holds other nets off, non-plated holes, copper text, mask openings and a dropped fiducial's copper are obstacles, a shape in copper with a net is that net's to reach, and a notched outline keeps copper out of its cut-away; with Lightcycle, a board routed round all of it breaks none of it; on a placement that is not the file's, a part's own hole and copper go with it to where the file would put it, the board's own copper, a mounting hole of its own and the outline are left out, and a part placed on them is named |
test_tandem.py | placing and routing in one loop: a grown courtyard is the named parts' only and the board handed in is unchanged; a part's heat is the router's history under its courtyard, a part with an unreached pad is as hot as the hottest, and kept copper is never grown; every candidate is routed and the complete one in less copper goes first whatever the model said; when none is complete, three fresh anneals from the seeds after the last are routed and ranked with them, and none when every pin left is pad-bound; the repair keeps a round only when the router does better on it and stops when every pin is reached, grows the hot part, and does not re-place a board whose every pin left is pad-bound; SOLDERMASK_TANDEM=0 stands it down; and a build whose Lightcycle cannot run is not ranked by it but goes on to the attempt loop, where the ranking used to raise and take the build down |
test_abstract.py | a board's abstract: the chip and the connector are anchors, a decoupling capacitor goes to the chip it decouples though it touches the connector too, an LED's resistor and the LED follow the GPIO that drives them, a part sharing no signal is loose; a signal between two blocks is a link, a net inside one is not, supplies are rails biggest first; a placed block's box covers its members; the router's hottest tile is named by its block; the text reads back to the same blocks, members, links and rails, a net named with a space or a quote included |
test_router_choice.py | which router goes first is the board's to choose: constraints.rules.router takes lightcycle or krt, still hears the retired freerouting rather than refusing an older design, and nothing else, while the schema a model reads offers only the two; a prompt naming a router lands in the block; apply_constraints() carries the choice onto the netlist with Lightcycle the default, the A* router when named, SOLDERMASK_ROUTER for a board that names none and the board's own choice over it, freerouting named routed by Lightcycle with a gap saying it is retired, and a net wider than the track staying with Lightcycle; a router not installed hands the board to the other with a gap, and with neither nothing is swapped. Then the attempt loop, routers stubbed: a board routes through its router alone, stamped as that router's with no count of its own; a net left short gets no second opinion and the gaps name it; the other router takes a board the first cannot run on, with one gap; with neither installed the board is placed, not routed, and the gaps say so; a harness router is used as it always was; the poured path the same, not clean by the label's rule because nobody counted; and, with a router installed, one real two-resistor board through each, saying which router laid the copper |
test_rubric_report.py | the reviewer's rules graded on every board the pipeline builds: the geometry rules read a placement and the layout rules read the router's copper and KiCad's fill, as the measures the tool takes of a person's board; a measure becomes a verdict against the shipped lines and the professional reference (assets/rubric.json carries both, and battle/ holds no second copy); a bad grade is one note and a good grade none, a rule another stage already reports as a gap is not said twice, a failure that is the pipeline's says so, and the coverage line counts what was graded against the 82; an unrouted board grades on geometry alone; and realise_netlist() puts the grades on the board and the notes beside it without the verdict reading a word of them |
test_watch.py | the build placing, watched: placer.anneal()'s sampled callback reproduces the unwatched anneal move for move and ends on the placement returned; candidates(watch=) gives a watcher every seed's frames through the loop and, spawned, through the workers' pipe, the same frames either way, from one reader thread, and two watched runs on one pool at once each see only their own; workspace.anneal_messages() has the shape the page reads (the board, every part with whether it is pinned, every net as the parts it joins, a courtyard a part a frame, the parts on the back) and realise_netlist() opens, frames and ranks, sends nothing when every part is pinned, and builds the same board watched or not; the app's _Watch holds frames and lets them out batched, the ranking flushes them first, and the bus keeps none of it for a late joiner. Has a main guard because it spawns |
test_sizer.py | a roomy board cut down to its parts (placer.shrink_board()): on at 0.45 by default and off at SIZE_TARGET 0; board.size compact, balanced and roomy cutting in that order, read off a prompt ("as small as possible", "leave room around the parts", not "an STM32 minimal board" or "room for a CR2032") and refused by name when it is anything else; a board carrying mains kept whole (a net over 60 V, a part that says mains, the prompt's words) while an op-amp's isolation resistor, a level shifter's high-voltage side and a MIDI opto-isolator are not read as mains; a board near its target left alone, so a second build does not cut it again; the cut keeps the design's shape in whole millimetres and never passes the target; it stops at the largest part, the connectors' share of the edge, a pinned part, a keepout and 10 mm; board.fixed, a size read off the prompt (schema.size_from_prompt, with package sizes, keypads and a hat for a cat not read as one) and board.size_asked keep the size and say so; an imported board is not cut; and realise() cuts once after fit_board(), not for a handed-in placement, and writes the size back to the design |
test_spacing.py | the placer does not pack the board: the default air is the measured half millimetre on every board; on a board at 20% occupancy the anneal with the air forced to zero packs to a 0.00 mm median nearest-neighbour gap (the defect) and with the air leaves most of it, with no courtyard overlapping either way and every decoupling cap still at its pin, because a cap and its chip are one unit the air is not between; _Index.local() moves as _cost() moves with the air in both; _clash() with no air passed asks about the real courtyards, as seating does; and the room-derived value behind SOLDERMASK_SPACING_MM=auto follows the room, stops at its cap, is the root of the quadratic its docstring names, and is zero on a crowded board, which then anneals byte for byte as it did before the term |
test_fit.py | the board is big enough for its parts: occupancy counts courtyards; a crowded board grows, keeping its shape, until the parts fit, and the note carries both sizes; a sparse board is left alone; the anneal never turns a part off the board; copper over the outline is reported; and a part that fits on no orderable board reaches the gap list |
test_connector.py | a connector is used from outside the board: its facing is read off the shell; it is pulled out to the edge with its mouth off the board; a radio module sits flush and never over; a symmetric module and a part that is not a connector stay where they are; a switch is reported, not guessed at; seating never drives a connector into another part; and one that cannot reach an edge is a gap |
test_locked.py | a pinned part is exactly where it was pinned, rotation included; the free parts are still annealed and follow what they are wired to; a pin for a part not on the board is ignored; a fully pinned board has one candidate, marked as the caller's, and the model still rates it; a pinned board is not centred; and a board with nothing pinned anneals as it always did |
test_edge_clearance.py | copper is kept from the milled edge: a sane board passes and copper at the edge is rejected; the threshold is the fab's 0.2 mm, not ours; the measurement is pessimistic; the router's boundary is inset by the edge clearance less its own; and the placer keeps copper out of the band |
test_rubric.py | the placer's cost and the rubric's measures agree with each other: _cost() and _Index.local() charge the same (with an antenna keepout on the board too, through module moves and flips, and with the ESD term and the fine-pitch ring switched on, at the board's air and at none), the ESD term is on at 4 by default, finds one line a guarded signal net and charges it to the connector alone, and a two-pad TVS on VBUS guards its rail where an array's VBUS pin does not, the ring holds a fine-pitch chip apart from a stranger and not from its decap, and at zero neither term is built and the anneal is the anneal it was; wirelength is the plain half-perimeter and decap distance the cap's pad to its pin; untouched() sets a board aside for a snapped rotation and not for parts on its back (the reader keeps sides since 10 Sep 2026); scalars() survives a diff-pair entry the DRC half merged onto a board with no differential nets; designer_of reads battle/reddit/ as it reads a battle; and the Reddit miner (tools/rubric_reddit.py) counts a reviewer's remark and not the poster's reply, the moderator's pasted checklist or their boilerplate sentence, with praise read as good unless the sentence turns; local() moves as _cost() does with a file's board zones too; and with the pad-access term on (a part's hole shutting other parts' pads), local() moves as _cost() does through moves of the part that carries the hole too |
test_padaccess.py | the pad-access term (placer.PADACCESS_W, off by default): a netted pad on another part's hole pays the weight and one outside its band nothing, the charge only falls as the pad leaves the hole, a part's own hole never charges its own pads, rotation and the back put the pad where Placement.local says (all eight), the edge band closes the sliver a hole leaves beside the outline, and at weight 0 nothing is built (_Access poisoned) and an anneal with holes is the anneal without them, on each loop; switched on, a board with no hole anneals as it does off and the anneal leaves no pad shut |
test_genome.py | the fixed-stride board record: every quarter turn, both sides, a coordinate outside the outline and one finer than the 0.1um quantum, a vendor footprint the vocabulary has never heard of, and a part with no package at all — which is the one that was broken, reading back as a missing package because the decoder asked the string what it meant instead of asking the record. Then the failures that must be loud: a coordinate off the end of its field, an angle that is not a quarter turn, and a blob written against a different kind/package vocabulary, refused rather than mis-read. Then the graph half: nets bipartite and weighted by pads, a net reaching one placed part dropped, geometric neighbours symmetric and self-excluded, and the invariant that would fail silently — a part the netlist carries and the placement does not leaves the edges and does not shift the nodes after it. Then the CSR file, sliced back into the graphs that went in, and refused on open if either the vocabulary or the record layout has moved |
test_gnn.py | the graph judge: featurisation on boards made in the test (coordinates as fractions of the board, a vendor package folded to the spare index, the four edge columns, batches offset into one node table), the within-board metric on a case with a known answer, and the invariant everything else rests on — the numpy forward reproduces the logits of the torch network fit actually trained, on its own validation slice at the epoch it kept, to 1e-5; a graph scores the same alone and in a batch, the JSON round-trip, and a model file from another vocabulary refused; the Mendicant readings ride in the part and net columns and the crossings as net-to-net edges, features='base' zeroes them through the same path, and a graph from a file without them featurises as base; the pair objective ranks exactly the same-board (clean, failed) pairs, counted by hand, and refuses to run without boards to pair within. Skips the torch half, saying so, where torch is absent |
test_fold.py | the fold on cases known by hand: two diagonals are two chords that interleave and displace one, two parallels nest, a one-point net is no net and shifts no index, a net never crosses itself, and crossings names the pair of nets and counts the chord pairs cut — the edge the graph judge reads |
test_flow.py | the flow placer's projection (tools/flow_geom.py, the trial closed 11 Sep 2026), on the catalogue's synthetic boards: the integral image agrees with a brute count, and every board it returns has every part placed, no pad on another pad, no body inside another, nothing where placer._room() would not leave it and no copper past the outline; projecting twice is projecting once, the same input gives the same board, a pinned part stays pinned, and on an uncrowded board no courtyard is taken twice |
test_revision_pairs.py | the preference pairs mined from a board's git history, on a repository built in the test with the cases the pilot got wrong or never saw: five revisions of one file found through a rename, the path at each revision being the path git had then; of four adjacent pairs, the drop of a part and a commit that added copper but moved nothing both refused, and the two that moved or turned a part kept — the turn across the rename — with the licence and bank file riding along and a revision shared by two pairs stored once; a repository's pairs written before its own line so "done" means its pairs are on disk, a second run skipping what the first did; and the report's better/worse for a scalar being the measured sign of each change, with the exact sign test checked on known counts; then where a moved part went: toward its partner and toward the edge both read, no like gap without a like footprint, a row that exists before a move and not after, and the fixture's two pairs coming out with every hypothesis tallied and the move counted under its kind; and the weight fit on synthetic pairs whose preference is driven by decoupling — the pair that moved nothing dropped, the lower-is-better scalar signed so positive is better, decoupling taking the weight, and the held-out fit beating wirelength alone |
test_deeppcb_board.py | a board DeepPCB shares, read as ours, on a board written in the test: microns to millimetres with y turned up, a polygon, a rectangle, a path and a circle padstack each read to its box, a through hole told from a surface pad by the layers it lists, a pinless footprint dropped, GND ground and a class net power, pins split at the last dash, the plane nets and net classes carried beside the netlist, DeepPCB's own copper counted, a plane net taken out of the problem, and the via a plane owes each surface pin |
test_pair_annotator.py | the pairwise annotator's parts that can be wrong quietly: the drawing a page is handed (a turned part's courtyard turned and its side kept, through-hole pads flagged, a three-pin net as two spanning-tree edges and a one-pin net as none, coordinates to a hundredth, and the page carrying drawings and never scalars); a person's later answer replacing their earlier and a skip not being a label, from a jsonl or a directory of documents; and the fit on synthetic choices driven by decoupling — the chosen side better on it and worse on grouping by the same count, wirelength even, decoupling weighted positive, held-out choices predicted, a ratio to wirelength refused while wirelength's own weight straddles zero, and two people on one pair counted for agreement |
test_rubric_within.py | the within-board rubric test's arithmetic on known numbers: the AUC on a perfect, a reversed, a tied and a mixed order; the sign of a scalar under each direction; and which stored examples count as a board's anneals — not a short anneal, not the author's placement, not a timeout, not a disputed label, not one without a placement, not another clearance rule |
test_exa_boards.py, test_board_formats.py | the board bank's front door: which URLs in a page are repositories, a candidate written once, a licence off its first lines, the fetch against a fake GitHub and against a repository on disk over git, a board's name never handed out twice, a held-out board refused by content. Then the formats kicad-cli imports: which paths are boards and which are panels, a repository the .kicad_pcb-only sweeps marked no-kicad while counting Eagle files in it a candidate again, the format read off a file's bytes rather than its suffix, the net table the importers leave out written back, a real Eagle board converted and read as two layers with its nets, --merge growing a bank without renaming what is already in it, and the four-layer bank: a table that lists more copper than the board carries read as the layers in use, --layers 4,6 admitting what the two-layer rule turns away and --skip-kept reading only that, its DSN declaring four layers for the router, and corpus.find_dsns() walking past a bank whose layers.json says so unless it is the directory asked for. Says so, and does not fail, when kicad-cli is absent |
test_precedent.py | a board somebody already built for this design, against an index written by hand: a part number is a token and a pitch, a size or a voltage is not; 10k reads as 10K and 10kΩ; a connector's position count is read from its name; the breakout that IS the design outranks the product that contains it and the keyboard that shares its regulator, and a board six times the size is not a candidate; the seed comes back keyed by the design's refs at the corpus board's coordinates, a human's pin wins, a fixed board size is kept; the switch and the bar withhold the seed without the listing; a missing index leaves the build as it was; and board.json carries the precedents |
test_silk.py, test_insignia.py | the legend layer: every part labelled and no label on a pad; the maker's mark placed once and filled the same by the Gerber, the .kicad_pcb and the viewer, with its ISO 3098 lettering thick enough for a fab and every glyph a simple polygon |
test_skeleton.py | the board's skeleton for a terminal (skeleton.py, style.py): the raster puts ink on the outline's four edges, a pad's edge and not its centre, along a wire, dimmer on a back pad and back copper, faintest on the pour, and nowhere outside the margin; a board from before the geometry keys (no shape, silk, court, via d), an unrouted one (ratsnest) and an empty one draw without error; png() is an RGBA PNG with the coverage as its alpha and a CRC a reader accepts; braille() is cols wide, braille or space, the outline one row of dots; style.inline_image is Kitty's chunked form (keys on the first chunk, q=2, m=1 until the last, the PNG whole) for Ghostty/Kitty/WezTerm, iTerm2's OSC 1337 for iTerm2, and nothing for a pipe, tmux, NO_COLOR or Terminal.app; style.label pads to the stage column by at least one space, or none at width 0 |
test_silk_outline.py | the part's drawing: the vendor's silk read at the unit each primitive arrives in (tracks raw canvas, circles mm), y flipped, arcs flattened to the curve, text and other layers left out, the pen floored at what a fab prints, the extent covering every primitive; generated silk clear of every pad and inside the courtyard on every package in the catalogue, a chip's two lines, a diode's cathode bar, pin 1's dot nearer pin 1 than any other pad; and the Gerber, the .kicad_pcb and board.json carrying the same strokes, a back part turned a quarter turn included |
Browser checks
tools/snap.py loads any page in headless Chromium over the DevTools protocol, runs JavaScript, screenshots it and reports console errors — with nothing but the venv's websockets, no Node toolchain:
.venv/bin/python tools/snap.py https://localhost:8443/p/sensor-rail/v004 out.png \
--eval "setView('3d')" --eval "three.picks.length" --mobileIt finds the Playwright Chromium cache or SNAP_CHROME. Exit status is 1 when the page threw. Every screenshot in this manual was taken with it.
node tests/verify_3d.js path/to/inspector.html (needs playwright-core) measures the 3D scene of a standalone export — parts drawn, model versus primitive, heights — instead of looking at it.
.venv/bin/python tests/verify_scene.py does the same for the copper view, over the DevTools protocol like snap.py and with no Node toolchain. It renders five boards — the widest built, the densest routed, a mid-size one, one carrying a congestion heatmap, and a poured board written by today's export.py with pad shapes, via sizes, body, courtyard and silkscreen strokes per part (the first four carry none of those keys and hold the picture a board built before 15 Sep 2026 still gets) — and in eight layer and selection states writes down every primitive drawn with its geometry, resolved paint and effective opacity, then compares that to tests/scene_golden.json.gz. The boards travel with it in tests/scene_boards.json.gz, because projects/ is the user's work and is not in git — --bundle rebuilds those fixtures from projects/ on disk, and naming a board.json on the command line runs that board instead. --update rewrites the golden; do that only when the picture is meant to change, and say in the same commit what changed.
The ratsnest is the one thing the golden does not own. It moved into the overlay and became a spanning tree rather than a star, so the recorded picture stops at the edge of it — the dashed lines are struck out of both sides, everything else must still match in order, and the lines themselves are judged against the definition instead: one per net, over that net's live pad positions, exactly one fewer than there are distinct positions, every end on a pad, and connecting all of them. That is a stronger claim than a golden could make.
The golden cannot carry what the scene refactor was actually for, so the same run asserts it directly: a layer toggle and a selection keep the same SVG node, a new board replaces it, a part lifts into the live group and drops back exactly where it was, pan and zoom mutate one attribute on one node and emit no children, hit tests answer from the spatial index, and — with real browser input rather than synthetic events — a wheel holds the board point under the pointer while a drag pans without selecting whatever it finished on. Two passes then dispatch real input rather than synthetic events. The mouse one drags a part across the board and checks what the gesture does to the document and to the picture: the part lifts into live, its copper ghosts and its ratsnest lights, the drop writes a pin (within a pixel and a half of where it was aimed — a dispatched pointer lands on whole pixels, and a pixel is worth more millimetres on a 100mm board than on a 25mm one) rather than moving anything in the built board, the mark appears, the ratsnest follows, the staleness bar comes up, the save goes out debounced as a PUT to the constraints endpoint, and one drag is one entry on the undo stack that restores exactly what was there. It also sets a pad down 0.4mm short of a pad it shares a net with and requires the snap to close the gap exactly, because snapping is electrical and the claim is that a pad lands on a pad it is wired to. A fourth drives the scope and the gate: that nothing selected means the whole board, that picking parts and a net names them as chips and draws every one of them chosen, that a chip drops one back out, that an instruction against a built board goes to /propose carrying the scope rather than to /chat, that the proposal is shown on the board rather than described, that discarding writes nothing and puts the board back, and that accepting is the only thing that makes a version — with fetch replaced by a recorder, so every request the page would make is inspectable and none of them leave. A third drags a symbol on the schematic sheet and requires the drop to write constraints.sheet, the symbol to end up somewhere it was not, the mark to appear, the wires to still reach it where it landed, and one undo entry to put it back — the sheet has no persistent scene, so this is also what checks that redrawing it whole per frame keeps the gesture. Two more passes cover routing by hand. The board one enters route mode, clicks a pad, a corner in open board and a pad on the same net, and checks the track that results: one track on the net of the pad it started from, at that net's own width, landing on both pads, every segment on an axis or at 45, drawn on the board and going off with its layer -- then that a flip lays a via and crosses to the other side, that undo takes the track and the via back as one entry, and, the part that matters, that the copper went out as a PUT to the constraints endpoint rather than staying a picture. It picks its own pads: the closest pair on one net whose three click points are all comfortably inside the window, with the corner far enough from every other pad of that net that the click lays a corner instead of finishing the track on one, because a test that picked otherwise would be measuring the viewport. The sheet one drags a net's trunk onto another lane and requires the same of it -- the lane held through the redraw, marked as a decision, saved as a constraint, and undone back to where the sheet had put it -- and then does it a second time, which is the whole point: the sheet rebound its pointerdown handler on every redraw while pointermove and pointerup kept watching the first closure's copy of the gesture, so every drag on the sheet worked exactly once per page load and then silently stopped. The old pass dragged once and passed for as long as it did.
A further pass covers picking things up and taking them away, and each of its claims is a complaint with a measurement behind it. The hover: a real mouse move over a part outlines that part and nothing else, a press takes the outline away because the question has been answered, and bare board answers with nothing — driven through elementFromPoint, because the board is full-bleed and the two floating panels sit on top of it, so a part can be drawn, be in the index, and still be somewhere a real pointer lands on a panel instead. The hit rule, asked on an index holding only what each question is about: a box far bigger than a small part and drawn after it does not win (which is what a 40-pin header's label did to the passive beside it), a part under twelve pixels on screen answers to a point outside its box up to that minimum and no further, and a part over it gets no margin at all — because bare board beside a chip has to stay bare board or a pan that starts there picks the chip up. The keyboard: an arrow moves the picked part exactly one grid square and shift-arrow ten, it is drawn where the pin says and pinned by having been nudged, and three keystrokes are three undo entries of which one undo takes back exactly one. The snap: a drag lands a pad on the pad it is wired to, and the same drag with alt lands exactly where the pointer asked. And the copper: a track you drew can be pointed at, is coloured picked by a render rather than only when the constraints change, says in the panel that it is yours, goes with one Del as one undo entry, comes back with one undo and goes out as a PUT to the constraints endpoint — while a track the router laid is not deleted at all, and both the key and the panel say why, since the next build derives it again and taking it off the screen would change the picture and not the board.
The touch pass runs with pinning off, as a standalone export does, and covers the view gestures: that the board owns its touches rather than losing them to a pointercancel two moves in, that one finger pans and two pinch about their midpoint, and that a tap still selects while neither gesture does.
The evaluator
.venv/bin/python -m soldermask.evaluate runs the fixed prompt set through a backend and scores pass@1; see Repair loop and evaluation. eval*/ directories in the repository are previous runs and are ignored by git.
Other tools
tools/backfill_models.py [project]— add 3D models to versions built before models were part of a build.tools/gitbook_summary.py— regeneratedocs/SUMMARY.mdfrommkdocs.ymlfor GitBook.import_footprints.py— buildsoldermask/assets/footprints.jsonfrom a KiCad footprint corpus.mine_blocks.py— two miners, intopriors_blocks.json.mine(root)reads.kicad_schfiles for idiom — what tends to be drawn beside what, by proximity, because a schematic stores geometry and not a netlist — which is what feeds the prompt.export_library(root, out)reads.kicad_pcbfiles for structure: a board names the net on every pad, so a block comes out with real connectivity and real ports. Membership is decided by the circuit (every pin of a passive on a net the IC is also on) and confirmed by the layout (within 15 mm), because neither test alone is enough — connectivity lets a module that touches every net swallow every cap on the board, and proximity cannot tell a decoupling cap from the part next door.tools/revision_pairs.py harvest | report— preference pairs from the git history of the boards the bank already holds. The bank was fetched at depth one;harvestclones each repository again without blobs, follows every board file through its history and renames, and keeps each adjacent pair of revisions by the same designer that kept the part set and moved a part — a label nobody had to be asked for, weak but signed: later was preferred. Written as it goes to.cache/revision_pairs.jsonland resumable; the two revisions of a pair kept gzipped under.cache/revision_pairs/soreportmeasures them with the rubric as it is on the day.reportasks the one question the pairs can answer: across pairs, does each rubric scalar move the way the rubric says is better, by the exact sign test — a scalar that cannot see what designers changed cannot be fitted to them.movesasks the parts that moved where they went — nearer a wired partner, a neighbour, a like part, the edge, a regulator, into a row — and the board whether it untangled, each a candidate for the scalar the rubric lacks.fitasks what weights would make the later revision score better as often as possible, held out by repository and reported per millimetre of wirelength against the placer's own constants; on the real pairs it cannot tell hundreds from nothing, which is the finding.tools/rubric_within.py— can the rubric tell one board's own anneals apart, and does its order mean anything: on the corpus's stored anneal placements, for each scalar the fraction of boards whose anneals differ and the within-board range beside the between-board one; the within-board AUC against the router's clean where a board has both verdicts; and of all pairs of a board's anneals, how many the rubric decides and how many are trade-offs, the pairs a person's choice can price.tools/rubric_reddit.py— what r/PrintedCircuitBoard's reviewers raise, counted per catalogue rule as the share of review threads in which a commenter other than the poster said it (a sentence lexicon, one pattern a rule, read at ~74% topical precision on 80 sampled sentences: the rank is the evidence), plus what they raise that no rule named;--fetchclones the repositories those threads link at the last commit before the post,--boardswrites them asbattle/reddit/in the battles' shape sotools/rubric.py --calibrategrades them with the same code,--drafts boardswrites every comment of those threads for a reader. A remark is a mention until a reader confirms it inreview.json'sconfirmed; 14 were on 17 Sep 2026, 9/14 agree. Readspitch/research/reddit/, writes.cache/rubric_reddit.json.tools/pair_annotator.py select | fit— two placements of one board, a person choosing: the label that prices a rule.selectpicks trade-off pairs from the stored anneals (one a board, each differing scalar's gap at least half the median within-board range) and writes.cache/pairs/pairs.json(scalars and sides) andpage.html(drawings only), which is published as an artifact with thedbcapability so every viewer's choices land in one store, one document a person and pair.fitreads the labels back — a directory of documents from the Artifact tool's read_db, or a jsonl — and reports which side won on each scalar, agreement between people, and the weights under which the chosen side scores higher, held out by board.tools/crystal_ab.py— whatplacer.CRYSTAL_Wdoes to the crystal, to the rest of the placement and to routing: held-out boards with a crystal wired to a chip annealed at a sweep of weights, every placement routed under both routers, the far-pin distance, decoupling, wirelength, courtyard clash and clean rate beside each other, paired McNemar against weight zero; written as it goes.tools/deeppcb_board.py fetch | route— a board DeepPCB shares, read as one of ours through the app's public endpoint and routed with this tree's routers under KiCad's judge: the plane nets taken out of the problem as a plane takes them out of DeepPCB's, a via counted for every surface pin on such a net, the placement graded by the rubric, and DeepPCB's own via and track counts kept beside ours.