You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(lsp): address race condition and misleading comments in version tracking
Addresses three Copilot review comments:
1. Fixed TOCTOU race in validate_from_content_and_publish: capture version
at the same time as content snapshot to ensure diagnostics are published
with the version matching the content they were validated against, not a
newer version from concurrent did_change events.
2. Corrected misleading comments in handle_did_open/did_change about lock
guarantees. The comments suggested locks prevent readers from seeing
inconsistency, but that's only true if readers atomically capture both
values together (which they now do).
3. Clarified integration test comment to explain why it doesn't assert
version field in publish_diagnostics (requires consuming socket messages).
Referenced unit tests in backend/tests.rs that verify version lifecycle.
0 commit comments