Verify AI Guard payload carriers across classic, OTLP, and standalone smoke scenarios #8647
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.68) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.68 · 436 lines diff across 5 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.364
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.068
Real PR Conversation Timeline
1 comments
"Review active on #8647"
general
weight: 0.35
christophe-papazian
What this tests
Adds AI Guard backend-intake smoke coverage (
BaseAiGuardSmokeTests) across all five security smoke scenarios:Test_SecuritySmoke_AiGuardinSECURITY_SMOKETest_SecuritySmokeOtlp_AiGuardinSECURITY_SMOKE_OTLP(inherits theassert_ddot_exportfixture; gated inmanifests/agent.ymlondatadog-agent#60077for easy-wins activation once bundled DDOT preserves OTLP MetaStruct bytes in a release)Test_Standalone_AiGuardacrossAPPSEC_APM_STANDALONE,APPSEC_STANDALONE_APM_STANDALONE, andAI_GUARD_STANDALONEVerified at backend intake
Sends a benign
ALLOWevaluation (replayingaiguard_evaluate_post_8919fde6.jsonto reduce the chance of competing AppSec WAF retention) and asserts across both legacy and efficient v1 Agent payloads:USER_KEEPpriority, AI Guard attribution (chunksamplingMechanism == AI_GUARDon v1 or_dd.p.dm=-13on legacy; or, inAPPSEC_STANDALONE_APM_STANDALONE, where an SDK such as Java may keep the request span as AppSec-5before AI Guard evaluates, a valid two-hex-character_dd.p.tscarrying theTraceSource.AI_GUARDbit), andai_guard.event(true/"true").resource == "ai_guard", matched across split chunks bytrace_id):USER_KEEPpriority,ai_guard.action=ALLOW, and unchanged structuredmessagespayload (metaStruct["ai_guard"]on legacy,attributes["ai_guard"]on v1).Infrastructure & metadata
DD_AI_GUARD_*(FakeDatadogKey.AI_GUARD_API/AI_GUARD_APP, which do not replace the Agent'sFakeDatadogKey.DEFAULTkey) and attachesVCRCassettesContainer(read-only cassette mount) inutils/_context/_scenarios/security_smoke.py(SecuritySmoke,SecuritySmokeOtlp) andutils/_context/_scenarios/appsec_standalone.py.utils/build/docker/vcr/cassettes/aiguard/aiguard_evaluate_post_8919fde6.jsonto all smoke scenarios inutils/scripts/libraries_and_scenarios_rules.yml(with tests intests/test_the_test/test_compute_libraries_and_scenarios.py).manifests/agent.ymland library manifests (java,nodejs,python,ruby,cpp_nginx,dotnet,golang,php), matching existing AI Guard SDK and OTLP MetaStruct gates.Validation
./format.shandgit diff --checkpassed../run.sh TEST_THE_TEST tests/test_the_test/test_compute_libraries_and_scenarios.py tests/test_the_test/test_manifest.py tests/test_the_test/test_scenarios_declaration.py tests/test_the_test/test_conventions.py: 166 passed.SECURITY_SMOKE_OTLP(--runxfail) with dev Agent7.87.0-devel+git.1178.ad44a3c(datadog-agent#60077):- Java (
spring-boot,1.70.0-SNAPSHOTwithdd-trace-java#13391): passed.- Python (
flask-poc,4.17.2): passed.SECURITY_SMOKE_OTLPwith unfixed Agent7.85.4:- Java (
1.70.0-SNAPSHOT,--runxfail): failed as expected (lost_dd.p.dm=-13and flattenedai_guardto a raw base64 string inmetainstead ofmetaStruct).- Python (
4.17.2, default manifest): xfailed cleanly viamanifests/agent.yml.AI_GUARD_STANDALONEon Python (flask-poc,4.17.2) + Agent7.85.4: passed.BaseAiGuardSmokeTestsagainst captured Java (spring-boot,1.70.0-SNAPSHOT) + Agent7.85.4traces fromSECURITY_SMOKE,APPSEC_APM_STANDALONE, andAPPSEC_STANDALONE_APM_STANDALONE: 3/3 passed.