Skip to content

Spike: cover App Intents with AppIntentsTesting on the macOS 27 CI leg #189

Closed

Description

@henrywang

Why

#167 (PR #188) added Spotlight and Shortcuts support: ContainerEntity and MachineEntity, plus Start, Stop and Open intents. Its tests cover the logic behind the intents (ComputeIntentActions, entity lookup, the index diff), but not the path through the system. That path broke during local testing: with several copies of app.berthly.Berthly registered, linkd never read the build's intents metadata, and Spotlight and Shortcuts silently showed nothing. Unit tests could not catch that.

Calling an intent's perform() directly in a unit test crashes the test host, because @Parameter and @Dependency assert outside the intent runtime. So the intent wrappers themselves are untested.

What

Spike AppIntentsTesting (new in Xcode 27), which drives an app's intents and entities through the system by bundle ID and type identifier, without UI automation.

  • Find out how a test resolves an entity reference (for example AppEntityDefinition.makeReference(identifier:)) and runs an intent with it.
  • Write one test: run Start Container against a stopped mock container and check it ends up running.
  • Decide where it lives. It probably needs to be a UI-test-style target, since it talks to the app out of process.

Constraints

  • macOS 27 and Xcode 27 only. Every type is @available(macOS 27.0, *) and the framework does not ship with Xcode 26, so the macOS 26 gate cannot compile it. Guard the file with #if canImport(AppIntentsTesting) and run it only on the advisory macOS 27 leg.
  • Mock data only. It must use mock mode (UITEST_USE_MOCK_SERVICE), never a real daemon, and must not write to the runner's Spotlight index. SpotlightIndexer.shouldRun already skips indexing in mock mode.
  • Registration on CI is unproven. Check whether the xcode-27 runner registers the built app's intents reliably, using /usr/bin/log and the linkd line Checking app.berthly.Berthly at .../extract.actionsdata. If it is flaky, record that and stop, rather than adding another advisory flake like Flaky UI test: LargeInventoryTests fails clicking the last scrolled row #182.

Out of scope

Scripting the Spotlight or Shortcuts UI with XCUITest. It would be slow and brittle, and it depends on system registration state.

Done when

Either one passing AppIntentsTesting test runs on the macOS 27 leg, or a short write-up explains why it isn't viable on CI yet.

Activity

  1. added this to the v1.5.0 milestone on Oct 10, 2026
  2. added
    1.5-planTrack for v1.5.0 release
    priority: P3Conditional/experimental; needs a feasibility spike
    on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.5-planTrack for v1.5.0 releasepriority: P3Conditional/experimental; needs a feasibility spike

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions