Closed general

project-page: rate-limited library adds are dropped silently; PCM library incomplete; second run duplicates the library

John Lauer · ·closed by John Lauer

Seen with adom-aiflow 0.2.1 on a board with 48 distinct component pages.

  1. project-page --page <owner/slug> --existing reported OK ("README revision 1 with 213 parts, KiCad PCM repository ...") but the Cloud Library it filled holds only 6 items, and the PCM zip contains 6 symbols, 6 footprints and 6 models. A manual adom-wiki library add <lib> <page> right after returned HTTP 429 RATE_LIMITED with retry_after 20 to 45 s, so the remaining adds were rate-limited and not retried or reported. Expected: honour retry_after and retry, and refuse (ERROR) if any part is missing from the exported library, comparing the export's symbol and footprint counts with the BOM.

  2. A second project-page run on the same page created a second, empty Cloud Library with the same name, then failed: "2 libraries are named '<owner/slug>'; use the lib_ id". Expected: reuse the library recorded by the first run (store its lib_ id in the run), never create a duplicate.

  3. --brief <path to a file> is taken as literal text: the README and the PCM metadata description read "design/brief.md". Either read the file when the argument is a path or say in --help that it takes text.

Workaround used: add the missing pages one per call with retry on 429, then export.

2 Replies

John Lauer ·

Second defect found while linting the exported library with KiCad 10.0.3 (kicad-cli sym upgrade): the Cloud Library KiCad export writes the symbol file with a (kicad_symbol_lib (version 20211014) ...) header but embeds some component pages' symbols verbatim in KiCad 9 syntax (an unquoted name and (pin_numbers (hide yes)) in one case, (hide yes) effects in another). KiCad 10 then refuses the whole library ("Unable to load library"), and schematics that use it show every symbol as "library not found". Each symbol loads fine on its own.

Fix that worked: declare the current format in the header (version 20241209); KiCad's parser still reads the older syntax. Suggest the exporter either normalises every symbol to one format or writes the newest header, and that project-page runs kicad-cli sym upgrade (or an equivalent parse) on the packaged library before publishing.

John Lauer ·

Fixed in adom-aiflow 0.2.3, all three points plus your follow-up.

  1. Library adds go in batches and retry HTTP 429 after retry_after with bounded backoff. Pages that still fail are named in an ERROR. Nothing is published unless the exported symbol, footprint and model counts and every MPN match the BOM.
  2. The second run created a duplicate because library list --json nests its result twice and the old code never found the existing library. Now the lib_ id is saved in the run as soon as the library exists and reused. With several same-named libraries it uses the fullest one and tells you which to delete.
  3. --brief <file> reads the file.
  4. The packaged symbol library is written with a 20241209 header (KiCad 9 format, which KiCad 10 reads) and parse-checked before publishing (kicad-cli sym upgrade when available, plus a structural parse). Not yet run against a live 429 or KiCad 10.0.3 itself; the reply format and header follow your report. Upgrade: adom-wiki pkg install adom/adom-aiflow, then adom-aiflow --version says 0.2.3.
John Lauer closed this ·

Log in to reply.