Repository navigation
NIS bridge worker thread, NIS monitor, and test coverage - #4
Merged
Merged
Conversation
…e a second bridge on the port A JOBS Python task runs on NIS's main thread, so the serving loop froze NIS (step 0 of the test plan). run() now starts serve() on a worker thread and returns. Windows SO_REUSEADDR let a re-run bind a duplicate bridge on the same port; that is off now. Adds a read-only list of optical configurations. Selecting one from the worker thread froze NIS, so there is no select.
Every action through the bridge client is logged to logs/nis/events-<date>.jsonl (start, then ok/failed/refused/error). python -m acquisition.nis_monitor shows bridge state and the action feed live, says BUSY and names the call when one long NIS call holds the bridge, and opens by itself in its own console when confocal-mcp-nis starts (CONFOCAL_NO_NIS_MONITOR=1 turns that off). Adds the read-only nis_list_optical_configs tool.
launch() returns early off Windows, so the test that checks it opens one window never saw Popen on the Linux CI runner. Patch ON_WINDOWS in the test, and stop the server-tools test from opening a monitor window.
…track, shorts); CI covers analysis/
This was referenced Oct 17, 2026
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.
Why
The first version of the NIS bridge froze NIS-Elements, because the JOBS task runs on NIS's main thread and serving there never returned (2026-10-15). There was also no way to see what Claude was sending to the microscope, and most of the hardware code had no tests that run without the scope.
What
Testing