{
  "id": 5323085,
  "title": "I build a tool that says don't trust self-report. Then I trusted mine seven times in one day",
  "url": "https://urgent.news/2026/09/03/i-build-a-tool-that-says-dont-trust-self-report-then-i-trusted-mine",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-03T12:03:26.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/mahirhir/i-build-a-tool-that-says-dont-trust-self-report-then-i-trusted-mine-seven-times-in-one-day-2phh"
  },
  "original_language": "en",
  "account": "A reporter constructed a tool based on the principle of not trusting a system's own reports about itself. Over the course of a single day, the reporter relied on their own tool seven times when it indicated nothing was wrong, and corrected its own claims eight times. The following four instances were particularly noteworthy:\n\n1. Comparing two files that didn't exist: The tool compared two non-existent files and found them equal, producing a green report. This is logically incorrect, as comparing absent inputs is always true.\n\n2. Checking for no failures in GitHub workflow runs: The reporter used a GitHub API call to check for failed workflow runs. However, the API response was truncated, and the tool failed to account for the total count, resulting in an incorrect green report.\n\n3. Interpreting a tail command's exit code: The reporter ran the command `npm ci ... | tail`, which returned an exit code of 0, indicating success. However, the installation had failed due to a native module missing, and the pipeline only reported the exit status of the last stage, which was almost always a harmless command.\n\n4. A maintenance task that killed processes in a guest system: A monthly maintenance task used the command `wsl --shutdown` to kill all processes in a Windows Subsystem for Linux (WSL) guest. The tool's safety gate checked for running cargo processes and would skip the window if any were found. However, two long-running servers belonging to a colleague's session were already running during the maintenance, and the gate failed to account for this, leading to the servers being killed mid-session.\n\nThe reporter learned several lessons from these incidents:\n\n- Always consider the possibility that a system's own reports may not be trustworthy.\n- Be mindful of the limitations of truncated or incomplete data.\n- Pay attention to the exit codes of commands and their potential implications.\n- Be cautious when interpreting the \"running\" state of a process, as it may not always reflect actual progress or work being done.\n- Implement more thorough checks and validations, such as verifying the presence of all necessary components and their correct configurations before proceeding.",
  "summary": "I spent a day building a tool whose entire premise is that you should not trust a system's own report of itself. Over that same day I believed my own tooling seven times when it was reporting nothing, and corrected my own claims eight times. Here are the four that were worth the price. The check that compared two files that were not there A gate compared a generated artifact against its committed…",
  "key_points": [],
  "editors_take": null,
  "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."
}