Repository navigation
Dev agent: protocol tests on ubuntu and windows; two defects they found (#238) - #248
Merged
Merged
Conversation
A stdlib-only job (setup-python, no JDK or Gradle) on develop pushes. The socket options differ per platform, and the port-takeover and restart tests are what check them.
… Linux (#238) Found by the first ubuntu and windows runs: - push accepted "/abs/escape.py" on Windows, where os.path.isabs is False for a rooted path without a drive (Python 3.13+) and the join lands on the drive root. Paths now follow the protocol's own rule (relative, /-separated, no backslash, colon, empty, . or .. segment) and must resolve inside the overlay; the test covers the Windows forms on every OS. - On Linux, close() left a listener that a thread was blocked accepting on in LISTEN, so a restarted agent got EADDRINUSE. stop() now shuts the listener down first and joins the accept and connection threads. - The port-takeover test evaluated socket.SO_REUSEPORT where it does not exist (Windows).
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.
Closes #238
Option (b): a light, stdlib-only job (
dev-agentin desktop.yml, develop pushes, setup-python and no JDK). It runstest_devagenton ubuntu-latest and windows-latest.Defects fixed (found by the first ubuntu and windows runs)
"/abs/escape.py"was accepted, because on Windowsos.path.isabsis False for a rooted path without a drive (Python 3.13+), and the join landed on the drive root./-separated, with no backslash, colon, or empty/./..segment, and the result must resolve inside the overlay.stop()did not free the port.close()left a listener that a thread was blocked accepting on in LISTEN, so a restarted agent gotEADDRINUSE.stop()now callsshutdown()on the listener first and joins the accept and connection threads.socket.SO_REUSEPORTwhere it does not exist (Windows).Test added
C:/…,C:…,\…,a\..\..\…,//server/share/…,./a.py,a//b.py, and the empty path. It was red on macOS before the fix.Verification
feat/devagent-ci-probe(deleted after the run):SO_EXCLUSIVEADDRUSEremoved failed intest_another_socket_cannot_take_the_port_over("OSError not raised : option 4", i.e.SO_REUSEADDRtook the port).PythonDevAgentTest4/4.Documentation corrected