Skip to content

Preserve published authentication completion across cancellation admission race #2210

Closed

Description

@integry

Separate desktop acceptance correction; target epic #1970 /1950-epic-cross-platform-dsk only, never main. Found in unchanged authentication handoff code while validating unrelated Claude-status PR #2206, so keep separate.

Evidence: macOS ARM64 job101876026838 in run34165568738 fails apps/desktop/src/authentication-handoff.test.ts test "lets a published completion win a concurrent cancellation request": AbortError Authentication was cancelled at authentication-handoff.ts:279. Test explicitly waits for published result0 before aborting. tryTerminal first awaits readOwnedMarker(result), then awaits started marker, then writes cancellation if signal aborted; next result read throws if cancellationWritten. Potential stale-read window across these awaits permits a completed handoff to become cancellation. Investigate and fix the concrete race without weakening intended cancellation/ownership/drain behavior.

Acceptance: completion already published before cancellation admission wins; genuinely cancelled running process remains cancelled and drains descendants; deterministic regression exercises stale-read/interleaving rather than relying on sleeps; focused Linux/macOS handoff tests pass. Do not skip/relax assertion or mark failing code successful. Keep production/test diff small. Link PR with Closes this issue, leave open for Ultrafix/root validation. Related final acceptance #1962. Windows remains deferred.

Activity

  1. propr-dev commented on Sep 7, 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: 2210/gpt-5.6-sol-preserve-published-authen-20260907-2216-ldb
    • Base Branch: 1950-epic-cross-platform-dsk
    • Worktree: issue-2210-20260907-2216-gpt-5.6-sol-ldb

    🔍 Track Task Execution

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

    @integry
    OwnerAuthor

    Merged via #2211 into desktop epic #1970 at e8efebe. Final Ultrafix found no code blockers; independent nine handoff tests pass including deterministic FIFO race coverage. Full suite, both Linux and both macOS package checks, and all four Linux/macOS packaged Connect checks passed. Windows remains explicitly deferred. Final integrated-head acceptance remains #1962; running isolated app/backend currently a1cf599.

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