@@ -257,12 +257,40 @@ extension RunnerTests {
257257 XCTAssertEqual ( editableTextValue ( for: app. textFields. element ( boundBy: 0 ) , treatingPlaceholderAsEmpty: true ) , " " )
258258 }
259259
260- // The known limit: neither input has an identifier, and the successor takes the code field's index
261- // in the query that bound it, so the remaining posts resolve to it. Refusing point and focus
262- // re-resolution would not help, because the index-bound query itself returns the successor. The
263- // command must still fail typed, never report success or repair into the successor.
260+ // A one-time-code field whose value is a digit-count summary auto-submits on the last digit and a
261+ // named input takes its place. The bound field is gone, so the fill is the plain unverified
262+ // "typed": no unconfirmed evidence read off the successor, and no text in it.
264263 @MainActor
265- func testFillFailsTypedWhenAnIndistinguishableInputReplacesItMidDelivery( ) throws {
264+ func testFillIntoAutoSubmittingDigitCountFieldReportsNoEvidenceFromItsSuccessor( ) throws {
265+ let textField = try launchRemovableInputFixture (
266+ " --agent-device-text-entry-digit-count-value " ,
267+ " --agent-device-text-entry-auto-submit "
268+ )
269+
270+ let failureCountBefore = currentXCTestFailureCount ( )
271+ let response = executeTypeCommand (
272+ activeApp: app,
273+ command: try fillCommandFixture ( commandId: " fill-digit-count-auto-submit " , text: " 123456 " , at: textField)
274+ )
275+
276+ XCTAssertFalse ( didRecordXCTestFailure ( since: failureCountBefore) )
277+ XCTAssertTrue ( response. ok, String ( describing: response. error) )
278+ XCTAssertEqual ( response. data? . message, " typed " )
279+ XCTAssertNil ( response. data? . verification)
280+ XCTAssertFalse ( textField. exists)
281+ let nextScreenField = app. textFields [ " agent-device-auto-submit-next-screen-input " ]
282+ XCTAssertTrue ( nextScreenField. exists)
283+ XCTAssertEqual ( editableTextValue ( for: nextScreenField, treatingPlaceholderAsEmpty: true ) , " " )
284+ }
285+
286+ // Pins a known limit, not desired behavior: neither input has an identifier, and the successor
287+ // takes the code field's index in the query that bound it, so the remaining posts resolve to it
288+ // and land in the successor. Refusing point and focus re-resolution would not help, because the
289+ // index-bound query itself returns the successor. What must hold is a typed failure, never success
290+ // or a repair into the successor. The successor's "23456" records the wrong-target side effect; a
291+ // per-instance identity would make that assertion fail, and the test should then change with it.
292+ @MainActor
293+ func testFillPinsKnownLimitWhenAnIndistinguishableInputReplacesItMidDelivery( ) throws {
266294 let textField = try launchRemovableInputFixture (
267295 " --agent-device-text-entry-replace-after-input " ,
268296 " --agent-device-text-entry-unnamed-input "
0 commit comments