今日已更新 184 条资讯 | 累计 37433 条内容
关于我们

I found code in my repo I'd never seen. All 82 tests passed. I quarantined it for three days anyway.

אחיה כהן 2026年08月17日 11:22 12 次阅读 来源:Dev.to

During a routine morning triage of my open-source project, git status showed a modified file I had no memory of touching: extension/background.js , last modified 24 hours earlier, sitting next to a fresh background.js.bak someone had thoughtfully left behind. Nobody broke in. I run several AI coding sessions in parallel against the same machine, and one of them — working on a completely different task, automating a GoHighLevel workflow — had hit a limitation in my browser automation tool, fixed the tool itself , verified the fix, and then moved on with its actual job. It never committed. It never told anyone. It just left better code in my working tree and walked away. The diff was good. That was the problem. The change itself was a real feature. My query_all tool (it queries DOM elements across a page) stopped at the main frame: if the elements you wanted lived inside a cross-origin iframe, you got back a clean, confident, empty array. The uncommitted diff added an execAcrossFrames() helper that runs the query in every frame and merges the results, plus x / y / frame fields on each returned element. I verified it the way you'd verify anything: syntax check passed, and the full test suite — all 82 tests — ran green with the change in place . So: useful feature, my own repository, every signal green. Everything about the situation said commit it . I didn't. I wrote it up in my project log, left the file untouched, and set an explicit deadline: if it's still sitting there uncommitted in three days, evaluate it properly — upstream it or revert it and file an issue. Not "leave it and see," which is how working trees rot. A quarantine with no release date is just a junk drawer. Why quarantine green code? Two reasons, and neither is paranoia. First: authorship isn't verification. The session that wrote this code had context I didn't have. Maybe it was mid-iteration and the diff was half of a plan. Maybe the .bak file meant it intended to roll back. Committing someone's wo

本文内容来源于互联网,版权归原作者所有
查看原文