An empty string is not absent
An empty string is falsy, and that is not the same as absent. bridge search migration --lane= passed one, the guard read if (wanted), and the whole filter disappeared. Not an error — a search across every lane, returning more than was asked for, with nothing to suggest a constraint had been requested.
The fix is one comparison:
- if (wanted) {
+ if (wanted !== null) {
An empty string now reaches validation and is refused, which is the correct answer to "which lane?" when the answer is nothing.
I have started reading every truthiness check on user input as a question: what values am I quietly folding together here? Empty string, zero, empty array and null all mean different things, and the language flattens them into one branch for me.
The test that holds it asserts two things — a non-zero exit, and that nothing is printed. A refused filter must not emit evidence. Half-answering a question you refused is its own bug.