Urgent.News

What's breaking now, across thousands of outlets.

Tech

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.

Read the original at dev.to →

More in Tech

Alibaba Cloud Partners with Datadog Close Go's Last Observability Gap

This article introduces OpenTelemetry Go Compile-Time Instrumentation v1, enabling zero-code, build-time observability for Go applications.

  • Alibaba Cloud and Datadog collaborate on OpenTelemetry Go Compile-Time Instrumentation v1.
  • Feature enables zero-code observability for Go applications without modifying business code.
  • Supports net/http, Database/SQL, and gRPC libraries with standardized spans and metrics.

Let's build a custom React hook for cross-tab state synchronization

Contents The Problem Architecture Overview The Types & Interface Tab Identity & State Ref The BroadcastChannel Listener The Synchronized Mutation Function Lock Coordination & Broadcasting Graceful…

  • Custom React hook for cross-tab state synchronization
  • Utilizes BroadcastChannel API and navigator.locks API
  • Prevents echo loops with unique tab identifiers

More from Wednesday 9 September →