Skip to content

Make Issue handoff test await asynchronous lease cleanup #1461

Description

@luokerenx4

The Linux full-suite job for stable candidate 7b9db35 failed one assertion in src/workspaces/service.issue-assignee-session.spec.ts:163, in hands webpi ownership to an Issue turn and excludes a racing dispatch: expected isResumeActive(resumeId) false, observed true. The other 773 files passed.

Evidence: https://github.com/TraderAlice/OpenAlice/actions/runs/34390482383/job/102597752792

The test waits for headless task status done, then immediately checks session state and the active-resume lease. In service.ts, headlessTasks.complete publishes done before asynchronous completion bookkeeping; the promise finally block awaits sessionCoordinator.transition and only then deletes activeResumeIds. Thus done is not a completion barrier for lease cleanup. The preceding fresh-owner test already polls the final inactive state.

Reproduce with the full Linux suite on a loaded runner, or delay final session transition/bookkeeping while letting task status become done. Five unchanged local runs of this test file passed. The expected correction is to await the final paused/inactive invariant, preserving the existing concurrent-dispatch rejection assertion, rather than altering runtime lock timing.

Deferred from this release-only operation because this is an unrelated test synchronization defect, not a demonstrated product failure. Preserve the original failure and rerun the source gate; a green retry does not replace fixing the test. No broker initialization or orders were involved.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions