velxio/frontend/src/__tests__
David Montero 8f148e836d fix(sim): a net is a set of pins, and a part's own line belongs to the part
Hardening pass on 57325aa, which fixed the reported HC-SR04 divider but did it
by returning the first answer any branch produced. Five topologies people
really draw break under that rule, and each one now has a test that fails on
57325aa and passes here:

  - a ground tie point almost always carries something else (a button's
    pull-down). Reaching a rail has to END the walk, or a grounded pin resolves
    to whatever GPIO that pull-down hangs off. Same through a breadboard rail;
  - two custom chips on one wire stopped sharing a chipbus net key, because a
    nested frame answered with its own neighbour's per-endpoint key before the
    root could mint the net-canonical one;
  - a chip one hop away ended the search before a real GPIO on the same node
    was ever looked at;
  - a node first reached deep, where the hop budget cut it short, was never
    re-walked when a shorter route arrived.

So the walk now models what a net IS. It collects the whole NODE (every pin
joined without crossing a component: the wires, and a breadboard strip's
holes), then judges the set: a driven pad wins outright; a supply pad means the
node IS the rail and the walk stops there; only then does it cross a passive to
the next node, where a rail is the weaker answer that lets a level-shifted
sensor resolve. Wires, components and breadboard groups are indexed per store
array, and a driven pad short-circuits collection — the common case is now
0.08 ms/pin on a 300-wire canvas, better than before this work started, with
the shared-rail worst case at ~2 ms.

Second half: a part that models its own line keeps it, on every board.
connectDigitalInputsToMcu thresholds the solved node into every input pin, and
its `sourcedNets` gate only ever protected part-driven lines by accident — it
holds while no component sits on the net, and stops the moment the user adds
the pull-up or the divider real hardware needs. Then the connector pins the
line an HC-SR04 or a DHT22 is answering on. simulation/partPinOwnership records
what each part drives (implicitly, through the simulator it is handed) and the
connector skips those pins; the ESP32 bridge answers the same question for
sensors the backend or an engine emulates, through a new optional `ownsPin`
seam. Parts SPICE can describe never claim anything, so a mis-wired button
still reads stuck — that property is why spiceDrivenInputs exists.

Also: setSensors merges per FIELD, so the coarser registration path can no
longer drop the finer one's echo_pin; the ESP32 bridge's guard is narrowed to
the single-wire sensor types, since an ePaper's DC pin or a keypad row must
stay drivable; and the Mega and Pico W pin maps get the supply-pad guard the
other boards have, where '5V' parsed as D5 and '3V3' as D3.

