Skip to content

Consensus lookups in the extension have no timeout and run one finding at a time #111

Open

Description

@savvides

Found while merging #89 into #109.

After the model call, which #109 caps at 25 s, the service worker runs verifyFindingsWithConsensus. For each finding it awaits its own fetch('https://api.consensus.app/v1/search'), one after another, with no AbortSignal and no overall limit. A slow Consensus API therefore holds the audit open indefinitely. MV3 also kills a worker whose fetch takes more than 30 s to respond, which is the reason #109 added the 25 s model timeout.

Possible fix: AbortSignal.timeout per request, and Promise.all across findings (or a small concurrency cap). Keep the current behavior of treating a failed lookup as "no badge". The CLI already sets timeout=10 in fetch_from_consensus_api.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions