{"uid":"cap_7wvz0_1vgM5WPpEHS3m8x","slug":"brainiac-concurrency-hazard-detector-50ef507f","name":"BRAINIAC Concurrency Hazard Detector","description":"Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.","url":"https://www.brainiac.software/api/v1/code/concurrency-hazard-detect?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","required":["path","source"],"properties":{"path":{"type":"string","maxLength":260,"minLength":1},"source":{"type":"string","maxLength":100000,"minLength":1},"language":{"enum":["javascript","typescript","python","go","other"],"type":"string"}},"additionalProperties":false},"maxItems":200,"minItems":1}}},"responseSchema":{"type":"json","example":{"summary":{"files":1,"findings":1},"findings":[{"code":"assignment_without_visible_lock","line":1,"path":"worker.js","evidence":["worker.js:1 assigns state in a concurrent-looking file without a nearby lock keyword on that line."],"severity":"low","remediation":"If the binding is shared, add synchronization; if not, keep it local to the task."}],"explanations":["Findings are deterministic pattern matches on supplied source text. They are not proof of a race and the code is not executed.","No repository checkout or runtime tracer is used."]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.04","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.04/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_CZcQSx3G1J8LuqKt6qZJ-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.04","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Statically analyzes source code files for concurrency hazards such as race conditions and unsafe shared-state assignments using deterministic pattern matching.","exampleAgentPrompt":"Can you scan my worker.js file for concurrency hazards — look for any shared state assignments that happen without a nearby lock or synchronization mechanism?","exampleUseCases":[{"title":"Pre-merge concurrency audit for Node.js workers","prompt":"Before we merge this PR, scan all five of our worker JavaScript files for race conditions or shared state assignments that are missing locks — flag anything suspicious with the line number and a suggested fix."},{"title":"Python async code safety review","prompt":"Can you check these Python async files for concurrency hazards? I'm worried we have shared mutable state being modified from multiple coroutines without proper synchronization."},{"title":"Go service thread-safety check","prompt":"Run a concurrency hazard scan on our Go service source files and tell me which lines look like they're doing unsafe state assignments in a concurrent context without any locking."}],"resultDescription":"Returns a JSON object containing a summary (file count and total findings), a list of findings each with a hazard code, line number, file path, evidence snippets, severity level, and remediation guidance, plus explanatory notes clarifying that findings are deterministic pattern matches and no code is executed.","failureModes":["Files array empty or missing — validation error returned","File source too large (exceeds 100,000 character limit per file) — rejected with schema error","Too many files submitted (over 200) — rejected with schema error","Unsupported language enum value — schema validation failure","Payment not completed via x402 — 402 Payment Required response","No concurrency patterns found — empty findings array returned with zero-count summary"],"whenToPreferThis":"Use this endpoint when you need a fast, accountless, pay-per-call static check for concurrency hazards in source code without spinning up a full static analysis toolchain. It is ideal for CI pipeline spot-checks, pre-merge audits, or agent workflows that need a quick signal on race conditions in JavaScript, TypeScript, Python, or Go files. It is not a runtime tracer and does not execute code, so prefer it for rapid pattern-based triage rather than exhaustive runtime verification.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-11T14:32:27.422Z","isFirstParty":false,"canonicalSlug":"brainiac-concurrency-hazard-detector-50ef507f"}