Skip to content

fix(lsp): retain admitted diagnostic snapshots for pull - #4524

Open
ScriptedAlchemy wants to merge 20 commits into
masterfrom
fix/lsp-retained-diagnostic-snapshots
Open

ScriptedAlchemy wants to merge 20 commits into
masterfrom
fix/lsp-retained-diagnostic-snapshots

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

This PR targets master. Remaining merge order: #4524, #4489, #4485, #4527, #4528, #4530, #4531, #4529, #4534.

Use merge commits. After merging a parent, retarget its child to master before merging the child. Auto-merge is disabled.

Completed document diagnostics remain available for later push and pull reads. Each retained report revalidates document content, overlay lifetime, canonical code generation, and committed analyzer publication before reuse. Changed findings produce a new result ID even when document text and coverage are identical. Refreshing another document preserves the first document's valid report.

Asynchronous pull validations settle during background processing and release their operation permits even if the client never retries. Settlement retains one matching response without publishing diagnostics or requesting a workspace refresh. Publication retries preserve the admitted snapshot and exact operation identity.

Analyzer publication eligibility now lives beside synchronized document state in the existing client owner. Broker reads couple that committed evidence with the actual retained findings. Failed admission, cancellation, settings replacement, process retirement, and stale completion revoke eligibility. Successful roots can commit while another root fails. Dashboard coverage continues to describe the latest refresh scope. The application uses the canonical diagnostic projection for both rendered findings and identity.

Validation on the combined correction:

  • All three reproduced regressions passed individually. They cover abandoned validation capacity, changed findings with identical coverage, and alternating same-language documents including an empty publication.
  • Diagnostic snapshot module passed 32 tests. Application adapter module passed 4 tests.
  • The real scheduler dependency-generation journey passed. Unchanged A observes B's published successor and rejects dirty or stale canonical authority.
  • Both affected formatting targets and scoped Clippy passed. Normal commit hooks passed.
  • Backend verification also passed 51 analyzer integration cases, 67 analyzer unit cases, and the canonical projection case. Independent protocol and backend source reviews found no introduced issues.

The prior CI head also failed the Codex native-cache relocation test. Its rejecting activation condition is under separate investigation; this diagnostic correction does not claim to resolve it. Fresh CI is pending.

Fixes #4404.

Transfer completed diagnostic work into bounded session-owned reports so
push publication and repeated pulls share the same admitted evidence.
Fence retained reports to document and scope identity, and retire exact
operations on invalidation without claiming analyzer work has settled.

Keep incomplete results truthful and retryable, and retry publication
only for outbound backpressure rather than duplicate or oversized pushes.

Fixes #4404
@changeset-bot

changeset-bot Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: be51c96

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy
ScriptedAlchemy changed the base branch from fix/move-symbol-rust-syntax-boundaries to fix/cold-pass-memory-retry-loop October 25, 2026 01:32
@ScriptedAlchemy
ScriptedAlchemy changed the base branch from fix/cold-pass-memory-retry-loop to master October 25, 2026 10:09
devin-ai-integration[bot]

This comment was marked as resolved.

@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

Independent review at exact head 07c0cd68613188eb57df22c20cba4151e6ace4ac found that this PR already covers most document-operation retirement requested by #4403. We will not create a duplicate document-retirement implementation.

Two workspace residuals need coordination with this branch owner:

  1. overlay/workspace_diagnostics.rs::adopt_key retires the prior operation only on a successor request. Root removal, workspace replacement and shutdown do not explicitly retire the workspace operation through DiagnosticSnapshotPort. A removed root may never issue that successor request.
  2. workspace_key includes URI/version/content/scope but not OverlayLifetime. Close and reopen with identical text/version can reuse the old workspace operation, and the workspace controller accepts Ready without validating the completed operation's exact reopened lifetime.

These are source-derived findings, not executed reproductions. Please carry the smallest workspace-lifetime correction here or coordinate an exact child branch. Preserve the existing operation table, compute settlement ownership and document retirement. The missing proof is deterministic real-adapter workspace close/reopen and pending root removal/shutdown, plus small-capacity repeated document supersession. No capacity or timeout increase is proposed.

The ongoing compiler-admission/effective-config workers are separate and will not edit your operation-table/protocol paths.

ScriptedAlchemy and others added 4 commits October 25, 2026 14:24
Fleet logs show five complete 48,000-function generations take 53–65 seconds each. The default medium deadline kills the final refresh near 300 seconds despite steady successful publication. Declare the measured aggregate workload through the existing Cargo-to-Bazel size metadata, preserving every refresh, memory bound, and assertion.
devin-ai-integration[bot]

This comment was marked as resolved.

# Conflicts:
#	.github/workflows/ci.yml

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(lsp): retain completed diagnostic snapshots instead of consuming them before pull responses

1 participant