fix(mcp): probe all four signal backends for stack readiness - #51
Merged
Conversation
stack_status gated readiness on Prometheus and Tempo only; Loki and Pyroscope were assumed ready, covered merely by boot-timing coincidence on the current image (#36). The predicate now probes all four backends through the Grafana datasource proxy (/ready on Loki and Pyroscope, verified against the live stack), so the "wait until ready" contract of odd_stack_up holds for every signal it claims to make ready. The status dict gains loki/pyroscope keys; running is true only when all four are. Fixes #36 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add Pyroscope to odd_stack_up's description (the wait loop now gates on it), and model the boot race in the partial-readiness test as the 503 the Grafana proxy actually relays, exercising the non-200 probe branch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merged
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.
What
stack_status()now probes Loki and Pyroscope in addition to Prometheus and Tempo, through the same Grafana datasource proxy pattern (/readyon both, verified live againstotel-lgtm:0.30.2). The status dict gainsloki/pyroscopekeys andrunningis true only when all four backends answer — which hardensstack_up's wait loop without touching it.Why
Fixes #36: readiness gated on Prometheus+Tempo only covered Loki/Pyroscope by boot-timing coincidence on the current image, while
odd_stack_upclaims to wait until the stack is ready andsetup-local-stackadvertises four datasources. No loss was ever reproduced — this makes the contract real instead of coincidental.How to test
uv run --project src/mcp-server pytest -c src/mcp-server/pyproject.toml tests/mcp-server(28 tests; new test proves a stack whose Loki is still booting reportsrunning: false)stack_status()→ all four signals true.🤖 Generated with Claude Code