← Back to Pull requests

[DATASEC-416] Unschedule no longer existing RCs #58037

Closed
unknown closed this pull request without merging on Oct 13, 2026 15:28 UTC
View on GitHub
unknown unknown commented on Oct 13, 2026 08:14 UTC
Author

<!--Please give us some feedback on your experience writing this PR ! https://app.datadoghq.com/forms/43db4c02-6837-400c-8083-692e141b1b88 !-->

What does this PR do?

Unschedules datasecurity checks when their Data Security scan task is deleted from Remote Config.

RC delivers the full set of active tasks for the product, so any RC path we scheduled but no longer receive is unscheduled. update() also no longer returns early when there is only something to unschedule.

Motivation

Deleted scan tasks stayed scheduled, since the provider only ever scheduled configs.

Describe how you validated your changes

Validated on a running agent using the image built by this PR's pipeline: registry.ddbuild.io/ci/datadog-agent/agent:v144220347-303f7520-7-amd64.

We now unschedule scan tasks that are no longer active once they are deleted from RC. After scanning was disabled upstream, the next planning cycle deleted the scan task from RC, which made the agent unschedule the check (last line, with no new check scheduled):

09:10:28 | Scheduling check datasecurity for one-time execution
09:14:42 | Unscheduling check datasecurity:613d8d2c4f756a6e
09:14:42 | Scheduling check datasecurity for one-time execution
09:29:43 | Unscheduling check datasecurity:b87f52603491b3ae
09:29:43 | Scheduling check datasecurity for one-time execution
09:44:49 | Unscheduling check datasecurity:1c98394d522b4da3 << Unschedule with no schedule

Additional Notes

A task re-delivered at the same RC path is always unscheduled then scheduled again, even if unchanged, so the check reruns. All tasks use the same datasecurity config name.

Diff: 242 lines (+181 / -61) across 3 files Reviewer: vinckama Review duration: 434m
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 242 lines diff across 3 files
0.39
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%
60%
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.329
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #58037"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% 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: 38.8% (MEDIUM) · Higher = larger blast radius
38.8%
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: 60.5% · Lower = rushed or shallow review
60.5%
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: 15.3% · Safe to merge
15.3%