Coding
Debug with evidence, not guesses
Create a reproducible debugging path and rank likely causes before changing code.
Find correctness, security and maintainability issues before discussing style.
Review the code below as a senior engineer. Prioritize issues in this order: correctness, security, data loss, concurrency, performance, maintainability, then style. Context and intended behavior: [CONTEXT] Code: [PASTE CODE] For each issue, include severity, exact location, why it matters, and the smallest safe correction. Distinguish confirmed defects from questions or preferences. Then propose focused tests for the highest-risk paths. If the code is sound, say so rather than manufacturing issues.
Replace the [BRACKETED PARTS] with specific context. Better inputs create more relevant answers.
Explain the intended behavior.
Include adjacent types or schemas when relevant.
Treat AI findings as leads until tests confirm them.