Skip to content

fix(adapters): Select typed the option name when the option did not exist - #331

Merged
AminChirazi merged 1 commit into
relanded/4-conjunctive-anchorsfrom
relanded/5-select-missing-option
Aug 1, 2026
Merged

fix(adapters): Select typed the option name when the option did not exist#331
AminChirazi merged 1 commit into
relanded/4-conjunctive-anchorsfrom
relanded/5-select-missing-option

Conversation

@AminChirazi

Copy link
Copy Markdown
Contributor

Re-landed onto main. The original stack (#317/#319/#321/#322/#326) merged into each other's branches rather than up to main, so only #316 actually landed. These five commits are the unchanged remainder, rebased onto current main.\n\nStacked, and the last of them. Re-land of #326.

A JS exception inside call_js_fn does not reach Rust as an Err, so the throw on a missing option was indistinguishable from "this is not a <select>" — the one case the code below it handles — and fell through to typing the option's name into the dropdown.

Typing into a <select> is itself a prefix search, so the step landed on whatever option starts with the same letters and reported success. A plausible wrong answer, chosen quietly.

The two cases are now different answers: not_select keeps the fall-through, a name matching nothing fails naming it. Prefix matching is untouched — value, then exact text, then prefix — so Audit selecting Auditor stays correct.

I had a test case wrong at first and fixed the test, not the code: I asserted Audit must fail. It must not. The comment records why that case is deliberately absent.

Red path plus the green half, because a fix that made every select fail would pass the red test alone.

The one question: still a recording — this removes a path where the trace claimed one option and the app got another.

🤖 Generated with Claude Code

…xist

A JS exception inside the driver does not reach Rust as an `Err`, so the
throw on a missing option looked exactly like "this element is not a
<select>" — the one case the code below it exists to handle — and it fell
through to typing the option's name into the dropdown.

Typing into a <select> is itself a prefix search, so the step landed on
whatever option starts with the same letters and reported success. Not a
failure and not the option that was asked for: a plausible wrong answer,
chosen quietly.

The two cases are now different answers rather than the same one. A status
value comes back and is inspected: `not_select` keeps the fall-through to
typing, which is what it was always for, and a name matching nothing fails
naming it. Prefix matching is untouched — value, then exact visible text,
then prefix — so `Audit` selecting `Auditor` stays correct.

Found while building the multi-option form, whose first version had the same
defect and was caught by its own red-path test.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@AminChirazi
AminChirazi force-pushed the relanded/4-conjunctive-anchors branch from fc9dc8e to ffecad0 Compare August 1, 2026 10:00
@AminChirazi
AminChirazi force-pushed the relanded/5-select-missing-option branch from b2b07dd to 20fd863 Compare August 1, 2026 10:00
@AminChirazi
AminChirazi merged commit 8943fd0 into relanded/4-conjunctive-anchors Aug 1, 2026
9 checks passed
AminChirazi added a commit that referenced this pull request Aug 1, 2026
Three comments still described the code as it was before #331 and #342.
This repository treats prose describing code that no longer exists as a
defect, and one of the three was user-visible: `command_flow()` told a
Windows adopter "egress containment is not implemented on Windows yet",
which is now simply false.

The wording had to change for a second reason, and it is the more
interesting one. That reason was written when the answer was permanent —
nothing on Windows could be contained, so the tier said so. Now the tier
is decided by the RUN, and `command_flow()` is a PRE-RUN probe. Its job
changed from "reporting a limitation" to "not predicting a result".

So it says what is true of a run that has not started: not contained,
and here is whether this host can support it. The `Enforced` arm stays
absent for a reason that outlived the filters landing — seven steps can
fail after the probe passes, and a prediction reported as a result is
the false green of #300 and #301 by optimism rather than by silence.

The test that pinned the old wording asserted on the roadmap phrase, so
it would have gone green forever while the message rotted. It now
asserts the negative: the reason must NOT claim the feature is
unimplemented, and the tier must not be optimistic. Same claim it always
made, minus the hostage to a sentence.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XdXrbksFKirm7yW6EDunur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant