[infra-mode] resolve host tags and strip expected-tags leak #57905
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.60) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.60 · 214 lines diff across 2 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.321
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.060
Real PR Conversation Timeline
1 comments
"Review active on #57905"
general
weight: 0.35
jinh-labs
What does this PR do?
Unknown or mistyped
infrastructure_modevalues no longer produce aninfra_mode:<typo>host tag. They behave asfullinstead. Host tags still coverbasic,none,cloud_cost_only, andend_user_deviceas they do today.The end-user-device mode mark and the related hardware host tags are built separately, but host metadata still emits both.
During the expected-tags window,
infra_modeis no longer copied from host tags onto metrics or logs. Host metadata itself still carries the mark.hosttags.Getnow takes anincludeInfraModeflag so each caller chooses whether System includesinfra_mode:. The cache still stores the full set. Callers that can put host tags on metrics or logs passfalse.Motivation
infra_mode:cloud_cost_onlyon a custom or DogStatsD series is renamed by intake intodd.cloud_cost, which would break customer dashboards and metering. Host expected tags were one way that mark could leak onto those series. Typos ininfrastructure_modecould also show up as unexpected host tags.Activated logs are paid customer product data. This PR does not stamp
infra_modeon log events. It only prevents the mark from riding onto logs (or metrics) through the expected-tags clone.Describe how you validated your changes
Unit tests cover the host-tag modes (including invalid values), the end-user-device tag split,
Get(..., includeInfraMode), and the expected-tags strip for metrics and logs providers.E2E: DogStatsD under
cloud_cost_onlywith expected tags carries ordinary host tags withoutinfra_mode.Additional Notes
Does not mark logs or traces, and does not add marking on plain DogStatsD or
custom_metrics.