velxio/test/backend/unit
David Montero 0b3e165784 feat(intellisense): answer from the local sketchbook, not only the cache
The symbol server assumed one library layout: the content-addressed cache,
where an entry dir name IS its content hash. A host without that cache --
Velxio Desktop's sidecar, and any self-host -- has its libraries where
arduino-cli put them, under plain folder names with the version inside
library.properties, and got a 404 for every request. The editor there falls
back to the engine's embedded catalog, so `client.` on a library the user
installed himself resolves to nothing.

Both layouts are now sources, tried best-first. The only real difference is
mutability: `lib upgrade` rewrites a sketchbook folder in place and keeps its
name, so a scan cannot be keyed by that name. Sketchbook entries are keyed by
a cheap stat-only stamp (file count, total size, newest mtime) in the same
`<norm_name>@<norm_version>-<12 hex>` shape, which makes the disk cache exact
rather than merely long-lived. Cache entries keep their existing keys, so no
deployed scan is invalidated.

Where the sketchbook is: an explicit override, then the sketchbook env vars,
then arduino-cli itself (`config get directories.user`, probed once and
remembered) -- guessing ~/Arduino is wrong on the platforms whose default is
~/Documents/Arduino. A sketchbook that resolves to the cache is dropped: the
pro overlay points arduino-cli at a symlink to the cache root, and scanning
it twice under two shapes buys nothing.

Scans for a sketchbook are written to `<sketchbook>/.velxio-symbols/`, beside
`libraries/` and never inside it, so nothing Velxio writes shows up in
`arduino-cli lib list`.

The type index now keys on a fingerprint of the source's entry keys instead
of the entry count, which is exact for both layouts (an in-place upgrade
changes no count). Deployed indexes rebuild once, ~1s from the cached scans.
2026-08-25 00:06:10 +02:00
..
__init__.py
…
test_arduino_cli_attinycore.py
…
test_arduino_cli_bt_note.py fix(compile): answer the Bluetooth error ourselves instead of pointing at an IDE menu 2026-08-22 04:38:31 +02:00
test_arduino_cli_error_messages.py fix(arduino-cli): library search/install failures become one actionable sentence 2026-08-18 00:28:07 +02:00
test_arduino_cli_scope_retry.py fix(compile): when the scan-all retry fails too, report ITS error 2026-08-24 22:49:11 +02:00
test_boot_images.py fix(pi3): show kernel boot + autologin SD + sidecar cache invalidation 2026-05-16 06:23:22 +02:00
test_compile_build_lock.py test(compile): the build-lock test still asserted the pre-82f25a03 contract 2026-08-20 07:49:09 +02:00
test_compile_dedup.py perf(compile): dedup, concurrency limits, and persistent build dir for ESP-IDF 2026-05-09 08:33:11 +02:00
test_dht22_worker.py test(dht22): skip absolute-timing busy_wait checks under CI 2026-05-17 22:31:37 +02:00
test_esp32_wifi_args.py fix(esp32): the emulated chip keeps its radio, whatever the scan thinks (#260) 2026-08-21 22:05:10 +02:00
test_esp32_wifi_webserver.py
…
test_esp32c3_wifi_args.py
…
test_espidf_compiler.py fix(espidf): one include root per library — kill the header-shadow class 2026-08-20 00:15:51 +02:00
test_espidf_core_first.py espidf: never resolve generic platform headers against user libraries 2026-08-04 05:23:42 +02:00
test_espidf_include_roots.py fix(espidf): one include root per library — kill the header-shadow class 2026-08-20 00:15:51 +02:00
test_espidf_include_scanner.py fix(espidf): unknown #if must not prune its #else in the include scanner 2026-08-15 04:14:00 +02:00
test_espidf_library_ranking.py feat(libraries): manifest auto-migration + name-affinity ranking + install-declares 2026-08-04 06:03:32 +02:00
test_espidf_pure_mode.py feat(espidf): LVGL and esp_lvgl_port, the layer every official demo's UI sits on 2026-08-24 06:11:24 +02:00
test_espidf_real_paths.py
…
test_i2c_slaves.py
…
test_intellisense_local_libraries.py feat(intellisense): answer from the local sketchbook, not only the cache 2026-08-25 00:06:10 +02:00
test_mcp_tools.py
…
test_micropython_libs.py feat(micropython): install libraries from the micropython-lib index (#214) 2026-08-18 21:50:10 +02:00
test_signal_router.py fix(esp32): LEDC signal IDs are 71-86 per ESP32 TRM, not 72-87 2026-05-17 05:42:52 +02:00
test_uart_buffer_flush.py fix(micropython): release the raw REPL's answer instead of buffering it (#219) 2026-08-21 22:06:16 +02:00
test_wifi_detection_scope.py fix(esp32): the emulated chip keeps its radio, whatever the scan thinks (#260) 2026-08-21 22:05:10 +02:00
test_wifi_status_parser.py
…