#525

Path and app-name follow-ups from the #490 review

OpenZhehanZhangwants to merge intofrom

Summary of changes

The smaller items from the review of #490, which merged with Joseph's fixes for the blocking points.

  • Swipe in a path. A swipe step takes no in: n (a list of the latest read), as scroll_to already refused it.
  • Unknown app names. A launch name nothing knows is refused before the first action is sent, wherever it is in the batch or in a path's steps. A dotted name shaped like a web address ("Booking.com", "Twitch.tv") is a name, not a bundle id. "tv.twitch" and "com.apple.mobiletimer" still are.
  • Editions and installed apps. The app resolves names with KnownApps.launchID: a known app by the edition this iPhone has (otherIDs, Bilibili's international one), then any installed app by its Home Screen name (DynamicApps, from #331's app list). This is the seam #490 left in LiveCore.swift.
  • Apps by Name off. A do that names an app is refused with nothing sent, in place of sending its actions to whatever app is in front.
  • Path labels. A path reads "Run “goal”" on the Live Activity, the home page and an approval card, else its steps by the text they name, in place of "Act on the screen".
  • Intent hint. The Harness no longer asks the model for an intent, which stays in #463.
  • docs/ios-core.md describes these and the three fixes in #490.
  • Xcode build. Countdown.sameControl in Approvals.swift (from #436) now checks one reading at a time with its types written out. As one expression, Xcode stopped on it ("unable to type-check this expression in reasonable time"), so main's app did not build for the simulator. Same result.

Not changed: when the session app's launch really is inserted, the action numbers in the answer still count it (the known gap noted on #490).

Motivation (Closes #N)

The items marked "Not blocking, left for you" on #490.

Test plan

swift test for PokiCore on Linux (Swift 6.4.2): 337 tests, 0 failures. New tests, what each protects, and a change that makes it fail:

  • AppNamesTests.testAnUnknownNameLaterInTheBatchSendsNothingBeforeIt: a tap before an unknown name, plain and inside a path, is not sent. Fails if the up-front unknownAppName check in Computer.act is removed.
  • AppNamesTests.testANameWithADotIsANameUnlessItIsShapedLikeABundleID: the bundle id shapes, and "Booking.com" never reaching the runner. Fails if looksLikeBundleID goes back to "has a dot and no space".
  • AppNamesTests.testWithNamesOffTheSessionsAppIsRefusedNotIgnored: with Apps by Name off, do {app, actions: [tap]} sends no tap. Fails if the else branch in Computer.act is removed.
  • PathTests.testASwipeInAPathTakesNoListNumber: both forms of in: n on a swipe are refused and nothing is tapped. Fails without the .swipe case in pathRoutine.
  • PathTests.testAPathReadsAsItsGoalOrItsSteps: the path labels. Fails without the path case in Computer.label.
  • GymTests.testWithTheQuickReadOnTheReadIsStillMadeAgainUntilTheLaunchedAppIsInFront: the read-again fallback with quickRead on, Photos arriving after the whole launch pause. Fails if the re-read after the final read is dropped now that the quick read samples the screen.
  • DynamicAppsTests.testALaunchByNameOpensTheEditionThisPhoneHas (app tests): the installed edition of a known app, and an installed app by name.

CI, the iOS app workflow on GitHub's runners:

  • Run 44547765620, the previous head: the simulator build stopped on the Approvals.swift error above.
  • Run 44551562939, this head: the app builds, and every PokiCore suite that ran passed on the Mac, the new tests among them. It stopped on three time limits that #481 raises (the PokiCore step's 15 minutes, the field check reading before the fixture is in front, the agent chat probe's first session_timeout).
  • Run 44564770165, this head with #481 merged in on a throwaway branch: PokiCore, the in-process checks, the agent chat, both Release builds and the Simulator smoke test pass. The app unit tests ran 399, and 18 failed, none in code this PR changes: 12 also fail on #481's own run, and the other 6 are a page that did not load on the runner (BrowserGuardTests), a Speech Recognition prompt over the page under test (SigningPageTests), the loopback page's status after a task (FrontendSubtractionTests), the conversation archive (SessionArchiveTests, InProcessPasscodeTests) and voice instructions main no longer has (VoiceLanguageTests). DynamicAppsTests.testALaunchByNameOpensTheEditionThisPhoneHas passes.

Not run on a physical iPhone.

Screenshots or screen recording

N/A. The only visible change is the label of a path step.

AI assistance: Claude Code. I have reviewed and understand these changes.