XCTest Nightly: text-input probe test reuses a commandId the runner journal now answers from its record

未关闭 适合新手
#4,212 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
90/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
ios, typescript

调研方向

阅读 apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/UnitTests/RunnerTests+TextInputProbeTests.swift 第239–240行附近的内容,并为第二个 type 命令指定唯一的 commandId。然后运行 iPhone 全套测试和 pnpm check:xctest-selection;两者都通过,并且如果改动成本不高,选择映射会将 RunnerCommandJournal 的变更路由到这些探测测试,即为完成。

由索引模型根据 Issue 内容生成。

描述

bug ready-for-agent

Purpose

XCTest Nightly has failed twice in a row (runs 41578854330 on 2026-11-03 and 41773968778 on 2026-11-04), after green nights through 2026-11-02 at 343b7fcf41. Both fail in one test.

Current behavior

RunnerTests.testFreshCoordinateTapContainsUnavailableTextInputProbe (apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/UnitTests/RunnerTests+TextInputProbeTests.swift:239-240) sends the same type command twice, both with commandId: "type-after-unavailable-probe". The first send is expected to fail with TEXT_INPUT_NOT_FOCUSED; the second, after a tap that focuses the field, is expected to type.

Since #4140 (e4034a714d), the runner's command journal answers a repeated commandId from its recorded outcome. So the second send returns the first send's TEXT_INPUT_NOT_FOCUSED, and the field stays empty:

RunnerTests+TextInputProbeTests.swift:239: error: XCTAssertTrue failed
RunnerTests+TextInputProbeTests.swift:240: error: XCTAssertEqual failed: ("Optional("")") is not equal to ("Optional("must-not-type")")

The journal behavior is intended (ADR 0005); the test reuses an id it must not reuse.

Required behavior

  • The second type in this test sends its own commandId.
  • XCTest Nightly passes the iPhone full suite.
  • The PR lane's XCTest selection did not run this test for #4140's journal change. If the selection map can cheaply route RunnerCommandJournal changes to the text-input probe tests, it does.

Completion conditions

  • The test passes in the iPhone full suite.
  • pnpm check:xctest-selection passes.
主要语言
TypeScript
星标
5.3k
派生
377
平均合并
13 小时 49 分钟
30 天内合并 PR
650

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

callstack/agent-device 的其他 Issue

查看 callstack/agent-device 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。