Bugs that pass a quick read: reviewing AI-generated TypeScript and SQL
Find the bugs in AI-written TypeScript, React, browser, Node.js, and SQL code that looks fine at first glance. You'll run into race conditions, security holes, made-up APIs, and assumptions the runtime doesn't share.
Questions
- Not answered. Why can this search box show results for the wrong query?
- Not answered. What happens to the other two calls when
chargeCard()rejects first? - Not answered. Why is this existence check unsafe when both calls are awaited?
- Not answered. Why can
All savedprint before any save finishes? - Not answered. How does this cleanup flag drop a stale response but keep the current one?
- Not answered. Which changes prevent a lost update in this balance workflow?
- Not answered. What's the safest fix if the name only needs to show up as text?
- Not answered. Which security checks does this cross-window token handoff need?
- Not answered. What's still missing after this CORS setup?
- Not answered. Why doesn't
SameSite=Laxprotect this transfer endpoint? - Not answered. Why can't this parameterized query choose the table?
- Not answered. What's wrong with this password-reset token generator?
- Not answered. Which standard Fetch API call parses this response body?
- Not answered. Where does the standard
throwIfAborted()method live? - Not answered. Which modern JavaScript call groups the orders by status?
- Not answered. Which built-in replaces this made-up deferred Promise API?
- Not answered. Which standard call combines these Sets without changing
permissions? - Not answered. What should replace the made-up
localStorage.getJSON()call? - Not answered. What does this function do when the server returns a 404?
- Not answered. What does this code log after the default sort?
- Not answered. What happens when this payload is serialized without a replacer?
- Not answered. Does the optional chain prevent an exception here?
- Not answered. Starting from zero, what does the count show after one click?
- Not answered. How private is this TypeScript
privatefield at runtime?