Skip to content

findPowerDomainControls

findPowerDomainControls(netlist, controls, ports): readonly CompileWarning[]

Defined in: packages/compiler/src/power-domain-control.ts:98

A device exposed as a sweepable user control that is power-domain hardware: it sits outside the audio graph and no panel entry claims it.

Why this is reported rather than decided. Structure cannot tell a user control from fixed hardware on this side of the boundary. A standby switch and a mains fuse are both switches in the supply, and one belongs on the front panel while the other belongs inside the chassis — only the document can say which. So the compiler names the ambiguity and the fix is a deviceInterface.controls entry, or a kind that is not a switch.

A rule was attempted and it does not exist. The promising one was “a switch declaring a FuseRating is a fuse, therefore not a control” — legal evidence, since it reads the presence of a typed property rather than a name, and 26 corpus switches declare one. It fails on its own data: mesa-boogie-dual-rectifier’s SRC_POWER_SWITCH_FUSE_4A, orange-rockerverb’s SRC_PRIMARY_POWER_SWITCH_AND_FUSE and sunn-beta-lead’s SRC_POWER_SWITCH_FUSE are each a power switch and a fuse in one two-terminal component, and a power switch is exactly the user control the rule would have suppressed. Narrowing it to “two terminals and no switch-shaped property” keeps all three, because a fuse and a combined switch-and-fuse are structurally identical: two terminals, one closed contact. The difference is whether a human operates it, which is not a fact about the circuit.

Measured 2026-09-04: 67 of the corpus’s 958 program controls, across the packets that model their own power supply. It read 80 before boss-bf-2’s three service trims were declared, and 76 before every signal jack became a seed — see the note in the function. They are mains switches, voltage selectors, and mains, HT and heater fuses — vox-ac30-top-boost alone contributes SW_MAINS, a 230/120 selector and four fuses. A fuse offered to a player as a knob to sweep is the shape of the problem.

The traversal’s one known imprecision is at the B+ boundary: it stops at the transformer but not at the rectifier and filter, so B+ nodes stay reachable through a tube’s plate. That keeps SW1_STANDBY and S_STANDBY_SWITCH out of this warning, which is right — a standby switch is a front-panel control — and also keeps F2_HT_FUSE out, which is not.

Netlist

readonly object[]

readonly number[]

readonly CompileWarning[]