summaryrefslogtreecommitdiff
path: root/internal/lsp/completion_state.go
AgeCommit message (Collapse)Author
2026-03-17Fix bugs, remove duplication, and clean up code quality issuesPaul Buetow
- Log swallowed JSON unmarshal errors in stats and LSP handlers - Fix debug log file handle leak in tmuxedit (return closer from initDebugLog) - Check f.Close() errors on write paths in promptstore and tmuxedit - Fix cacheGet TOCTOU race by using single write lock - Fix readInput to use passed stdin reader instead of os.Stdin.Stat() - Remove 45 'moved to' comment tombstones from lsp/handlers.go - Deduplicate canonicalProvider wrappers (use llmutils.CanonicalProvider directly) - Remove SetWindow side effect from stats.TakeSnapshot (pure read now) - Move duplicated splitLines to textutil.SplitLinesBytes - Collapse StatusSink.SetGlobal 10 params into GlobalStatus struct - Simplify LRU touchLocked to in-place delete-and-append Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16Document lock ordering, fix test data races, correct stateMu guardPaul Buetow
- Add doc comments clarifying Server.mu and completionState.stateMu are independent (no ordering constraint). - Fix test using wrong lock (s.mu instead of stateMu) for lastLLMCall. - Replace time.Sleep polling in 7 tests with s.inflight.Wait() to eliminate data races under -race. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16Use read lock for cache misses in completionState.cacheGetPaul Buetow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10task bf088a70: extract LSP client and completion statePaul Buetow