fix(deep): aggregate Consul health metric in the evidence gather - #258
Closed
WZ wants to merge 1 commit into
Closed
Conversation
Final link in the chain: the orchestrator now forms the right Consul hypothesis (#256) with a verifiable prediction (#257), but the evidence gather queried the BARE consul_health_service_status metric — which returns one series per (node x status), mixed 0/1 — so the extractor produced zero usable observations and the keystone returned 'absent' ('couldn't verify'). Trace: impala runs kept proposing 'impala-statestore unhealthy' then gathering +0 observations. Fix: planPredictionQuery now appends a Consul-aware hint to the metric-threshold gather prompt — query it AGGREGATED for the service in the hypothesis: max by (service_name) (consul_health_service_status{service_name="X",status="passing"}) → one clean value (1 passing / 0 failing) the keystone can verify → confirm. Only triggers when the metric is consul_health_service_status (no false positives for ordinary metrics). tsc clean; 2 new tests + full suite green. Closes the form→predict→gather→verify chain for bare-metal Consul incidents.
This was referenced Jun 10, 2026
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.
The final link in the chain
From the persisted traces of the #257 re-test: the orchestrator forms the right Consul hypothesis (#256) with a verifiable prediction (#257), but the evidence gather queried the bare
consul_health_service_statusmetric — which returns one series per (node × status), mixed 0/1 — so the extractor produced zero usable observations and the keystone returnedabsent:(bd-management happened to confirm via Consul; impala kept coming up empty → wall-clock/exhausted.)
Fix
planPredictionQueryappends a Consul-aware hint to the metric-threshold gather prompt: query it aggregated for the service in the hypothesis —max by (service_name) (consul_health_service_status{service_name="X",status="passing"})→ one clean value (1 passing / 0 failing) the keystone can verify → confirm.Triggers only when the metric is
consul_health_service_status(no false positives for ordinary metrics).Verification
Context
Closes the form → predict → gather → verify chain for bare-metal Consul incidents. The iteration that should make impala pass consistently. Feature still gated off.