fix: print why a service failed instead of naming a log file - #52
Merged
Conversation
When cMCP Runtime fails to bind, the launchers wait the full 60 seconds
and then say "See the *.log files in this demo folder." The reason is
already in cmcp.log, and nobody looks there.
The case that costs the most time is a cmcp on PATH that is present but
broken, which is easy to end up with alongside an editable dev install.
Both launcher branches, the one where the process exits early and the
one where it never binds, now print the tail of the relevant log.
Before:
cMCP Runtime did not start listening on :8443 within 60s.
See the *.log files in this demo folder.
After:
cMCP Runtime exited with code 1 before listening on :8443.
Last 15 lines of cmcp.log:
...
ImportError: cannot import name 'GovernancePolicy' from
'agent_os.mcp_gateway'
Applied to the four demo launchers and the web console, which each carry
their own copy of the helper by design.
Verified against a real failure on both branches. The success path is an
untouched early return.
Not fixed here: _find_cmcp() takes the first cmcp on PATH without
checking that it runs, so a broken install still shadows a working
.venv. That wants a functional probe, and there is no cheap subcommand
that exercises the import the way `start` does.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013EQx4N5BzTQbY8kvXUsdkY
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.
When cMCP Runtime fails to bind, the launchers wait the full 60 seconds and then say "See the
*.logfiles in this demo folder." The reason is already incmcp.log, and nobody looks there.The case that costs the most time is a
cmcpon PATH that is present but broken, which is easy to end up with alongside an editable dev install. I hit exactly this while verifying the claims on agentrust-io.com/demos: a minute of waiting, then a sentence pointing at a file.Before
After
Both branches are covered: the one where the process exits early, and the one where it never binds. Applied to the four demo launchers and the web console, which each carry their own copy of the wait helper by design, so each gets its own.
Verification
Reproduced a real failure and confirmed both branches print the tail. The success path is an untouched early
return, so it is unchanged rather than re-verified.Not fixed here
_find_cmcp()takes the firstcmcpon PATH without checking that it runs, so a broken install still shadows a working.venvand the README's "it will use a local.venvif one exists" never engages. That needs a functional probe, and there is no cheap subcommand that exercises the same importstartdoes:--versionandvalidate-configboth succeed against an install whosemcp.proxyimport is broken. Worth a follow-up.🤖 Generated with Claude Code
https://claude.ai/code/session_013EQx4N5BzTQbY8kvXUsdkY