Urgent.News

What's breaking now, across thousands of outlets.

Tech

My parser reported a parse error on a file that was never malformed

A build step that reads requirement tables out of a document reported this, every run: FAIL_MAP reason=parse reason=parse has an obvious reading. Either the document is malformed or the parser is broken. A person following that reason code goes and looks at one of those two things. Both were fine. The fix changed neither, and it was one line. What was actually wrong The reader does not scan a…

A build process encountered a parse error when attempting to extract requirement tables from a document, even though the document was perfectly structured and the parser was functioning correctly. The parser failed because it incorrectly treated the entire file as prose, not recognizing the absence of structured forms declared in the document.

This resulted in 256 well-formed rows being misidentified as paragraphs, leading to a parse failure. The issue was not with the document or the parser, but with the declaration that connected them. The more useful reason code would have been "this file declares zero structured forms," as it is detectable without needing to know the contents of the document.

The second issue discovered was a nondeterministic failure during regeneration of derived artifacts, caused by uncommitted changes in a file used as an input. The correct handling is to regenerate at a committed boundary and commit that state. This rule is sometimes overlooked because the output usually appears correct. The two runs that disagreed were the only reason the issue was identified, despite a single run over a dirty tree producing a plausible artifact and hash that would never reproduce.

The key takeaway is that when a reason code names a stage, it should be treated as a location, not a cause. Asking what the stage was before asking what it did is the better approach. Derived artifacts must be regenerated from a committed state, not a clean-enough tree or changes that exist only on one machine, as the point of a derived artifact is to allow someone else to rebuild it and get the same bytes.

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

Migrating from crontab: five everyday schedules, translated into Kairos

If you arrived from the Kairos 1.0 announcement , this is the hands-on one: take a crontab you already have and translate it.

  • Translate crontab schedules to Kairos language for non-fixed-time repeats
  • Define calendar system and time zone before creating Kairos schedules
  • Run translated schedules with one crontab line checking for points daily

I Built a Python CLI Toolbox Instead of Writing One-Off Scripts

Whenever I ask an AI assistant to do a small task, it writes a quick Python script for me. Convert an image. Compress a PDF. Convert a CSV to Excel.

  • Developer created Python CLI toolbox named Toolbox
  • Toolbox includes utilities for CSV to Excel conversion, image manipulation, PDF compression
  • Developer used Python's package manager uv for dependency management

How I Turned the SAM.gov Public Bulk Dataset Into a Searchable Contractor Database

Working with public government datasets often sounds straightforward until you actually try to turn them into something useful. That was my experience with the SAM.gov public bulk dataset .

  • Author created SAM.gov Public Contractor & NAICS Database Compiler tool
  • Tool processes raw SAM.gov dataset locally, bypassing API limits
  • Supports multiple filters and two output modes for contractor data

More from Sunday 13 September →