The bug that only existed on the platform nobody was looking at
I ship a Python tool with a regression suite of several thousand checks and CI on ubuntu, macOS and Windows at Python 3.8 and 3.13. Yesterday all five jobs were green. Today those same jobs turned up four defects that had already shipped. None of them errored. Each was a rule that was true on the machine it was written on. 1. A guard that compared a resolved path to an unresolved one The tool has…
The bug that only existed on the platform nobody was looking at involved four defects discovered in a Python tool after it had already shipped. These issues were related to how the tool handled file paths, carriage returns, and Windows-specific syntax. The first issue involved a guard that compared resolved paths to unresolved ones, which caused the tool to refuse reading files from symlinks outside the repository on Windows due to differences in how Windows handles file paths compared to POSIX systems.
The second issue was related to carriage returns that were not canonicalised on Windows, causing the tool to reject valid arguments and fail to stage files properly. The third issue involved an instruction for creating a new Windows user that did not work when pasted, as it used the wrong syntax for the Windows environment. The fourth issue was related to a symlink loop that caused the Path.resolve() method to raise an exception in Python 3.13 but silently truncate the entry in earlier versions, leading to inconsistent behaviour across Python versions.
The author discovered these issues through a Python tool with a large regression suite running on multiple platforms, which allowed them to identify and fix the bugs by asserting on the artifact, rather than the source that produced it.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.