{
  "id": 410298,
  "title": "Commit message test plans",
  "url": "https://urgent.news/2026/08/09/commit-message-test-plans",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-09T18:38:22.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://blog.waleedkhan.name/commit-message-test-plans/"
  },
  "original_language": "en",
  "account": "Julio Merino has recently shared a markdown-based test suite that demonstrates using Markdown as a lightweight test format. This idea resonated with the author's own workflow, which involves embedding executable test plans directly within commit messages using a tool called scrut. By adding scrut code blocks to commit messages, developers can effortlessly run test commands and capture the results.\n\nTo execute these tests, the author has set up git-test-message as their default test command. This script reads the commit message and runs the associated scrut tests within the repository's working directory. Scrut is configured to assert that the command exits successfully and that the standard output (stdout) matches the expected result. However, for certain tools like bazel, stdout may not always be relevant or deterministic. In such cases, the author redirects the stdout to stderr, ensuring it is logged upon failure without being asserted.\n\nIn situations where there is no pre-existing test case for a particular scenario, the author often utilizes grep or scrutinizes the output using scrutin's built-in output expectations. These ad-hoc validation methods provide flexibility in testing various aspects of the codebase without relying on pre-defined test cases.\n\nOne notable application of this workflow is differential testing. This technique involves recording the new behavior of a tool, checking out a previous commit to capture the old behavior, and then comparing the two using a command like diff. The output of this comparison can be asserted with a specific exit code, such as [1] in the provided example, indicating that an exit code of 1 is expected.\n\nThroughout this process, the author has curated a list of hand-curated posts that delve deeper into this workflow and related topics. To stay updated with more posts and insights, readers are encouraged to follow the author on Bluesky, Mastodon, or Twitter, or subscribe via RSS.",
  "summary": null,
  "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."
}