fix(health-events-analyzer): attribute XID 74 derived events to the reporting GPU #2271
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.50) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 616 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.384
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2271"
general
weight: 0.35
tanishagoyal2
Summary
Fixes #2270.
The four XID 74 solo rules took their registers and their GPU from the node's stored events, not from the incoming XID 74. One matching XID 74 on a GPU made every later XID 74 on the node fire the rule, and the check for other active errors ran against that first GPU. The derived event carries the incoming event's entities, so it named a GPU whose registers didn't match, or one that wasn't solo.
The rules now take the registers, the $group key and the $lookup GPU from this.healthevent.entitiesimpacted, the way XID74Reg2Bit13Set already reads its registers. The $lookup also stops excluding the document that $group picks. That exclusion was harmless while only matching XID 74 events reached the $group, since the sub-pipeline skips XID 74 anyway, as ADR-066 notes. Now the picked document can be the GPU's other active error. The $group from #1901 stays with a single key, so the join runs once, and TestLookupRulesGroupByGPUBeforeJoin still passes. values-tilt.yaml carries the same four rules and gets the same change.
These rules don't run on PostgreSQL today (the translator rejects $replaceRoot), before or after this change. ADR-066's solo example ports today's shape, so the port will need the same correction. A rule with a #1706 recovery block takes its recovery identity from the same incoming entities, so it would have pointed at the wrong GPU too; no shipped rule has one.
Type of Change
Component(s) Affected
Testing
New test TestXID74SoloRules_EventsOnTwoGPUs_DecideOnTheReportingGPU loads the four rules from both values files and runs them through validateAllSequenceCriteria against a real MongoDB replica set, with the store-client client the analyzer uses. It skips unless NVSENTINEL_TEST_MONGODB_URI is set, and it writes to hea_rule_tests.HealthEvents, which has to exist first; the comment on ruleTestDatabase has the one line that creates it.
| Case, for each of the four rules | Expected | main @ 152425f3 | This PR |
|---|---|---|---|
| Matching XID 74 on A | fires | fires | fires |
| Matching XID 74 on A, then an XID 74 on B that doesn't match | no | fires | no |
| Matching XID 74 on A, active XID 48 on B, then a matching XID 74 on B | no | fires | no |
| Active XID 48 on B, then a matching XID 74 on B | no | no | no |
| Active XID 48 on B, then a matching XID 74 on A | fires | fires | fires |
On main 16 of the 40 cases fail, the second and third rows for every rule in both files. All 40 pass here. With only the this. change, the fourth row fails for every rule, which is why the exclusion goes too.
I also ran the health-events-analyzer binary against MongoDB 8.0 with the chart's indexes and the rendered rules ConfigMap, storing events the way the platform connector does and recording what it published (scratch harness, not committed):
| Sequence, for each of the four rules | Expected | main | This PR |
|---|---|---|---|
| Matching XID 74 on N, then one on M that doesn't match | N | N and M | N |
| Matching on N, XID 48 on M, then matching on M | N | N and M | N |
| XID 48 on M, then matching on M | none | none | none |
| XID 48 on M, then matching on N | N | N | N |
Local runs on macOS:
Checklist
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Updated XID 74 event analysis to use the reporting event’s impacted entities when evaluating register values and GPU UUIDs.
Matching events are no longer excluded based on event ID; node, GPU, time-window, and error-code filters remain in place.
Tests
* Added integration coverage for XID 74 rules, including matching and nonmatching events across GPUs and active-error histories.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->