fix: demo CLI discovery fallback for uninstalled source checkouts - #39
Open
Coding-Dev-Tools wants to merge 5 commits into
Open
fix: demo CLI discovery fallback for uninstalled source checkouts#39Coding-Dev-Tools wants to merge 5 commits into
Coding-Dev-Tools wants to merge 5 commits into
Conversation
…eckouts load_cli() now falls back to direct import of the built-in demo CLI when the console_scripts entry point is not registered (e.g. running tests from a source checkout without pip install -e .). Fixes 21 test failures in test_config.py, test_cli_config.py, and test_list_tools.py that all invoked 'click-to-mcp-demo' via the CLI.
🤖 Automated Code Review✅ Ruff Lint — No issues
|
…ndlers Replace 6 bare 'except Exception: continue/return None' blocks with logged debug messages. This addresses the silent-failure/observability trap pattern where broken entry points were silently skipped with no diagnostic trail. Now operators can enable DEBUG logging to see which entry points failed and why. Added 4 regression tests covering scan_entry_points, load_cli, import_cli, and find_our_clis logging behavior. 207 tests pass (203 existing + 4 new).
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c4177ed64e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…a73d27597364c9af683
Pin Coding-Dev-Tools/.github/.github/workflows/auto-code-review.yml@main to 9114bb00d7f7a8e1a06310700bb7a539c3034c37 (fleet convention). Prevents supply-chain attacks via mutable tag substitution on the org-level reusable workflow.
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\n\n21 tests fail when running from a source checkout without
pip install -e .:\n-tests/test_config.py(10 failures)\n-tests/test_cli_config.py(4 failures) \n-tests/test_list_tools.py(2 failures)\n- Plus related cascading failures\n\nAll invokeclick-to-mcp-demovia the CLI, which callsload_cli(\"click-to-mcp-demo\")which scansentry_points()for installed console_scripts. When the package isn't installed in editable mode, the demo entry point isn't registered.\n\n## Fix\n\nAdded a built-in fallback inload_cli(): when the requested name isclick-to-mcp-demoand no entry point matches, import the demo CLI directly fromclick_to_mcp.demo.\n\nThis is a minimal, targeted fix that:\n- Preserves the entry-point-first discovery path for all external CLIs\n- Only activates for the package's own built-in demo\n- Makes the test suite portable across installed and uninstalled environments\n\n## Verification\n\n- Before: 182 passed, 21 failed\n- After: 203 passed, 0 failed\n- ruff: clean\n- All 4 transports (stdio, SSE, HTTP, Streamable HTTP) tests still pass