From 37e62989928eccf0132c9fb1f8f2a25102ce7139 Mon Sep 17 00:00:00 2001 From: PJ Date: Tue, 18 Aug 2026 20:20:47 +0530 Subject: [PATCH] test(conformance): g4 sees a doubling appended to what the field held Redaction cost the gate this shape on android: the driver typed the value twice onto existing content, so the whole value is not its own doubling and the typed value is not in the trace to compare against. The recorded-value check still catches it on the backends that record one. Red at this commit: G4 reports PASS on a field that grew by one string twice. --- conformance/gates.sh | 2 ++ conformance/testdata/g4-appended-doubling/exit_status | 1 + conformance/testdata/g4-appended-doubling/output.log | 1 + conformance/testdata/g4-appended-doubling/trace.jsonl | 2 ++ conformance/testdata/generate.py | 10 ++++++++++ 5 files changed, 16 insertions(+) create mode 100644 conformance/testdata/g4-appended-doubling/exit_status create mode 100644 conformance/testdata/g4-appended-doubling/output.log create mode 100644 conformance/testdata/g4-appended-doubling/trace.jsonl diff --git a/conformance/gates.sh b/conformance/gates.sh index c36a449..6208cce 100755 --- a/conformance/gates.sh +++ b/conformance/gates.sh @@ -517,6 +517,8 @@ self_test() { "$(gate_no_doubled_text "${testdata}/pass" && echo PASS || echo FAIL)" assert "G4 doubled text caught with the typed value redacted" FAIL \ "$(gate_no_doubled_text "${testdata}/g4-doubled-text" && echo PASS || echo FAIL)" + assert "G4 doubling appended to existing content caught" FAIL \ + "$(gate_no_doubled_text "${testdata}/g4-appended-doubling" && echo PASS || echo FAIL)" assert "G4 repeated character is not doubling" PASS \ "$(gate_no_doubled_text "${testdata}/g4-repeated-character" && echo PASS || echo FAIL)" assert "G4 doubled text caught from the recorded value" FAIL \ diff --git a/conformance/testdata/g4-appended-doubling/exit_status b/conformance/testdata/g4-appended-doubling/exit_status new file mode 100644 index 0000000..c227083 --- /dev/null +++ b/conformance/testdata/g4-appended-doubling/exit_status @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git a/conformance/testdata/g4-appended-doubling/output.log b/conformance/testdata/g4-appended-doubling/output.log new file mode 100644 index 0000000..ca891a9 --- /dev/null +++ b/conformance/testdata/g4-appended-doubling/output.log @@ -0,0 +1 @@ +run complete diff --git a/conformance/testdata/g4-appended-doubling/trace.jsonl b/conformance/testdata/g4-appended-doubling/trace.jsonl new file mode 100644 index 0000000..7b3c183 --- /dev/null +++ b/conformance/testdata/g4-appended-doubling/trace.jsonl @@ -0,0 +1,2 @@ +{"step": 1, "timestamp": "2026-06-06T12:00:00.600000+05:30", "hierarchy": {"elements": [{"resourceId": "LoginScreen", "class": "android.view.View", "editable": true, "bounds": {"left": 34, "top": 87, "right": 286, "bottom": 135}, "attrs": {"resource-id": "LoginScreen", "class": "android.view.View", "text": ""}}, {"resourceId": "LoginEmail", "class": "android.widget.EditText", "editable": true, "bounds": {"left": 34, "top": 87, "right": 286, "bottom": 135}, "attrs": {"resource-id": "LoginEmail", "class": "android.widget.EditText", "text": "demo@"}}, {"resourceId": "LoginPassword", "class": "android.widget.EditText", "editable": true, "bounds": {"left": 34, "top": 87, "right": 286, "bottom": 135}, "attrs": {"resource-id": "LoginPassword", "class": "android.widget.EditText", "text": ""}}, {"resourceId": "LoginSubmit", "class": "android.view.View", "editable": true, "bounds": {"left": 34, "top": 87, "right": 286, "bottom": 135}, "attrs": {"resource-id": "LoginSubmit", "class": "android.view.View", "text": ""}}]}, "next_action": {"kind": "InputText", "text": "[redacted]", "selector": "testTag:LoginScreen > testTag:LoginEmail"}} +{"step": 2, "timestamp": "2026-06-06T12:00:01.200000+05:30", "hierarchy": {"elements": [{"resourceId": "LoginScreen", "class": "android.view.View", "editable": true, "bounds": {"left": 34, "top": 87, "right": 286, "bottom": 135}, "attrs": {"resource-id": "LoginScreen", "class": "android.view.View", "text": ""}}, {"resourceId": "LoginEmail", "class": "android.widget.EditText", "editable": true, "bounds": {"left": 34, "top": 87, "right": 286, "bottom": 135}, "attrs": {"resource-id": "LoginEmail", "class": "android.widget.EditText", "text": "demo@folio.appfolio.app"}}, {"resourceId": "LoginPassword", "class": "android.widget.EditText", "editable": true, "bounds": {"left": 34, "top": 87, "right": 286, "bottom": 135}, "attrs": {"resource-id": "LoginPassword", "class": "android.widget.EditText", "text": ""}}, {"resourceId": "LoginSubmit", "class": "android.view.View", "editable": true, "bounds": {"left": 34, "top": 87, "right": 286, "bottom": 135}, "attrs": {"resource-id": "LoginSubmit", "class": "android.view.View", "text": ""}}]}} diff --git a/conformance/testdata/generate.py b/conformance/testdata/generate.py index b17a89c..98df24e 100644 --- a/conformance/testdata/generate.py +++ b/conformance/testdata/generate.py @@ -152,6 +152,16 @@ write_run( ], ) +# G4: the driver typed the value twice onto what the field already held, so the +# whole value is not its own doubling. What it grew by is. +write_run( + "g4-appended-doubling", + [ + step(1, 600, login_screen("demo@", ""), input_action("LoginEmail")), + step(2, 600, login_screen("demo@folio.appfolio.app", "")), + ], +) + # G4: an action typed at coordinates names no field. The step carries nothing # the gate can check, and it may not stop the gate checking the rest. write_run(