Skip to content

ecadlib 0.4.0

Latest

Choose a tag to compare

@oliBrowne oliBrowne released this 29 Oct 04:52
· 61 commits to main since this release
c4bed9f

The first release since 0.3.1. It writes files 0.3.1 cannot read (librarian_state v3), so it is a minor release. Highlights: the release gate (only parts that pass the release check publish), change control (ecadlib part), the live accuracy benchmark at 87 of 110 parts fully right with none built wrong (docs/benchmark.md), ecadlib nexar signin, ecadlib mcp --http, and the time and review lines in ecadlib status.

Added

  • A dimension printed as a nominal with two one-sided tolerances is read as min/nom/max in either order, including an unsigned zero side: "0.7 +0.1/0" (JST's board hole) is 0.7 to 0.8 mm, "3.56 -0.25/+0.15" reads like "3.56 +0.15/-0.25". An unsigned non-zero side ("0.7 +0.1/0.05") stays unread, since it could mean either way.

  • An answer the parser rejected is kept (datasheet_results/rejected/), and a later parser that reads it uses it with no new read, so a parser fix can be re-scored for free.

  • When an answer leaves out a maker's land that its pages print (or TI's PowerPAD thermal land), the one feedback turn names the page and the land fields, so the part can build instead of being held. A saved batch answer gets that turn in a later live run too; --cached-only never sends it.

  • pypdfium2 is now a core dependency, so [datasheet] zoom_drawings can render close-ups on every install. With zoom on and no renderer, the reader warns once and marks each part zoom_skipped, and ecadlib eval run stops before it reads.

  • A maker's land can give only the thermal land (land.ep_across / ep_along, and ep_mask_*), for a land page that sizes the thermal pad but not the signal pads (OPA569DWP p19): the signal pads come from IPC-7351B and the thermal pad from the datasheet. Before, the reader had to leave the land out, and the part was held for a missing PowerPAD land. A land that gives only some of pad_length / pad_width / pad_center, or none of the pads, is flagged. The benchmark counts such a land as the maker's when the exposed pad is its thermal land. The reader's schema changed, so answers saved before are read again on the next live run.

  • The self-check takes a package name's EP size that the land page gives (its copper or mask opening) or that lies within the drawing's min-max. TLC5951DAP was read right and still refused, since its EP3.39x6.35 is TI's mask opening, not the midpoint of the 5.05-6.35 x 2.69-3.39 pad.

  • A wider retry keeps every page an earlier, narrower try sent, including the whole-PDF retry when it is cut to the page limit. TLC5951DAP's 22-page retry had lost the land pages 49-52 that its 6-page first try sent.

  • Solder-mask-defined thermal lands (TI PowerPAD). The datasheet reader can give the mask opening on the thermal land (land.ep_mask_across / land.ep_mask_along) when the land page draws it smaller than the copper, and the footprint draws it as KiCad does: copper only on the thermal pad, a mask-only opening of its own, and the paste windows inside the opening (TLC5951DAP: 5.2 x 12.5 mm copper, 3.39 x 6.35 mm open). Altium gets the copper pad tented and the opening as a Top Solder region. The pad check takes a mask-only opening over a pad's centre as that pad's mask, the paste check measures such a land's paste against its opening, and a rectangular mask window read back from Altium is a mask-only pad again. A mask opening read the other way round is turned with a note, and one that cannot fit the copper is left out with a note. The silkscreen and courtyard now clear the thermal land drawn, not the package's smaller pad. A maker's thermal land that reaches the lead pads (OPA569DWP: TI's "Minimum Area" copper of 7.59 x 12.95 mm runs 0.17 mm into the SOIC-20W lead pads) is still held, and the hold now says so (or, when the land would fit turned, that it was likely read the other way round). The reader's schema changed, so answers saved before are read again on the next live run.

  • [datasheet] web_search = true (off by default): when no link, part source or folder file gives a part's datasheet, one Claude web search asks for the maker's current PDF; each link found is downloaded and kept only if it names the part, the cost counts toward max_cost_usd, and the link is remembered so the part is not searched again. See docs/librarian.md.

  • A datasheet link that answers 200 with an empty page counts as refused, so the browser-headers and Chrome-fingerprint ways are tried (infineon.com gives a script nothing; the 2ED21824S06J PDF downloads the second way).

  • The datasheet reader can give a maker's land whose pin 1 pad is drawn another size (land.pin1_length / land.pin1_width: onsemi's WDFN8 pin 1 0.88 mm long where the others are 0.78, Nexperia's SOT143B pin 1 1.0 mm wide where the others are 0.6), and the footprint draws pin 1 that size, keeping the row's outer end and its lead's centre line, as KiCad does. Before, NCP4308AMT and BCV61 came out with every pad the same. The reader's schema changed, so answers saved before are read again on the next live run. The kicad-v1 errata gain a pad renumbering for AH1806-W (reference.renumber): Diodes' SC59 has pin 2 alone on one side, where KiCad's SOT-23 numbering puts pin 3, so a footprint built the datasheet's way is scored right.

  • Part descriptions say what the part is, never which tool made the file. A part with an LCSC number gets LCSC's own description of it (a JLCPCB parts search for that number), e.g. "-20℃~+70℃ 16MHz 20pF ±10ppm ±30ppm HC-49S-SMD-2P-Mini Crystals ROHS" for C2975360, which was "Crystals, CRYSTAL-SMD_L7.0-W4.0-LS7.8" (EasyEDA's tag and footprint name). The part search's text comes before EasyEDA's own, a shared Resistor / Capacitor symbol's "Resistor" is no longer the part's description, and nothing is made up from the category and package ("IC, C2975360" for a crystal): a resistor, capacitor or inductor no source described is described from its own BOM line ("RES 10kΩ 1% 0603"), any other part without source text is held for its Description. Footprints and symbols lose "generated by ecadlib (prototype - review before use)", "converted by ecadlib.easyeda_convert" and "read from the datasheet by ecadlib.datasheet"; a converted EasyEDA footprint is described from its package ("CRYSTAL-SMD, 7.0 x 4.0 mm body, 2 pads") and keeps EasyEDA's credit in a Credit field. Only a KiCad-library footprint names its source in the description, with its CC-BY-SA 4.0 label. Parts already released keep their text until they are built again (--refresh, or added again from the menu).

  • EasyEDA / LCSC parts get EasyEDA's own 3D model: the STEP file the footprint names is downloaded, placed on the footprint (its rotation, centre and board side), embedded in the PcbLib and gives the body height, so LCSC parts such as the YXC crystal X322512MSB4SI are no longer held for "no 3D height". A model that looks turned or off the pads is flagged for review; the footprint records easyeda:<uuid> with EasyEDA's credit. If the download fails, the generated model or box is used as before.

  • A missing or out-of-range 3D height is a note to check, not a hold: the part goes into the library and the Altium dialog says to check its 3D body. [release] height = "hold" brings the hold back.

  • Release anyway in the Altium dialog: a held part (other than a missing file or a change waiting for approval) can be released from the ecadlib popup. It shows why the part is held, asks why it is fine, and releases it like the review queue (release-check --allow with your name and reason, revision 1 in the change-control ledger), then puts it into the library.

  • Datasheet downloads get past makers' sites that refuse scripts (analog.com, Nexperia). When ecadlib's own request is refused (403, 429, 503, a bot-check page, a dropped connection, a TLS or certificate error; never a 404 or a host that never answers), it tries a desktop browser's headers, then Chrome's TLS fingerprint (curl_cffi), then a headless Edge or Chrome (Playwright) in a fresh profile that does not say it is driven by a script, and last, in a run someone is watching, opens the link in your own browser and takes the PDF from your Downloads folder. On by default ([datasheet] download, handoff, handoff_wait_s, downloads_folder); pip install "ecadlib[browser]" adds the two optional tools. Nothing solves a CAPTCHA, signs in or reads your browser's cookies. The cached PDF records the way that got it (via), as does ecadlib eval run, which never hands off.

  • [datasheet] folder: a folder of datasheet PDFs you downloaded by hand, for makers' sites that refuse scripts and for BOM lines with no link (#129). A file named for the part (<MPN>.pdf, or the MPN then a separator) is read before any link. A family datasheet (LTM4671.pdf for LTM4671IY#PBF) is read only when no link gave a PDF, and a file named for another part number (BAT54S.pdf for BAT54) only when no link gave a PDF here and your browser got none either (before a refused link is left to the API to fetch); both hold the part until a person confirms the file. The part keeps its public link, and only the file's name is recorded. A refused download now says to save the PDF there as <MPN>.pdf (- for a character no file name can hold, as in LM1117MPX-3.3/NOPB), says how to set the folder when none is, and first names a file already there that is not a PDF. A folder that does not exist or cannot be read is named in the review and in what was tried, the links are tried as ever, and ecadlib doctor warns about it. [datasheet] standard_land (default off) uses the checked standard land when a read's pin count, pitch, body and exposed pad fit exactly one standard package (auto: only when the read left a number blank or the datasheet prints no land). ecadlib eval run --datasheets DIR reads a benchmark's hand-downloaded PDFs and gives the pass rate without them.

  • Change control (#105): no library update can silently change a released part. Every writer (librarian re-runs, upstream --update, upkeep --apply, resolve, dedupe, datasheet passes, style apply and the KiCad / DbLib / Altium 365 publishers) compares what it would leave with the released revision, classifies each difference (identity, electrical, geometry-major, geometry-minor, cosmetic) in plain words, and holds what the [change] policy says to hold until a person approves it (approvers = 2 is the two-person rule). New: ecadlib part status|show|diff|history|approve|reject|revert|fingerprint, the append-only library.ledger.jsonl with every released file kept for revert, the held update and the revisions in the web UI, an approved change pushed as a new Altium 365 component revision (optional life-cycle transition [change] a365_transition), ecadlib project check|freeze|scan (KiCad drift and freeze, the Altium 365 out-of-date list, the usage index), and an upkeep changes check. Corpus run over KiCad 9.0.8 to 10.0.0: 234 parts held, all real changes, none missed (docs/change-control.md).

  • The datasheet reader asks for the maker's thermal-pad land (land.ep_across / land.ep_along, e.g. TI PowerPAD's 3.4 x 5 mm around a 3 x 3 mm exposed pad), and the footprint's exposed pad uses it, as KiCad does. The reader's schema changed, so answers saved before are read again on the next live run; ecadlib eval run --cached-only still scores them (sync and batch runs).

  • Fixes from the first live benchmark runs (#42). A dimension printed with its tolerance (6.5±0.2, 3.56 +0.15/-0.25) or as a range (6.3~6.7) gives min and max instead of being left blank (LP38693MP-1.8). A blank pin count is taken from the package name or the pin table when they agree, never from a depopulated name like SOIC-14-16 (UCC25800). A read whose optional-fields text is filler ("x") is no longer thrown away, and a part's route keeps its best answer when a later read comes back worse (CY14U256LA-BA). A fine-pitch BGA land read as SMD-defined whose copper would not fit the pitch is built copper-defined with a note (TPS628436YKA). The kicad-v1 errata gain PCA9557BS (KiCad's reference is the 3 x 3 mm variant; the BS part is SOT629-1, 4 x 4 mm at 0.65 mm) and 27C256 (pins O0-O7 as the datasheet names them, and its real DIP-28 body).

  • [datasheet] max_cost_usd gives back the worst case it held for a request the API answered with an error, or a batch request that errored, expired or was cancelled: none of them is billed. In the #42 Sonnet 5.5 run those holds stayed on the books and the cap refused 34 parts at $6.21 of real spend. A timeout keeps its hold, since the API may still have run it.

  • ecadlib eval run no longer charges a live run with the estimate of a part that got no answer (a download the API's fetcher gave up on, or a rejected read): it cost nothing, and the report said so with a made-up price (the first Opus 5.5 run showed $32.41 against $16.00 really spent). A datasheet the API's fetcher timed out on or could not connect to counts as no PDF, like one it could not download.

  • The live accuracy harness (#42): ecadlib eval run records each part's datasheet (URL, SHA-256, pages sent) and the reader's prompt version, gives every failed part a failure type (no PDF, blank dimension, cross-check hold, wrong unit, wrong variant, mirrored, misread table, thermal pad, misread dimension, maker land, symbol) and reports the pad match over the footprints built. ecadlib eval pin REPORT pins the PDFs a run read (<set>.pins.json; eval run --pins), so a later run flags a datasheet the maker changed. ecadlib eval publish REPORT writes the results page: one headline (model, parts, pass rate, pad match, cost per part, failures by type), then every miss. The Accuracy benchmark (live) GitHub workflow runs it on demand with a cost cap (no schedule; needs the ANTHROPIC_API_KEY secret).

  • docs/benchmark.md: the live accuracy benchmark on 110 real parts (#42), with the method, results per family, every miss and its cause, the cost and the commands to run it again; the website shows the headline numbers.

  • ecadlib eval run tells a footprint that uses the datasheet's recommended land pattern (the maker's example board layout) apart from a misread: when it misses KiCad's pads only because KiCad works its land out from the package dimensions, the report says so and gives the pass rate counting those as right (summary.maker_land, per case maker_land and kicad_differs_maker_land). Checked by hand on CD4066BM, UCC256301 and BCR430UW6.

  • A test set can carry an errata file (<set>.errata.json) of cases where KiCad's reference disagrees with the datasheet, checked by hand: the field is scored right when ours is what the datasheet says, and the report lists it. kicad-v1 has one: AH1806-W, whose SC59 pins 2 and 3 KiCad swaps.

  • The standard source knows DO-201AD (axial, 15.24 mm bend), MicroMELF and SC-82AB, from KiCad's hand-drawn footprints (618 packages, each benched against KiCad). Three #42 benchmark parts (1N5400, BAV301, NCP662) now build without a datasheet.

  • ecadlib eval run --cached-only re-scores a live run's out folder with nothing sent: its cached answers, and the answers of its collected batches downloaded again (free), are read by the current code; a part that would need another read is reported, not sent.

  • ecadlib eval run --batch sends the datasheet reads as one Message Batch (half price); the report prices those parts at the batch rate, and recordings keep it so a replay gives the same cost.

  • ecadlib status shows how long the last BOM run took, step by step: triage, build, release check, review (from the release check to the last sign-off, --allow or resolve choice) and the Altium 365 push, with ecadlib's own time and the total (#44). Each plan folder keeps a timing.jsonl; status --json has last_run and a timing per plan.

  • ecadlib status shows the review rate: of the parts built, how many passed first time, are held (with the top reasons), were approved, rejected or changed by a person (#45). status --json has review, overall and per plan.

  • docs/START_HERE.md asks people trying ecadlib to send those two lines.

  • ecadlib eval run reports the parts that never reached the model (no datasheet PDF could be fetched) apart, with the pass rate without them (summary.no_datasheet, summary.with_datasheet).

  • A logo: the Sprout Trace mark (a copper trace growing from a via into two leaves) on the website, its favicon, the web UI, the KiCad toolbar button and the Windows icon, with copper as the one accent colour. docs/brand.md has the rules; site/brand/ has the files.

  • The Altium dialog, the KiCad window and the web UI show the model and the cost of every AI step before it starts, and wait for a click: Fill the library and Add part run every free source, then price the datasheet reads a part still needs ("3 parts need the datasheet read by AI (claude-opus-5-5): about $0.42, at most $1.10"). Above [datasheet] ask_above_usd (new, default $1.00) or max_cost_usd they ask a second time. The reads are held to the amount approved, and the real cost (from the API's usage) is shown next to the estimate afterwards (#49). The house style guide is priced the same way. Workspace.ai_quote / ai_read, /api/ai/quote, /api/ai/read, /api/style/guide; ecadlib/ai_cost.py.

  • ecadlib doctor warns when a paid AI key comes only from an environment variable, which other programs can read and bill.

  • docs/api-keys.md: where your key lives, who can read it, and how the cost is shown.

  • ecadlib mcp --http: the MCP server over Streamable HTTP for agents that cannot start a local program, such as Grok through the xAI API. A bearer token is required (--token / ECADLIB_MCP_TOKEN, else one is printed), web page origins are refused, and file arguments must stay inside the workspace and --lib folders.

  • ecadlib mcp --tools core|read-only|<names> (or ECADLIB_MCP_TOOLS) offers fewer tools, for small models and remote agents.

  • MCP tools upload_bom, ai_quote, ai_read, house_style_guide and job_status; every tool has a title and read-only / destructive / internet hints; the server sends usage instructions on connect.

  • docs/mcp.md: setup for Claude Code, Claude Desktop, Codex and Grok.

  • docs/START_HERE.md walks an Altium user from the installer to a project BOM released into Altium 365, all from the ecadlib menu: the Nexar token and workspace, Check this project BOM, Fill the library with the AI cost shown first, the review queue for held parts, and the Components panel (#51).

Removed

  • To keep one maintainer on the BOM-to-Altium 365 flow, about 7,000 lines are gone from main (the last code with all of them is the archive/before-trim branch; pip install "git+https://github.com/oliBrowne/PCBLIVINGLIBRARY@archive/before-trim"): the JLCPCB assembly check and BOM / CPL export (ecadlib assembly, #104 is now out of scope), the SPICE / IBIS model finder (ecadlib sim-models), the price, stock and alternates report (ecadlib sourcing and upkeep's sourcing check; Nexar, DigiKey and Mouser still identify parts), the library hub (ecadlib hub), and the team server with sign-in, roles, Docker and HTTPS (ecadlib team, ui --team, the compose files). The library agent (ecadlib agent, agent-watch, queue) and two-way Altium 365 sync (ecadlib a365 pull / status / reconcile; ecadlib altium365 push stays) are parked on the parked/agent-and-a365-pull branch. The KiCad plugin manager package is frozen: it still builds but gets no new features. The removed commands say where the code went; an ecadlib.toml with [sim], [hub], [assembly], the old [agent] keys or the upkeep price keys still loads and those keys are ignored, as is notify batch_ready / part_held.
  • The Fusion Electronics / EAGLE (ecadlib eagle-export, .lbr) and EasyEDA Pro (ecadlib easyeda-export, .elibz) exports, with their web UI buttons, POST /api/export/tool, the Workspace and MCP tool_export, the Fusion and EasyEDA columns of the library hub, the fusion/ and easyeda/ folders of ecadlib testpack and the [release] eagle / easyeda checks (#50). Why: no user asked for them, neither was ever opened in the real tool, and about 3,000 lines of writers and read-back took one maintainer's time away from the BOM-to-Altium 365 flow. The two commands now print that the last version with them is 0.3.1 (pip install "ecadlib==0.3.1"); an ecadlib.toml that still sets [release] eagle or easyeda loads, and the keys are ignored. Importing parts from EasyEDA / JLCPCB is unchanged.

Changed

  • The cross-check holds fewer parts that would build right, and nothing that would build wrong. A read of a standard table package whose only difference from the table is its length and width the other way round (AT24CS01-MAHM's UDFN-8 read 2 x 3 against the 3 x 2 table, AL8860MP's MSOP-8 exposed pad 1.8 x 1.5 against 1.5 x 1.8), with pin count, pitch and exposed pad agreeing and no second read disagreeing, is built from the table's land and reviewed instead of held; a part with no table entry is never turned to fit (LTC2942-1 stays held). Two reads that differ only in the exposed pad's own pin, one numbering it past the leads and the other leaving it out (MAX22201), or one naming it by its net and the other calling it the pad (OPA569DWP "V-" and "PowerPAD", PCA9557BS "VSS" and "exposed center pad"), agree; two numbers past the leads, a read with no exposed pad, or a tab numbered inside the leads still disagree.
  • Only parts that pass the release check are published. altium365 push, dblib-sync / altium-pkg, kicad-export, kicad-dblib, export-parts and exporter plugins run the check again on each part's files before they write them out; a plan's ready is no longer taken on trust (altium365 plan --models, the web UI's triage plan and a hand-edited plan said ready for parts nothing had checked, and a file changed after its check went out as it was). A part that fails is skipped as held with its reasons (exporter plugins get it marked held), unless a person released it anyway (--allow). export-parts takes --rules like the others. Parameter updates of a part already in the workspace send no files and are not re-checked. kicad-export keeps the symbol and footprint it exported before for a released part it now holds, and kicad-dblib --export keeps its database row (they used to take it out and say the part had left the plan); a hand edit to the library since is copied aside as before, not kept.
  • Parts from a source that needs a second look are held until a person releases them: an EasyEDA conversion, a symbol pinout from a family table (SOT-23 and other pinouts differ by maker), a KiCad symbol matched by its MPN minus an ordering suffix, and a KiCad footprint picked by a near name. These were review notes only, so such parts went to Altium 365 with no sign-off. Picking another symbol or footprint for that half (ecadlib resolve, the review queue's Pick) drops the hold once change control applies the pick; approving the part does not: release it anyway once it is checked. The offline demo now holds 3 of its 7 parts (AMS1117-3.3 and AO3401A for their family pinouts).
  • EasyEDA / LCSC and the JLCPCB search (undocumented endpoints) stay on by default and are always asked after the official APIs (they were briefly opt-in; parts such as YXC crystals are only on LCSC). ecadlib init asks whether to use them; [providers] unofficial = false turns them off.
  • [datasheet] max_cost_usd defaults to $10 per run (0 = no cap), so a scripted run on a big BOM has a ceiling. --yes no longer lifts the cap; --max-cost-usd N on ecadlib datasheet and ecadlib eval run changes it for one run. The dialogs still ask twice above ask_above_usd (or a cap you set).
  • ecadlib eval run without an API key reports the parts that needed the AI read as "not run: no API key", not as wrong, and prices them as an estimate.
  • When a setting fails to load and ecadlib falls back to a default (a model setting, a house-style parameter name, a model's guide rails), it prints a warning and review.md / review.html lead with it, instead of carrying on silently.
  • The Altium DelphiScript units (ecadlib_menu.pas, ecadlib_dialog.pas, ecadlib_build.pas) are real files in ecadlib/altium_scripts/, no longer Python strings; what ecadlib writes into Altium is byte-for-byte the same. docs/altium-release-checklist.md is the manual AD26 pass for every release.
  • API keys are read from ecadlib's own key store when they are needed and are never copied into the environment (they used to be copied into each ecadlib process's environment, which every program it started inherited). A stored key now comes before an environment variable of the same name; the variable is used only when nothing is stored. The Altium menu README no longer suggests setx. The eval gate and golden builds never read the key store.
  • pypdf is a core dependency (it was the [pdf] extra): without it a large datasheet (the 1976-page SAM E70 family sheet) could not be cut to the pages that matter and every read of it failed.
  • MCP: a missing or wrong argument is now a tool error the model can read (it was a protocol error), naming the arguments the tool takes; null optional arguments, numbers and booleans sent as text and objects sent as JSON strings are accepted. librarian_run's refresh takes a list of part names and refresh_all redoes everything (refresh: true still works). Answers are compact JSON without \u escapes and are cut at --max-chars (default 80,000) with a hint.
  • Datasheet downloads are more reliable. A PDF download that times out, loses its connection (reset included), or gets 429 or a 5xx is tried twice more with backoff, honouring Retry-After up to 30 s; a TLS or proxy refusal is not retried, and later links on a host that failed every try get one try each in that run. After every BOM, part-search and source link, the maker's own URL pattern is tried for Texas Instruments (ti.com/lit/ds/symlink/<part>.pdf) and Analog Devices / Linear (analog.com/.../data-sheets/<part>.pdf), full part number first, then the base part (LT8610EMSE#PBF -> lt8610, TPS26630PWPR -> tps26630). When a maker's site refuses the download (403 with a web page, a reset connection, a timeout on every try) and the API cannot fetch it either, the held part says so and how to get round it: download the PDF in a browser and read it with ecadlib datasheet FILE.pdf --part MPN. The User-Agent is unchanged; PDF requests ask for Accept: application/pdf,*/*;q=0.8.

Fixed

  • release-check --allow on a part already allowed for the same failures keeps the date it was first allowed, so re-running a librarian or ecadlib testpack on a new day no longer rewrites plan.json.

  • A through-hole part's EasyEDA 3D model sits at its real depth: EasyEDA's z is where the model's bottom goes, so a 2.54 mm header (z = -3 mm) no longer sinks 3 mm into the board, and its height reads 8.5 mm, not 5.5.

  • Typing a bare LCSC number (e.g. C9002) in Altium's Add part uses EasyEDA's part again; it was refused as "BOM says C9002" and held with no symbol or footprint.

  • ecadlib.cli.main called in-process (tests, an app that embeds ecadlib) puts -q / -v / --json and sys.argv back when it returns, so the caller's own output is not left unstyled. Three tests that failed only now and then under pytest -n 4 are fixed: the terminal-style test (it inherited --json from another test), the browser UI test (fixed scroll pauses became waits) and the fresh-install doctor test (it no longer fails where the optional browser extras are not installed).

  • ecadlib eval run --cached-only: an answer saved from another step of a part's route is reported with the pages that read was sent. Before, its sidecar showed the pages this run's picker would send now, and today's zoom pages. TLC5951DAP's re-score named a land page (51) that the scored read never saw.

  • Makers' AES-encrypted datasheets with no open password (Panasonic's AQY282GS) are read: ecadlib now depends on pypdf[crypto], since pypdf needs the cryptography package for AES. Without it the PDF's text came back empty, so no pages were picked for the part.

  • Datasheet reads of tab packages (DS2-24): pin_count counts each pad number once, as package_schema.json says. A tab that is a lead's pin again (SOT-223-3_TabPin2) adds nothing and needs pin_positions; a tab with its own number counts (TO-252-2: 3). SOT-223-3_TabPin2, TO-252-2, TO-252-3_TabPin4, TO-263-2 and single-row parts like TO-263-5_TabPin3 can now pass the checks; before, each was held whatever pin_count it gave. A blank pin_count is no longer filled from a SOT/TO outline number (SOT-223 -> 223). The bundled SOT-223-3_TabPin2 spec says 3; a spec file that says 4 still builds.

  • ecadlib kicad-pcm (DS2-42): a changed library built again the same day got the same date version and zip name, so it overwrote the published zip and KiCad never offered the update. It now takes the version after the package's previous one (patch + 1) whenever that is today's date or later. The previous version comes from the package's own zips, packages.json and kicad_pcm.json, so several libraries in one folder keep their own versions, and repository.json's update_timestamp only moves forward. A --pkg-version that is not newer than the previous build's for a changed library is refused.

  • A BOM value with a comma before exactly three digits (4,700pF: 4.7 pF with a decimal comma, 4.7 nF with a thousands comma) was read as 4.7 pF and matched a 4.7 pF part (DS2-43). Such a value now picks, renames and merges no part by its value, and the librarian holds the part for a person to check (write the value without the comma, or release it anyway). Change control uses the same rule.

  • Web UI: an Altium 365 push whose workspace field was not text (true, a number, a list) crashed in the push with "Something went wrong (AttributeError ...)"; it is now refused in one line ("workspace must be a non-empty string"). The web endpoint fuzzer found it.

  • The Altium rebuild (altium-native, ecadlib_build.pas) dropped a through-hole pad's drill offset, so the copper sat centred on the hole, and altium-native compare never checked the offset (DS2-34). A library Altium already rebuilt with the old script and recorded as built is not checked again on its own: if your parts have offset pads, run ecadlib altium-native compare on the library folder, then ecadlib altium-native write --rebuild-all for the libraries it lists.

  • Add part from MPN (Altium and KiCad menus): a part number pasted twice (Ctrl+V pasted on both the key and its character) is cut back to one and the box's paste now replaces its text; a miss on text that reads as a description ("SOSET 16M 20PF 10PPM") says so; an LCSC number or lcsc.com link is looked up by that number; and a part not found while [providers] unofficial = false says LCSC was not asked and which file and setting turn it on, instead of "no part source knows this part number".

  • Fixes from testing PRs #81-#103 by running them (tests in tests/test_review_1018_merges.py):

    • A failed Altium build installs the library you had again (it was uninstalled to build); the dialog says "Not found" for a bad part number, and a wrong LCSC number is no longer reported as a bad MPN.
    • dblib-sync: a library file open in Altium is reported by name and skipped, instead of stopping halfway with "[Errno 13] Permission denied".
    • ICs "with integrated MOSFETs" stay in the ICs table, not Transistors.
    • Footprint hashes recorded before #97 are computed again (librarian_state v3, ecadlib migrate), so a re-run shares a footprint the library already has instead of writing a second copy.
    • Altium 365 push: a part is matched by its exact name or a revision of it, never a colleague's part whose name only starts the same (LM358 vs LM358-N).
    • ecadlib status: a push that failed is not shown as released, an interrupted run does not hide the last finished one, and the total time is never negative.
    • A NOTICE.txt you wrote yourself is never overwritten.
    • MCP: save_rules cannot change where model requests (and the stored API key) go; the first calls to an HTTP server share one job list, so the one-writer-per-BOM lock holds; a "still running" job stays readable for the caller it was named to; altium_menu takes a Windows win_dir under --confine.
    • Benchmark scoring: an erratum no longer hides wrong pins it does not list; a "maker's land" narrower than the leads read from the same drawing is not counted as the maker's; pad-table bodies turn by the direction the pin rows run (SOT-223, DIP-6, DIP-8).
    • fp-edit reads a part's latest spec, and a datasheet read whose other_json comes back as an object is accepted.
  • Fixes from the second debug sweep of the librarian side (tests in tests/test_debugsweep_librarian.py):

    • ecadlib rebuild --check --keep DIR no longer deletes anything of yours. --keep on the library's own folder deleted the library before copying it, and a project folder named like the library (the folder holding its BOM and cache, or another project's library) was replaced by the copy. It now refuses (exit 2) a copy that would be, hold or sit inside the library or anything the lock reads (BOM, HTTP cache, --lib folders and files, rules file), and replaces an existing DIR/<library name> only when an earlier --check --keep made it (.ecadlib-rebuild-copy). python -m ecadlib.rebuild prints the refusal in one line too.
    • ecadlib upkeep's a365 check: parts pushed to Altium 365 under the house parameter names ([parameters.names]) no longer show as drifted.
    • library.lock.json stores each part's --lib input files (local[].file) relative to the library folder, like the BOM, cache and libraries, so rebuild --check works on a clone or a moved project and checks the clone's own files. A lock written with absolute paths still reads; the next librarian run rewrites it.
    • ecadlib part diff takes a library file on a drive letter (C:\lib\X.SchLib, C:/lib/X.SchLib:NAME); the path was cut at the first colon.
  • A gull-wing exposed pad read long side first (TLC5951DAP's PowerPAD, 5.7 x 3.04 mm) is turned to run with the body; across the rows it pushed every pad's heel out past the body.

  • A DIP or other pad table with its rows down the page now gets a body (and courtyard) that runs with the rows: 27C256's courtyard was 37 mm wide.

  • Two parts whose datasheet packages share a name but not their numbers (ISL8117FVEZ and TPS26600PWP, both HTSSOP-16) keep their own spec file; ecadlib fp-edit reads each part's own.

  • ecadlib eval pin names: "N.C." is KiCad's "NC".

  • eval run --cached-only scores a part from its best saved answer for the same datasheet when the route now asks for a step the live run never sent (it went another way past an answer the old parser rejected).

  • A BGA body read the other way round from its ball grid (CY14U256LA-BA: 8 x 6 balls, body 10 x 6 mm) is turned so its long side runs with the grid's long side, with a note.

  • Benchmark scoring: a pin name spelled out ("Enable", "Ground") counts as KiCad's "EN" / "GND"; the eval BOM names through-hole diodes D, as a real BOM does, so DO-41 / DO-201AD parts resolve from the standard table.

  • Datasheet answers whose other_json objects left out optional fields (a land without pad_center_y, a tab given as bare numbers, a number as text) were rejected as "not valid under any of the given schemas"; they are now read (missing optional fields become null, a bare number for a range is its nominal). The #42 benchmark lost 23 paid answers to this.

  • A batch answer the parser rejected is downloaded again from its collected batch (free, within the API's 29 days) and read by the current code, instead of being bought again on the next run.

  • The pin-1 triangle of a tiny QFN (QFN-16 1.8x2.6 mm) moves out past the top-row pads instead of sitting 0.07 mm from pad 16 (KLC F5.1).

  • [datasheet] max_cost_usd counts each answer at what it really cost once it comes back, not at its worst-case estimate. A multi-round run (more pages, a stronger model) was refused its second round long before real spend reached the cap: the #42 benchmark's first round was held at $24.61 and cost $3.42.

  • Converted footprints were all labelled "(CC-BY-SA 4.0)" in their description, including EasyEDA parts, your own --lib files and footprints ecadlib generated; only parts from the KiCad libraries are labelled now (#54).

  • A part whose symbol or footprint comes from the KiCad libraries now gets a Library Credit parameter on the Altium side, as EasyEDA parts already did, and the librarian writes a NOTICE.txt in its output folder naming the third-party terms of the parts in it (#54).

  • MCP librarian_run ran the paid datasheet reader without a price or a yes. It now prices those parts (ai) like the other front ends, and ai_read needs the approved amount. learn_house_style with ai returns a quote too.

  • MCP calls that take longer than --wait (default 45 s) answer with a job id for job_status instead of running into the client's timeout (Codex waits 60 s).

  • MCP: a child process (kicad-cli, pdftoppm, git) can no longer write into the protocol stream on stdout.

  • The Altium menu and the web UI no longer tell you to put NEXAR_TOKEN in an environment variable and restart: the token is read from ecadlib's key store (setup page, Optional keys).

  • Datasheet page picking: a family sheet's "LQFP144, 144-lead LQFP" no longer counts as this part's LQFP-100 (a bare family word matched every LQFP), and the drawing and land-pattern slots never go to a page about another package. The SAM E70 sheet (1976 pages) now sends the LQFP100 drawing instead of the LQFP144 and QFN pages.

  • Standard parts: DO-41 (DO-204AL, SOD81) on a diode resolves to KiCad's D_DO-41_SOD81_P10.16mm_Horizontal.

  • Datasheet checks: 1.25 mm (JST GH) is a standard pitch.

  • Datasheet reader: an answer whose other_json the model fenced or wrapped in a sentence is read instead of rejected.

  • Datasheet download: a plain http:// link that fails here is tried again over https before it is sent to the API.

  • BGA / WCSP footprints: a ball grid that fits the body only turned a quarter turn (the datasheet's length x width on the other axis than its rows x columns, TPS628436YKA) turns the body and says so in the report, instead of refusing the read.

  • A datasheet read that leaves a needed dimension blank without listing it as unresolved says which one.

  • Datasheet download: a link that gives a product HTML page (ENS210) is followed once to the datasheet PDF the page links to; the provenance keeps the page as page_url.

  • Datasheet reader: a plain http:// datasheet link sent to the API for it to fetch is sent as https:// (the API answered "Only HTTPS URLs are supported"; 7 parts of the live benchmark).

  • Cross-check: two reads that name a pin with different wording agree: "K" and "cathode (K)", "A" and "anode", "VO" and "VO (output)", "V_{SS}" and "VSS", or "GND" and "PowerPAD" for the exposed pad. 18 benchmark parts were held on wording like this.

  • Datasheet reader: the live API refused every read ("Schemas contains too many parameters with union types (184 ...). limit: 16"). The request now asks for the dimensions as a list of named records (min / nom / max as printed text, "" where blank) and the optional family fields as one JSON text, with no nullable fields; the answer is turned back into the same extraction as before, so checks, the result cache and recorded answers are unchanged. The cross-check's second read had the same problem (26 union fields) and is fixed the same way.

  • Datasheet reader: the optional family fields reached the model without their descriptions, so a land pattern's pad_center came back as the datasheet's C (row to row) and SOT-23-6 pads sat 2.4 mm out instead of 1.2 (BCR430UW6, AH1806-W). The descriptions are back, pad_center says C / 2, and a pad_center past the leads is flagged.

  • ecadlib eval: KiCad's pin-name markup (V_{SS}) matches the datasheet's plain VSS.

  • Datasheet reader: an answer with no unresolved list crashed ("'NoneType' object is not iterable"), and a read that left a needed dimension blank crashed the footprint build (KeyError: 'terminal_length', "'>' not supported between NoneType"). The part is now left for review with "no footprint: the datasheet read left terminal_length unresolved". A bug in a source names its file and line in the part's log.

  • Datasheet reader: a maker's link that refuses this machine (HTTP 401, 403 or 429: Nexperia, Renesas, Altera on the live benchmark) is sent as a URL for the API to fetch, as a blocked host already was; only a 404-style error, an HTML page or an oversized file rules a link out.

  • Altium 365 push: symbols and footprints are released under the [folders] root too (<root>/Models/Symbols, <root>/Models/Footprints), not always under Components/Models, so a test root keeps everything together.

  • Altium 365: Nexar renamed DesRevision.id to revisionId; push, a365 pull/status and upstream check-a365 asked for the old field and every lookup failed with HTTP 400. The test schema is updated to match.

  • Altium 365 push: a nested component folder (ecadlib-test-47/ICs) is released under its parent folder's id; Nexar takes only one folder name there and refused the path ("AddALU_FoldersInvalid folder HRID"). Missing parent folders are created (desCreateFolder with the live parentFolderId / folderId fields).

  • Altium 365 push: a symbol or footprint several parts share (Capacitor, C_0603) is released with the first part and linked by the others; releasing it again failed with "AddALU_ItemsDuplicate item HRID". A symbol or footprint item named like its component gets -SYM / -FP (Altium 365 refused "Duplicate ID").

  • Altium 365: looking a component up by name matched other items too (Altium's sample part CMP-017-000002-1 for AMS1117-3.3), so a push or lifecycle update could change a part that is not ours. Only an item of that name (or its revision) counts now.

Fixed

  • Altium menu: a failed Altium build keeps the previous library files, installs nothing and says so instead of "Ready". When Altium stops the build script part way (a script error writes no report), the menu puts the moved-aside library back.
  • Altium menu: shared resistor / capacitor / inductor symbols carry no footprint, so each DbLib row's Footprint Ref picks it; passive parts get Passive pins; distributor categories (including LCSC's "LED Indication - Discrete") route parts to the Capacitors, Transistors, Diodes, Crystals and Connectors tables; Open review queue lists the menu's held parts; an MPN no source knows is "Not found", not held.
  • A space in an MPN becomes _ in the DbLib part name (FC-135 32.768KA-AG0 → FC-135_32.768KA-AG0); the Manufacturer Part Number column keeps the space.