Skip to content

[scanner] P17.6: unbounded retry loop heuristic (keep WARN) #21

Description

@emmanuelgjr

Control: DSGAI17 · Classification: STRUCTURAL

Heuristic to flag while True loops around a generate/complete/chat call with no break/timeout/max_retries nearby. (?s) is part of the pattern:

(?s)while\s+True\b(?:(?!\bbreak\b|\bmax_retries|\btimeout).){0,200}(generate|complete|chat)\(

This is a heuristic — keep signal warn, never FAIL. Confidence: low. Add a positive fixture (bare retry loop) and a negative (loop with break).


Blocked on Phase 1. Mergeable after the fixture corpus and self-test CI land (PR-04 / PR-06) — feel free to draft now. Add your positive + negative test snippets to the fixture app when you open the PR.

Never paste real credentials. Use obviously fake canonical values (e.g. sk-proj-FAKE00000000000000000000000000).

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked-on-phase-1Mergeable only after fixtures + self-test CI land (PR-04/PR-06)good-first-issueGood for newcomersphase-3Improvement plan Phase 3 (precision)rulesDetection rule definitionsscannerDSGAI scanner tool subproject

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions