[History Server] Replace private getter assertions with BuildSnapshot() in history server unit tests #4949
All Vouch review confidence checks passed
Residual risk 0.06 = Change Risk (0.32) × (1 − Review Confidence (0.82)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.32 · 38 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.77 · 2 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
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.219
Real PR Conversation Timeline
6 items
Approved
LGTM, thanks for contribution!
nit (non-blocking): Could bind snap := h.BuildSnapshot(clusterInfo) once and read snap.Actors[id] / snap.Jobs[id] / snap.Nodes off it?
Approved
Approved these changes.
@JiangJiaWei1103 Done, bound to snap and read fields off it. Thanks!
Approved
LGTM. Thank you!
@andrewsykim PTAL! It LGTM and can be merged.
JiangJiaWei1103
dalaoqi
Why are these changes needed?
The unit tests asserted on internal state via the private getters
getActorsMap,getJobsMap, andgetNodeMap, coupling the tests to implementation details. SinceBuildSnapshot()is the only exported accessor and is the single source of truth for what we serve, the tests now assert on the snapshot'sActors,Jobs, andNodesfields instead.Related issue number
Closes #4937
Checks
- [x] Unit tests
- [ ] Manual tests
- [ ] This PR is not tested :(