Skip to content

test_a_start_serves_the_page_with_its_own_leaf: running_server finds no server mid-test, intermittently on macOS #6665

Closed

Description

@leaf-agent

tests/journeys/test_interact_server.py::test_a_start_serves_the_page_with_its_own_leaf fails intermittently on the macOS runner with assert None is not None at test_interact_server.py:992: server_model.running_server(page_dir) found no live server. In the scheduled run, the failing call was line 1028, after a server start was refused because the page selects a package (absent) this Leaf lacks. The test expects the other Leaf's server to go on serving after that refusal, but running_server reported none.

running_server (src/leaf/server.py) returns None in four cases: the server lock is not held, service.json is missing or disabled, the lock file is gone, or the incarnation in the lock doesn't match server_id. The next step is to learn which of these failed in a failing copy, and whether the refused start or the previous restart (first.wait) left the lease or the record in that state.

Evidence (ci dispatches on the macOS runner):

  • Scheduled run 44896279165 on c72a8ad03: failed at line 1028. The test hadn't failed in the eleven scheduled macOS runs before it.
  • 44920350281, --workers 1 --load 4 --copies 6 at c72a8ad03: 6 of 6 passed.
  • 44922543784, --workers 3 --load 2 --copies 18 at f1d623be2: 2 of 18 failed at line 992. The dispatch summary doesn't say which call reached line 992.

Dispatch command:

gh workflow run ci --ref BRANCH -f flake="--workers 3 --load 2 --copies 18 'tests/journeys/test_interact_server.py::test_a_start_serves_the_page_with_its_own_leaf'"

Cause of a failure tracked in #6659.

Activity

  1. added
    tend-ci-cause
    on Nov 21, 2026
  2. leaf-agent commented on Nov 21, 2026

    @leaf-agent
    CollaboratorAuthor

    Found the cause and opened a fix in #6668.

    The replaced server wasn't misreported; it had exited. The test deleted layer.json before writing its replacement. When the server's row refresh landed in that gap, read_page_registry's compose read the layer through load_registry, then found no record and failed assert record is not None. The row publisher exits the server when a refresh fails, so running_server found the lease released. An instrumented macOS dispatch caught that traceback in the failing servers' own logs, 3 of 36 copies (run 44925710678). Every failure so far, including both copies in 44922543784, was the line-1028 call.

    #6668 rewrites the record in one atomic step, as page init does. It passed 54 of 54 copies on the same macOS dispatch (run 44926717612). Its PR CI and landing are with tend-land.

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

    tend-ci-cause

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions