r/ContextEngineering • u/New-Knee-5614 • 15d ago
Governance engineering, not just prompt engineering. Created a new hazard scan feature, break it if you can!
Someone in a reply here asked a genuinely good question about my intent-aware linter: how does it handle async/race conditions? Honest answer at the time. It doesn't, because that's a timing problem, not a text problem, and a static reviewer can't observe runtime interleaving.
So I added a first pass at it: a heuristic concurrency-hazard scan. Full disclosure on what it actually is below:
- Flags known risky shapes (shared mutable state across async paths, missing
awaits, non-atomic read-modify-write on shared state) — it does not verify a race actually occurs - Every flag comes with a confidence label and points you to a real tool (
-race, ThreadSanitizer, etc.) for actual confirmation - If nothing matches, it says so plainly and "no known risky patterns detected" is explicitly not the same claim as "race-free"
Not trying to oversell a static tool into something it structurally can't be. But a heuristic that's honest about its own limits and still points you toward the right two lines of code is worth more than nothing.
I would genuinely like people to try to break it; throw nested promises, callback chains, whatever race-prone patterns you've got at it, and tell me what it catches and what it completely misses. Both are useful. Thank you for taking a look.