Skip to content

Add agentex_dev_doctor for OSS local dev preflight#358

Open
Abhishek21g wants to merge 2 commits into
scaleapi:mainfrom
Abhishek21g:fix/agentex-dev-doctor
Open

Add agentex_dev_doctor for OSS local dev preflight#358
Abhishek21g wants to merge 2 commits into
scaleapi:mainfrom
Abhishek21g:fix/agentex-dev-doctor

Conversation

@Abhishek21g

@Abhishek21g Abhishek21g commented Jul 13, 2026

Copy link
Copy Markdown

Problem

External contributors hit failed local onboarding when Docker, ports, or DOCKER_REGISTRY point 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 ECR DOCKER_REGISTRY
  • docs/LOCAL_DEV.md — OSS contributor troubleshooting
  • README pointer before Setup
  • Unit tests in agentex/tests/unit/scripts/test_dev_doctor.py

Verification

python scripts/agentex_dev_doctor.py
python -m unittest agentex.tests.unit.scripts.test_dev_doctor -v

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), and DOCKER_REGISTRY for private ECR misconfiguration — targeting the OSS onboarding failures described in #163. A new docs/LOCAL_DEV.md and a README pointer accompany the script, along with three unit tests.

  • agentex_dev_doctor.py is well-structured: _port_free no longer sets SO_REUSEADDR, the warn-gate filtering in run_doctor() correctly excludes non-ECR custom registries from failing the overall check, and all subprocess calls use timeout and capture_output.
  • agentex/tests/unit/scripts/__init__.py is absent; the python -m unittest verification command in the PR description will raise ModuleNotFoundError before 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

Filename Overview
scripts/agentex_dev_doctor.py New preflight script: checks docker binary, daemon, uv, compose file, ports (6379/5432/5003), and DOCKER_REGISTRY for private ECR; logic is sound, warn-gate filtering and exit code are correct.
agentex/tests/unit/scripts/test_dev_doctor.py Uses importlib.util.spec_from_file_location matching the existing sibling pattern, but agentex/tests/unit/scripts/init.py is missing so the python -m unittest verification command in the PR description fails with ModuleNotFoundError.
docs/LOCAL_DEV.md New troubleshooting doc with accurate symptom/fix table; links correctly to the issue and doctor script.
README.md Adds a one-line pointer to the dev doctor script and LOCAL_DEV.md before the Setup section; no content issues.

Reviews (2): Last reviewed commit: "fix(agentex): address Greptile review on..." | Re-trigger Greptile

Checks docker/uv, compose file, port conflicts, and private ECR
DOCKER_REGISTRY before make dev. Documents LOCAL_DEV.md for external contributors.
@Abhishek21g Abhishek21g requested a review from a team as a code owner July 13, 2026 05:04
Comment thread agentex/tests/unit/scripts/test_dev_doctor.py
Comment thread scripts/agentex_dev_doctor.py
Load doctor module via importlib for pytest compatibility and remove
SO_REUSEADDR from port availability checks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant