Skip to content

Make webPushDispatcher claim timing tests deterministic #2040

Closed

Description

@integry

Two independent desktop transport validation runs exposed a nondeterministic notification regression test in packages/api/test/webPushDispatcher.test.ts:

  • Full Suite job 99690003098 failed the line 229 plan-action case: expected one sent job, observed zero; 335 other test files/runs passed and the prior transport head passed.
  • Exact F37 Validate Changes job 99694211438 failed the adjacent line 195 advertised-stop case: worker.runOnce expected one, observed zero; the other eight notification regression runs passed.
  • F37 changes only three Windows discovery harness/test files, and exact-head native Windows durability passed, so this is independent of Connect discovery.

Implement a focused deterministic test/harness correction on base 1953-epic-desktop-transport-api:

  • Identify and eliminate the real clock, claim, lease, or async scheduling race shared by these adjacent tests.
  • Preserve the production dispatcher contract and assertions that stop remains intent-only while plan remains a Planner Studio link.
  • Prefer an injected/fake clock and explicit claim lifecycle synchronization over retries, sleeps, increased timeouts, or weakened assertions.
  • Prove isolation across repeated runs and preserve all notification regression cases.
  • Do not change desktop Connect discovery, transport authority, production timeout behavior, or unrelated product code.
  • Run the focused test repeatedly, Validate Changes, and Full Suite.

Activity

  1. propr-dev commented on Sep 1, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using codex agent with gpt-5.6-sol model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: codex
    • Model: gpt-5.6-sol
    • Branch: 2040/gpt-5.6-sol-make-webpushdispatcher-cl-20260901-0042-8am
    • Base Branch: 1953-epic-desktop-transport-api
    • Worktree: issue-2040-20260901-0042-gpt-5.6-sol-8am

    🔍 Track Task Execution

  2. added a commit that references this issue on Sep 1, 2026
  3. integry commented on Sep 4, 2026

    @integry
    OwnerAuthor

    Implemented by #2043, merged into 1953-epic-desktop-transport-api (6b4f868). Closing the completed child issue during epic issue/PR reconciliation. Final desktop integration and delivery remain tracked by #1950 / #1970; this does not claim a main-branch release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions