Verify text input before reporting success - #387
Conversation
There was a problem hiding this comment.
馃挕 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 43a0ae845d
鈩癸笍 About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 馃憤.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| normalized_expected = _normalize_input_text(text) | ||
| if clear: | ||
| return normalized_actual == normalized_expected | ||
| return normalized_expected in normalized_actual |
There was a problem hiding this comment.
Verify that append input changed the field
When clear=False and the field already contains the requested substring, an unchanged post-state passes this check鈥攆or example, typing "foo" into an existing "foo" field can be reported as verified even if the transport silently made no edit. This preserves the false-success case the new postcondition is intended to catch and contradicts the documented append behavior in mobilerun/agent/utils/signatures.py:184-186; compare against the pre-input value or otherwise verify the append actually occurred.
Useful? React with 馃憤聽/ 馃憥.
Summary
type_textandtype_text_directReproduction matrix
Text typed and verified; fresh state was exactlyMRTEST7319No search result was selected and no message was sent.
Tests
.venv/bin/pytest -q(226 tests)emulator-5554with Ollamagemma4:latest: the agent replaced Settings search withMRTEST7319, returnedText typed and verified, and fresh Portal state contained the exact value.R5CW41WF6WDwas not connected.Companion PRs