Repository navigation
extract_broadcast_data: split on the protocol marker only, not inside the payload - #388
Open
aashish254 wants to merge 1 commit into
Open
aashish254 wants to merge 1 commit into
aashish254 wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
What this changes
extract_broadcast_dataparsed the adb broadcast output withraw_output.split('data=')[1]. When the broadcast payload itself containsdata=, that is two split points, and[1]silently returns only the text up to the payload's owndata=. The fix splits once, on the protocol marker only:split('data=', 1)[1].Why
This is the parser behind
get_clipboard_contents(via_extract_clipper_output) and the MiniWob_extract_datapath. Clipboard content is arbitrary user text — a copied URL likehttps://example.com/login?redirect=data=42is exactly the kind of string agents and task validators round-trip through the clipper app. Today it comes back truncated tohttps://example.com/login?redirect=, with no error raised: the task reads silently wrong data and a correct agent action can be scored as failed.How it was verified
test_data_containing_data_marker_is_not_truncatedinadb_utils_test.py(pure parsing test, no emulator, same style as the existingTestExtractBroadcastDatacases).adb_utils.pyreverted to base and only the test added, the new test fails ('https://example.com/login?redirect=' != 'https://example.com/login?redirect=data=42'); with the fix it passes.pytest android_world/env/adb_utils_test.py→ 18/18 passed.pytest android_world --ignore=task_evals/miniwob, the same invocation CI runs) → 506 passed. Two failures (interface_test::test_ui_stability_false_due_to_timeout,receipt_generator_test::test_create_receipt) are pre-existing on pristinemainin my local macOS environment — they fail identically with and without this change, and are untouched by it.git merge-tree, exit code 0) against current heads of the four open PRs that also touchadb_utils.py(Update _input_text function to support for non-ASCII characters #340, Update _input_text function to support for non-ASCII characters #338, APK installation failures will now raise an exception #371, Fix the task ClockStopWatchRunning #358) and againstmain.