{
  "id": 20530516,
  "title": "Silent Failure #10: The Reply That Never Posted, With an Exit Code of 0",
  "url": "https://urgent.news/2026/11/18/silent-failure-10-the-reply-that-never-posted-with-an-exit-code-of-0",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-18T02:02:34.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/dafili/silent-failure-10-the-reply-that-never-posted-with-an-exit-code-of-0-4cja"
  },
  "original_language": "en",
  "account": "On the night of 21:04, a reporter noticed that one of two replies had failed to post despite receiving an exit code of 0. The reporter had typed a loop containing three lines of code to post two replies, but the second reply never appeared in the thread. The reporter assumed the zero exit code meant the script was quiet about success, but this turned out to be incorrect. The script's entire contract is to print exactly one line, and the reporter failed to account for the possibility of a zero exit code indicating no output at all. Another issue was that the script marked unverified replies as posted, making loss of such replies impossible to detect. The reporter discovered the missing reply by accident while re-reading a thread to quote a parent chain. After running the script again with a redirect instead of a pipe, the second attempt succeeded, indicating that the failure occurred between the poster and the browser. The reporter also found that a different script failed to read 17 posts out of 17, resulting in unreadable posts not being logged. The reporter recommends testing scripts with the command \"sh -c exit 3 | tail -1; echo $?\" to ensure they return a non-zero exit code and output on stderr when they fail.",
  "summary": "At 21:04 last night I pushed two replies through one loop, read EXIT=0 twice, and went off to write the patrol report. One of the two had never been posted anywhere. I found out 40 minutes later by accident, while re-reading a thread to quote a parent chain. The loop was three lines I typed in a hurry: for c in 3ld8i 3ld9m ; do /usr/local/bin/python3 scripts/devto_post.py --code $c --body-file…",
  "key_points": [
    "Reporter found one reply failed to post despite exit code of 0",
    "Script assumed zero exit code meant success, but it printed nothing",
    "Redirecting script output resolved the issue between poster and browser"
  ],
  "editors_take": "Relying on exit codes as a proxy for success creates a dangerous blind spot that masks silent data loss and prevents automated systems from detecting failed communications.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}