Skip to content

bug(lsp): release stale read waits when newer document intent arrives #924

Description

@Juliusolsson05

Expected behavior

Newer intent may cancel and locally abandon stale read requests without losing ordering or accepting late responses. Bound abandoned RPCs and retire unhealthy server instances deliberately.

Source finding and impact

sendDocRequest holds client and server-document queues until response or the request timeout. A later intent invalidates publication but does not locally abandon the stale wait, so newer synchronization can wait behind an already obsolete request.

Evidence and environment

Inspected source at 552914f5610518458f944fa1bdaf63f243685bd1 on 2026-09-12 in the local macOS workspace. This finding has not yet been reproduced through a running application or the package integration suite.

Regression and acceptance

Hold a language-feature response, issue a newer change, and have the server ignore cancellation. New text synchronizes within the explicit abandonment budget, late output is rejected, and pending RPC count remains bounded. This concerns feature synchronization latency, not a claim that typing freezes.

The resolving PR must protect the observable contract and document any remaining uncertainty. This planning pass makes no runtime changes.

Refs #918; planning finding F11.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions