Skip to content

fix(mcp): probe all four signal backends for stack readiness - #51

Merged
using-system merged 2 commits into
mainfrom
fix/stack-readiness-all-signals
Aug 23, 2026
Merged

fix(mcp): probe all four signal backends for stack readiness#51
using-system merged 2 commits into
mainfrom
fix/stack-readiness-all-signals

Conversation

@using-system

Copy link
Copy Markdown
Owner

What

stack_status() now probes Loki and Pyroscope in addition to Prometheus and Tempo, through the same Grafana datasource proxy pattern (/ready on both, verified live against otel-lgtm:0.30.2). The status dict gains loki / pyroscope keys and running is true only when all four backends answer — which hardens stack_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_up claims to wait until the stack is ready and setup-local-stack advertises 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 reports running: false)
  • Verified read-only against a live local stack: stack_status() → all four signals true.

🤖 Generated with Claude Code

using-system and others added 2 commits August 23, 2026 21:41
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>
@using-system
using-system merged commit dbd7091 into main Aug 23, 2026
11 checks passed
@using-system
using-system deleted the fix/stack-readiness-all-signals branch August 23, 2026 19:49
@github-actions github-actions Bot mentioned this pull request Aug 23, 2026
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.

fix(mcp): stack readiness probes prometheus and tempo only - loki and pyroscope are assumed

1 participant