Verified in a browser against a local build of this tree, driving the real app:
HC-SR04 and DHT22, direct wiring and level-shifted, on Uno (avr8js), Pico
(rp2040js), ESP32 (esp32js and QEMU) and ESP32-S3 (esp32s3js) — see
scripts/sensor-wiring-matrix.mjs in velxio-prod.
2026-08-23 01:23:41 +02:00
..
__snapshots__ fix(examples): the common-emitter amplifier never left cutoff 2026-08-17 15:21:24 +02:00
fixtures
…
helpers
…
AVRSimulator.test.ts
…
PinManager.test.ts
…
RP2040Simulator.test.ts
…
SignalRouter.test.ts
…
ammeter-waveform.test.ts
…
arduino-arduino-spi.test.ts
…
arduino-esp32-uart.test.ts
…
arduino-pico-digital.test.ts
…
arduino-pico-i2c.test.ts
…
arduino-pico-mixed-uart.test.ts
…
attiny85-simulation.test.ts
…
avr-uart-tx-waveform.test.ts
…
bjt-common-emitter-behaviour.test.ts fix(examples): the common-emitter amplifier never left cutoff 2026-08-17 15:21:24 +02:00
board-compile-stale.test.ts flash: compile before flashing, stale-build warning, i18n dialog, entitlement seam (#207) 2026-08-18 20:21:57 +02:00
board-kinds-coverage.test.ts
…
board-pin-mapping.test.ts fix(boards): pads that resolved to nothing, and supply pads that drove a GPIO 2026-08-21 06:12:24 +02:00
board-protocols-audit.test.ts
…
board-removal-running-reconcile.test.ts
…
board-seed-code.test.ts feat(boards): a board can ship the code it opens with 2026-08-18 15:02:13 +02:00
board-sensor-controls.test.ts feat(simulator): tilt and battery controls for boards that carry an IMU or a gauge 2026-08-09 23:48:56 +02:00
breadboard-nets.test.ts
…
breadboard-occupancy.test.ts
…
breadboard-seating.test.ts
…
breadboard-snap.test.ts
…
buzzer-metronome.test.ts
…
capacitor-charge-transient.test.ts
…
chipbus-buskernel.test.ts
…
chipbus-buslogic.test.ts
…
chipbus-busnets.test.ts
…
chipbus-galaksija-boot.test.ts
…
chipbus-galaksija-computer.test.ts
…
chipbus-galaksija-display-snoop-race.test.ts
…
chipbus-galaksija-display.test.ts
…
chipbus-galaksija-keyboard.test.ts
…
chipbus-galaksija-ram-display.test.ts
…
chipbus-galaksija-reset-race.test.ts
…
chipbus-netkey.test.ts
…
chipbus-twochip-integration.test.ts
…
chipbus-z80-ram-decode.test.ts
…
chipbus-z80-rom-boot.test.ts
…
circuit-simulation-service.test.ts fix(sim): stop dropping sibling pin edges — only bit 0 of a multi-pin write reached the canvas 2026-08-16 20:02:58 +02:00
circuit-verifier-nonfinite.test.ts
…
circuit-verifier-p1-audit.test.ts verify: catch unpowered nets, open source loops, and relay coil voltage mismatch 2026-07-31 20:38:23 +02:00
circuit-verifier.test.ts fix(spice): per-voltage supply rails — VIN/5V no longer clamped to the 3.3V logic rail 2026-08-15 08:29:39 +02:00
component-metadata-bmp280.test.ts
…
component-to-spice.test.ts fix(examples): night-light LDR shorted AO to VCC — "1M" is milliohms in SPICE 2026-08-17 03:39:47 +02:00
components-metadata-integrity.test.ts
…
digitalgate-engine-examples.test.ts
…
digitalgate-kernel.test.ts
…
digitalgate-mixed-boundary.test.ts
…
digitalgate-sequential.test.ts
…
digitalgate-sweep.test.ts
…
drop-slot.test.ts fix(canvas): boards added from the picker land in the visible corner like components 2026-08-18 04:39:24 +02:00
dual-arduino-digital.test.ts
…
dual-arduino-hw-uart.test.ts
…
dual-arduino-multi-protocol.test.ts
…
dual-arduino-software-serial.test.ts
…
dual-esp32-uart.test.ts
…
dual-pico-digital.test.ts
…
dual-pico-multi-protocol.test.ts
…
dual-pico-serial-passthrough.test.ts feat(pi): salida de pantalla para las Pi + arreglo del guard de connect 2026-07-30 01:09:04 +02:00
editor-commands.test.ts feat(editor): menus File/Edit en la cabecera y editor sin nav de marketing 2026-07-30 16:26:36 +02:00
eeprom.test.ts
…
epaper-part-integration.test.ts
…
esp32-breadboard-display.test.ts
…
esp32-dht22-flow.test.ts
…
esp32-integration.test.ts
…
esp32-multi-servo-gpio-matrix.test.ts
…
esp32-rectifier-integration.test.ts
…
esp32-servo-pot.test.ts
…
esp32-uart-classify.test.ts
…
esp32-wifi-bluetooth.test.ts fix(micropython): stop shadowing the real WiFi driver when a NIC exists 2026-08-10 21:40:58 +02:00
esp32-wifi-compile.test.ts
…
esp32-wifi-webserver-integration.test.ts
…
esp32c3-blink.test.ts
…
esp32c3-simulation.test.ts
…
esp32c3-wifi-bluetooth.test.ts
…
example-component-values.test.ts test(examples): audit every shipped component value against physical ranges 2026-08-17 03:47:39 +02:00
examples-all-buckets-smoke.test.ts
…
examples-analog-live.test.ts
…
examples-analog.test.ts
…
examples-circuits.test.ts
…
examples-digital.test.ts
…
examples-gallery-smoke.test.ts
…
examples-led-resistor.test.ts
…
examples-netlist-snapshot.test.ts
…
examples-pico-doom.test.ts
…
fat-image.test.ts feat(sd): source files stay off the card - only project DATA files auto-copy 2026-08-04 19:58:31 +02:00
firmware-loader.test.ts
…
flip-flop-parts.test.ts
…
gallery-run-gate.audit.test.ts
…
gps-neo6m.test.ts feat(components): DS3231 RTC module + GPS NEO-6M NMEA talker 2026-07-31 20:38:06 +02:00
hcsr04-divider-echo.test.ts fix(sim): a resistor divider on a sensor line made the board pin invisible 2026-08-22 23:31:23 +02:00
header-strip-fit.test.ts fix(editor): the toolbar strip's label collapse is measured too, and each layout is judged by its own widths 2026-08-18 05:49:45 +02:00
i2c-complex-scenarios.test.ts
…
i2c-esp32-multiboard-bridge.test.ts
…
i2c-esp32-real-firmware.test.ts
…
i2c-interconnect-bridge.test.ts
…
i2c-lcd-coupling-gap.test.ts
…
i2c-multi-board-slave-gap.test.ts
…
i2c-real-firmware.test.ts
…
install-libraries.test.ts
…
instruments.test.ts
…
integration.test.ts
…
interactive-parts.test.ts
…
interconnect-routing.test.ts
…
issue-122-micropython-esp32.test.ts
…
issue-139-espidf-mode.test.ts
…
issue-219-micropython-upload.test.ts fix(micropython): upload a project's libraries in bounded steps (#219) 2026-08-21 20:03:24 +02:00
issue-268-project-roundtrip.test.ts fix(project): export the board you actually have, import the board the file names (#268) 2026-08-22 06:07:45 +02:00
issue-270-firmware-wifi-note.test.ts feat(firmware): say why an uploaded binary cannot find any network (#270) 2026-08-22 07:18:01 +02:00
key-button-bindings.test.ts
…
library-compile.integration.test.ts
…
library-manifest.test.ts feat(libraries): manifest auto-migration + name-affinity ranking + install-declares 2026-08-04 06:03:32 +02:00
load-example-transitions.test.ts
…
load-ngspice-for-node.test.ts
…
log-lux-slider.test.ts fix(sensors): illumination sliders are logarithmic, like the quantity they set 2026-08-18 22:42:25 +02:00
logic-families.test.ts
…
logic-gate-parts.test.ts
…
mcu-edge-pin-name-mapping.test.ts
…
mega-emulation.test.ts
…
micropython-libs-service.test.ts feat(micropython): install libraries from the micropython-lib index (#214) 2026-08-18 21:50:10 +02:00
microsd-real-firmware.test.ts
…
mixed-mode-bjt-switch-integration.test.ts
…
mixed-mode-scheduler.test.ts
…
motor-parts.test.ts
…
multi-board-integration.test.ts
…
netlist-builder.test.ts fix(spice): per-voltage supply rails — VIN/5V no longer clamped to the 3.3V logic rail 2026-08-15 08:29:39 +02:00
new-project-starter-sections.test.ts feat(editor): M5Stack section (Cardputer ADV, Core) ahead of STM32 in the starter dialog 2026-08-17 18:50:37 +02:00
ngspice-interactive.test.ts
…
ngspice-node-adapter.test.ts
…
oscilloscope-trigger.test.ts
…
part-pin-ownership.test.ts fix(sim): a net is a set of pins, and a part's own line belongs to the part 2026-08-23 01:23:41 +02:00
part-simulators-coverage.test.ts
…
phase-2-device-models.test.ts
…
phase-2-lm358-subckt.test.ts
…
phase-4-wire-resistance.test.ts
…
pi-linux-mode-restart.test.ts fix(pi): arrancar sin bridge deja de fallar en silencio + test del reinicio 2026-07-29 20:10:57 +02:00
pi-single-board-examples.test.ts
…
pi-uart-wire.test.ts fix(uart): la Pi puede hablar por serie con la placa de al lado 2026-07-29 07:40:13 +02:00
pi3-pico-uart.test.ts
…
piSlaveScanner.test.ts
…
pin-inspector-layout.test.ts fix(ui): a column is a RUN of pads, not two opposite ends of the board 2026-08-04 03:01:21 +02:00
pin-position-rotation.test.ts
…
pin-resolver-phase1b.test.ts
…
pin-resolver.test.ts
…
pin-trace-boards.test.ts fix(sim): a net is a set of pins, and a part's own line belongs to the part 2026-08-23 01:23:41 +02:00
pin-trace-precedence.test.ts fix(sim): a net is a set of pins, and a part's own line belongs to the part 2026-08-23 01:23:41 +02:00
pro-board-adc-pins.test.ts fix(spice): overlay boards were skipped before a single volt was injected 2026-08-22 05:13:41 +02:00
pro-examples-settled.test.ts fix(examples): el enlace directo a un ejemplo pro ya no parpadea un 404 2026-07-30 17:06:05 +02:00
pro-hardware-serial-seam.test.ts feat(serial): hardware-serial seams for the pro Web Serial monitor 2026-08-11 21:23:56 +02:00
pro-web-flash-seam.test.ts feat(flash): MicroPython web-flash seam (firmware install + raw-REPL upload) 2026-08-11 22:55:47 +02:00
protocol-parts.test.ts feat(components): DS3231 RTC module + GPS NEO-6M NMEA talker 2026-07-31 20:38:06 +02:00
rp2040-pio-servo.test.ts
…
rp2040-realtime.test.ts
…
runtime-burnout.test.ts
…
sd-card-gate.test.ts
…
sensor-parts.test.ts fix(ntc): the temperature sensor read wrong on 3.3V boards, and three examples decoded backwards 2026-08-03 07:33:20 +02:00
serial-batching.test.ts
…
shim-raw-serial-bytes.test.ts fix(sim): a raw-byte UART seam, because feedUart is UTF-8 2026-08-21 07:37:36 +02:00
simulation-parts.test.ts
…
simulation.test.ts
…
solver-determinism.test.ts
…
solver-perf-baseline.test.ts
…
solver-port-contract.test.ts
…
spice-ac.test.ts
…
spice-active.test.ts
…
spice-avr-mixed.test.ts
…
spice-digital.test.ts
…
spice-mosfet-diag.test.ts
…
spice-mosfet-pwm.test.ts
…
spice-npn-switch-diag.test.ts
…
spice-npn-switch-integration.test.ts
…
spice-passive.test.ts
…
spice-rectifier-integration.test.ts
…
spice-rectifier-live-repro.test.ts
…
spice-relaxation-oscillator.test.ts
…
spice-relay-integration.test.ts
…
spice-signal-generator-tran.test.ts
…
spice-slide-switch-spdt-repro.test.ts
…
spice-smoke.test.ts
…
spice-transient.test.ts
…
ssd168x-decoder.test.ts feat(epaper): 4-level greyscale rendering in SSD168xDecoder 2026-08-06 03:56:02 +02:00
ssd1306-render.test.ts
…
triple-pico-digital-chain.test.ts
…
uc8159c-decoder.test.ts
…
undo-redo.test.ts
…
usi-i2c-ack.test.ts fix(sim): drive the slave ACK in the USI I2C bridge (blank SSD1306 on ATtiny85) 2026-08-11 05:19:31 +02:00
virtual-i2c-devices.test.ts
…
voltmeter-waveform.test.ts
…
waveform-stats.test.ts
…
wire-auto-route.test.ts
…
wire-path.test.ts
…
wire-reroute.test.ts
…