Four bugs my publisher's validator could not see
Four bugs my publisher's validator could not see I publish everything I build to a small private ops portal: scheduled job reports, generated images, deploys, drafts. One Python CLI called publicar writes a JSON file per publication into data/publications/ , rebuilds the feed manifest in data/index.json , and has a validar subcommand that is supposed to stop a broken record from going live.…
A Python CLI named publicar was used to publish content to a private portal. Its validar subcommand was designed to prevent broken records from being published. However, between October 1 and October 6, seven publications failed this validation despite the validator reporting "OK" for each of them. The issue was traced back to the --markdown flag, which was expected to read from a file when given a file path.
Instead, it stored the path, leading to the path being used as the article body in the feed. This resulted in a 404 error when users tried to access the content. The root cause was that the validator was comparing the manifest against the JSON, which both contained the file path, making the check appear successful. However, this did not verify whether the actual content was correct.
The validator also failed to detect the issue when the media file type was specified in both English and Portuguese, leading to a 404 error on the feed card image and rendering the file name as text instead of an image. To address these problems, the validator was updated to check the length and presence of line breaks in the content, as well as normalizing the media file type to ensure consistency across all consumers.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.