fix(adapters): Select typed the option name when the option did not exist - #331
Merged
AminChirazi merged 1 commit intoAug 1, 2026
Conversation
…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
force-pushed
the
relanded/4-conjunctive-anchors
branch
from
August 1, 2026 10:00
fc9dc8e to
ffecad0
Compare
AminChirazi
force-pushed
the
relanded/5-select-missing-option
branch
from
August 1, 2026 10:00
b2b07dd to
20fd863
Compare
This was referenced Aug 1, 2026
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A JS exception inside
call_js_fndoes not reach Rust as anErr, 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_selectkeeps the fall-through, a name matching nothing fails naming it. Prefix matching is untouched — value, then exact text, then prefix — soAuditselectingAuditorstays correct.I had a test case wrong at first and fixed the test, not the code: I asserted
Auditmust 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