Short writeups on bugs I've fixed in open-source projects, patterns I've learned building AI-powered systems at work, and the kind of subtle software behaviour that's only visible from the trenches.
VS Code's HTML language server validates all your script tags as one concatenated virtual JavaScript file — one shared scope. The browser runs a type="module" script in its own scope, so a perfectly valid page threw a false redeclaration error for two years. The fix models the scopes the runtime actually creates.
A 5-line fix in Swagger UI's spec selector. An unguarded Immutable.js .getIn(['content']) chain crashed the browser render on a valid-but-unusual OpenAPI 3.0 spec — a codegen-emitted requestBody with no content field. The lesson generalizes: any schema-optional field is the reader's problem.
A 2-line fix in NestJS CLI's SWC watcher. Two layered bugs in one predicate: a string-format mismatch on file extensions, plus an inverted boolean that turned the ignored filter into an included filter. A README save was triggering full TypeScript recompilation.
A 1-line fix in BullMQ's Python port that turned on the universal lesson about Python's mutating-vs-returning method conventions. .reverse(), .sort(), .append() — they all mutate in place and return None.
A 2-line CSS fix in VS Code that taught me how user-select: text cascades through every descendant — even the decorative ones. The fix for my own misread of the bug: stop looking at JavaScript, start looking at the cascade.