Address code review feedback: fix exception handling, async lock initialization, and concurrency protection#101
Merged
Conversation
Merged
…x asyncio.Lock init, protect index_documentation with lock, remove useless try-except Co-authored-by: MarcSkovMadsen <42288570+MarcSkovMadsen@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Windows-specific issues in HoloViz MCP display server
Address code review feedback: fix exception handling, async lock initialization, and concurrency protection
Jan 11, 2026
MarcSkovMadsen
marked this pull request as ready for review
January 11, 2026 20:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses 5 review comments from PR #100 on exception handling, async lock initialization, and database concurrency protection.
Changes
Exception handling: Changed bare
except:toexcept Exception:inutils.pyto avoid catching system-exiting exceptions (SystemExit, KeyboardInterrupt)Async lock initialization: Made
_db_locklazy-initialized via property to prevent event loop context issues whenDocumentationIndexeris instantiated outside async contexts:Concurrency protection: Wrapped
index_documentationmethod in__init__to ensure all invocations (including direct calls fromupdate_indextool andrunmethod) automatically acquire the database lock, preventing race conditions with concurrent search operationsCode cleanup: Removed useless try-except block that caught and immediately re-raised exceptions, and removed unused
paramimport from tests✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.