← Back to Pull requests

feat(par): enroll new node Agent runners through WIF #59285

Closed
unknown closed this pull request without merging on Nov 11, 2026 16:50 UTC
View on GitHub
unknown unknown commented on Oct 30, 2026 04:11 UTC
Author

What does this PR do?

Automatically use primary intake WIF to enroll a new node Agent Private Action Runner. When delegated_auth.org_uuid is configured, request a par_enrollment workload token bound to the newly generated runner key, then call PAR's public workload enrollment client. Save the runner identity, configured WIF org UUID, and normalized Datadog site after enrollment succeeds.

PAR must still be enabled, self-enrollment must be allowed, and the matched mapping must permit PAR enrollment. Logs-only WIF does not select this path.

Motivation

WIF-108: WIF intake rotates its managed API key, so PAR enrollment needs authorization from the intake mapping instead of that key.

Describe how you validated your changes

Passed at 424f39d4803: Focused PAR component and enrollment race tests passed, including saving the enrollment org/site, reusing the identity after intake-key rotation, and existing API-key/explicit-identity controls.

CI checks for this PR.

Live validation, November 5, at 3dfe52414ce: Fresh WIF enrollment, restart with the same identity, signed runner health (200), and the existing API-key and explicit-identity controls passed against staging. Full results and validation limits.

The linked live results apply to that tested commit. Current-head validation is listed above.

Additional Notes

Uses the delegated-auth component from merged #59284. This PR covers fresh node enrollment and records its org/site. #59286 uses those values to decide when a saved node identity needs replacement. Cluster Agent keeps its existing enrollment selection until #59690 adds WIF support. Configuring WIF does not enable PAR or override an explicitly configured runner identity.

[WIF-108]: https://datadoghq.atlassian.net/browse/WIF-108?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Diff: 279 lines (+209 / -70) across 3 files Reviewer: shimupan Review duration: 18038m
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.45) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 279 lines diff across 3 files
0.45
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
56%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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.337
Shallow Review Depth shallow_review_depth
0.289
Ai Authored ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #59285"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 56.8% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 44.6% (MEDIUM) · Higher = larger blast radius
44.6%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 56.8% · Lower = rushed or shallow review
56.8%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 19.3% · Safe to merge
19.3%