test(iast): disable the hypothesis deadline in IAST property tests DD_7U8JJD #22023
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 · 258 lines diff across 3 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.332
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #22023"
general
weight: 0.35
avara1986
Description
Related to https://datadoghq.atlassian.net/browse/APPSEC-71951
test_aspect_patched_result_hypothesis[py3.10]flaked once in the merge queue, out of about 61.5k runs in 90 days. Hypothesis reportedproduces unreliable results: Falsified on the first call but did not on a subsequent onefortext_input='', and the automatic retry passed.''is the first example Hypothesis tries, and the test ran on a cold xdist worker, where the first call into every aspect also pays for lazy initialization. The failing run took 625 ms in total for about a dozen calls, while a passing py3.10 run takes about 1.6 ms per example. So the first call took roughly 600 ms, well over the 250 ms limit Hypothesis applies while generating (the 200 ms default deadline × 1.25). Hypothesis prints which case it hit, "Unreliable test timings" or "Failed to reproduce exception", only in the failure report. That report was never printed because the retry passed, so a slow first call that raised another error can't be fully ruled out.No IAST property test checks timing, so
iast_hypothesis_testnow setsdeadline=None. This applies to the 8 tests that use it:test_add_aspect,test_add_inplace_aspect,test_aspect_patched_result_hypothesis,test_fstring,test_strip_aspect,test_rstrip_aspect,test_lstrip_aspectandtest_taint_pyobject_all. The six property tests that set@settings(max_examples=1000)themselves (five intest_fstrings.py, plustest_taint_pyobject) keep the default deadline, since none of them has flaked.Customer impact
None, test-only change.
Testing
appsec_iast_default(Python 3.10), every test matchinghypothesis: 39 passed, 3 skipped.scripts/lint checkspasses.Risks
None. A hanging test is still stopped by the suite's 30-minute job timeout. The deadline no longer doubles as an incidental speed check on aspects; the IAST benchmarks cover performance.
Additional Notes
No release note: test-only change.
DD_7U8JJD
🤖 Generated with Claude Code