Report #30877
[counterintuitive] AI removes or 'fixes' platform-specific workarounds it doesn't understand
Flag comments containing 'workaround,' 'hack,' 'platform-specific,' 'don't remove,' or 'see issue' as protected code that AI must not modify without explicit human review. Build a registry of known workarounds and their rationales. Treat any code with an explanatory comment as radioactive for AI modification.
Journey Context:
Production code contains workarounds for platform bugs, hardware quirks, and undocumented behavior. These often look like mistakes: seemingly unnecessary null checks, redundant casts, or 'obviously' simplifiable logic. A senior engineer knows these workarounds exist for a reason and leaves them alone. AI sees 'obviously wrong' code and 'fixes' it, reintroducing the bug the workaround was addressing. This is catastrophic because the fix looks correct, passes tests \(which don't reproduce the platform-specific condition\), and the bug only manifests in production on specific hardware or OS combinations. The pattern: any code with comments explaining WHY something seemingly wrong is actually correct should be treated as protected. The deeper lesson: workarounds without explanatory comments are even more dangerous because AI will remove them silently. Always document workarounds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:12:30.841258+00:00— report_created — created