Skip to content

bug: flaky macOS native service lifecycle test #1571

Description

@PsiACE

Describe the bug

test_native_personal_service_lifecycle intermittently fails during service installation in the macos-launchagent CI job. Rerunning the same commit passed without code changes.

Observed on PR #1570, commit b2e59269.

Evidence

Steps to reproduce

Run the Native personal service workflow on a disposable macOS runner. The failing test is:

tests/native/test_personal_service_lifecycle.py::test_native_personal_service_lifecycle

The failure is intermittent; a deterministic reproduction is not yet available.

Expected behavior

The registered LaunchAgent starts successfully and becomes reachable within the startup window.

Actual behavior

controller.install() raises:

the personal service was registered but did not become live: cannot reach http://127.0.0.1:49212

The controller uses a 30-second startup window. The reported server.stderr.log tail was empty.

The subsequent launchd diagnostic step reported that the service could not be found. The test performs cleanup in finally, so this diagnostic does not establish its state at the moment of failure.

Environment

  • Python 3.12.10
  • macOS 26.6.2, ARM64
  • Runner image: macos-26-arm64, version 20260907.0351.1
  • Both attempts used the same commit and runner image version.

Investigation

Capture launchd state and process diagnostics before test cleanup, then determine whether the intermittent failure comes from startup timing, runner conditions, or service behavior. The root cause is not yet confirmed.

Activity

  1. Modo-me commented on Sep 15, 2026

    @Modo-me

    Hello, I'm interested in this issue. Could you assign it to me?

  2. moved this from Todo to In progress in PowerContexton Sep 21, 2026
  3. sunlight798 commented on Sep 21, 2026

    @sunlight798
    Contributor

    I notice that this issue has not been resolved, and I am very interested in it.

  4. moved this from In progress to Done in PowerContexton Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions