# Detects zero timeout configuration
# Corpus claim: cache/timeout max_value 5.0
# Pattern: Duration::from_secs(0)
#
# Violation: timeout: Duration::from_secs(0) (indefinite blocking)
# Correct: timeout: Duration::from_secs(5)
#
# Consequence: Indefinite blocking leads to hung threads

[[extractors.declarative]]
name = "timeout_zero"
description = "Detects Duration::from_secs(0) timeout (indefinite blocking)"
languages = ["rust"]
pattern = 'timeout:\s*Duration::from_secs\(0\)'
claim.subject = "timeout"
claim.predicate = "zero"
claim.value = true
confidence = 1.0
