Add agentex_dev_doctor for OSS local dev preflight#358
Open
Abhishek21g wants to merge 2 commits into
Open
Conversation
Checks docker/uv, compose file, port conflicts, and private ECR DOCKER_REGISTRY before make dev. Documents LOCAL_DEV.md for external contributors.
Load doctor module via importlib for pytest compatibility and remove SO_REUSEADDR from port availability checks.
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.
Problem
External contributors hit failed local onboarding when Docker, ports, or
DOCKER_REGISTRYpoint at private ECR (#163). Main Dockerfile now uses public bases, but env/port conflicts remain a common footgun.Fix
scripts/agentex_dev_doctor.py— checks docker, uv, compose file, ports 6379/5432/5003, and private ECRDOCKER_REGISTRYdocs/LOCAL_DEV.md— OSS contributor troubleshootingagentex/tests/unit/scripts/test_dev_doctor.pyVerification
Relates to #163
Greptile Summary
This PR adds
scripts/agentex_dev_doctor.py, a standalone preflight script that checks docker, uv, the compose file, critical ports (6379/5432/5003), andDOCKER_REGISTRYfor private ECR misconfiguration — targeting the OSS onboarding failures described in #163. A newdocs/LOCAL_DEV.mdand a README pointer accompany the script, along with three unit tests.agentex_dev_doctor.pyis well-structured:_port_freeno longer setsSO_REUSEADDR, thewarn-gate filtering inrun_doctor()correctly excludes non-ECR custom registries from failing the overall check, and all subprocess calls usetimeoutandcapture_output.agentex/tests/unit/scripts/__init__.pyis absent; thepython -m unittestverification command in the PR description will raiseModuleNotFoundErrorbefore any test runs._check_docker_daemon()always fires even when the docker binary is absent, producing two consecutive FAIL entries for the same underlying cause.Confidence Score: 4/5
Safe to merge for the script and docs; the test file needs a one-line init.py added alongside it to make the documented verification command work.
The doctor script and documentation are correct and self-contained. The test file itself works under pytest, but the python -m unittest command in the PR description fails immediately because agentex/tests/unit/scripts/init.py does not exist — every other test subdirectory at that depth has one.
agentex/tests/unit/scripts/ — needs an init.py so the documented python -m unittest verification command resolves the package correctly.
Important Files Changed
Reviews (2): Last reviewed commit: "fix(agentex): address Greptile review on..." | Re-trigger Greptile