That gap is exactly one of the hardest parts of generating release notes with AI.
A diff can give you plenty of implementation detail, but if the reason isn’t actually present in the evidence, a model can very easily fill in the blank with something that merely sounds convincing.
I’m especially happy to see the linked-issue evidence and counterfactual evaluation highlighted.
For changelog-bot, the goal isn’t just to generate nicer prose, it’s to make sure the WHY we surface is actually supported by something we can point back to.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Thanks so much for the kind words and for the work on changelog-bot! Framing it around "What vs. Why" really clicked once I saw how easily a plausible-sounding summary can mask the real reason behind a change. Grounding claims in linked issues and testing against counterfactual decoys makes the whole pipeline much more trustworthy in practice. Really appreciate you taking the time to read and share your thoughts.
This is interesting example of the difference between what machines can see and what humans understand. As the OS contributors, we know there's more to a code change than just the diff. Issues and PR discussions often tell the story behind it. But that also depends on how well we document our thoughts and decisions. AI can certainly connect the dots, but I still think human review matters.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Spot on, especially about how much depends on the context we actually write down in issues and PR threads. AI is great at connecting dots across those artifacts, but when context is missing or implicit, human review is still essential to catch what the code alone cannot explain. Thanks for sharing that perspective.
The memory leak patch turned into a 'JSON serialization optimisation' is a perfect example. The diff showed deleted buffers, so the model invented a reason that fit. Linking the issue is the fix because the issue holds the why and the diff only holds the what. Do you block generation entirely when a commit has no linked issue?
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
No, it does not block generation entirely. Unlinked changes fall back to deterministic heuristics or lighter summaries without inventing intent, while keeping ungrounded items clearly separated from issue-backed claims.
A technologist working in automation. Here I write up what I actually learn building tools, engineering AI agents, and keeping systems running, along with the workflows and habits that stick.
The two-issue limit makes provenance especially useful: if a PR closes three issues, a release note can end up with only part of the reason. I'd keep the issue URLs beside each generated claim and flag uncited rationale for review. That also makes the API-failure fallback visible instead of presenting a heuristic as sourced intent.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Great catch on the two-issue cap and provenance tracking. Attaching explicit issue URLs to individual claims, surfacing ungrounded items for review, and making fallback heuristics visibly distinct from verified intent are super practical ways to keep release notes honest when context is partial or APIs degrade.
Solo developer building practical CLI tools for Linux auditing and B2B data extraction. Creator of Vaultcheck and NPILift. I write about silent failures, false green lights, and infrastructure reliabi
Measure the substrate before blaming the model: on my own repo git log --format=%b is empty for 23 of 120 commits and under ten words for 50, so for 42% of the history there is no why to retrieve and any summary of those is extrapolation with a citation. Index PR bodies and issue links as a separate corpus, and make the generator name the artifact per claim instead of per commit.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Measuring the substrate before tuning the model is a great point. When commit bodies are sparse or missing, forcing a rationale is just extrapolation with extra steps. Indexing PR bodies and issue links separately and tying citations to the specific supporting artifact per claim rather than the commit as a whole makes provenance much cleaner.
Solo developer building practical CLI tools for Linux auditing and B2B data extraction. Creator of Vaultcheck and NPILift. I write about silent failures, false green lights, and infrastructure reliabi
Splitting the corpora is right, but measure corpus two before you trust it: gh api repos/:owner/:repo/pulls --paginate -f state=closed --jq '.[] | [.merge_commit_sha, (.body|length)] | @tsv' joined against git log --format=%H shows which merges carry a real body and which are just the title repeated. I'd set the bar at 100 characters and label everything under it unknown rather than citing the commit — a citation pointing at a body that says "fix tests" is the same extrapolation with a nicer reference.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Checking PR body lengths against merged commits before trusting the second corpus is a sharp way to catch title-only or near-empty descriptions. Setting a minimum threshold like 100 characters and marking shorter ones as unknown keeps a citation from dressing up a "fix tests" note as real rationale.
Solo developer building practical CLI tools for Linux auditing and B2B data extraction. Creator of Vaultcheck and NPILift. I write about silent failures, false green lights, and infrastructure reliabi
Run the join before you trust it: squash and rebase merges come back with merge_commit_sha null, so a hash join quietly drops exactly the PRs whose body is the only rationale you have. Count the loss first — gh api repos/:owner/:repo/pulls?state=closed --paginate --jq '.[] | select(.merged_at) | .merge_commit_sha' | grep -c null — and if that number is above zero, attach bodies through the "(#123)" suffix in the squash subject instead of the sha.
Turning a memory-leak buffer removal into 'optimized JSON payload serialization' is painfully accurate. A raw diff shows timeoutMs going from 5000 to 15000, never that a downstream gateway started dropping handshakes. Pulling linked PR descriptions or incident tickets into the prompt helps way more than feeding bare diffs.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Incident tickets and linked PR discussions carry the exact operational context that a raw diff strips away. Giving the model those upstream artifacts turns release notes from guesswork into a reliable record of why the change was actually needed.
Great breakdown of the diff-context gap. We ran into almost the exact same failure mode when generating changelogs solely from commit logs — models love inventing "performance improvements" whenever a diff removes allocations or bumps a timeout.
Adding the linked issue summary and the "Motivation / Risk" section from the PR template into the prompt fixed most of the hallucinations, since that's usually the only place the actual why lives.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
That performance improvements reflex around deleted allocations and bumped timeouts shows up everywhere when context is missing. Pulling in both the linked issue summary and an explicit Motivation / Risk section from PR templates is a very clean way to capture intent where it actually gets written down.
That opening example of an emergency memory leak patch turning into "optimized JSON payload serialization for low-latency clients" hits way too close to home. LLMs are fundamentally trained to be optimistic narrative-completers, so when you feed them raw diffs without context, they naturally treat every deleted line or tweaked constant as an intentional, user-facing improvement.
The point about AI-generated PR descriptions compounding this problem is huge, too. We’re increasingly seeing a "game of telephone" where an AI coding agent writes an unsupported-plausible rationale in the PR body, and then a second AI summarizer treats that hallucinated PR description as ground truth for the release notes. Anchoring the pipeline back to the linked GitHub issue—where a human actually described the pain point—cuts right through that noise.
Also really appreciate the Unix-style decoupling of --output stdout from side effects like opening PRs. Too many CI tools assume they should own the entire write lifecycle out of the box, which makes local dry-runs and custom release workflows way harder than they need to be.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
That "game of telephone" between an AI coding agent and a changelog summarizer is a great way to put it. Once a plausible but unsupported rationale enters the PR body, downstream tools easily treat it as established fact. Going back to the linked issue where the actual pain point was reported helps break that chain, and keeping --output stdout separate from write side effects makes local testing and custom pipelines much cleaner. Thanks for sharing such a thorough response.
Building AI systems and fixing AI-generated apps before they collapse in production.
Working with agentic AI, RAG pipelines, AI orchestration, and startup MVP scaling at IT Path Solutions.
The counterfactual evaluation approach is particularly important here. A release note can be technically consistent with a diff and still be completely wrong about the reason behind the change. One additional safeguard is to preserve the evidence chain for every generated claim: linked issue, relevant PR context, commit, and the specific user impact being described. Issue links are useful signals, but they can be stale, overly broad, or attached to PRs that address only part of the original problem. I’d also keep unsupported rationale separate from verified facts rather than letting the model turn missing context into confident prose. That makes release notes easier to audit and gives teams a clear fallback when the source history cannot establish intent.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
That evidence-chain framing, linking issue, PR context, commit, and concrete user impact - hits on why a diff-consistent note can still miss the mark when an issue is stale, broad, or only partially resolved. Keeping unsupported rationale separate from verified facts makes auditing straightforward and gives a clear fallback when history cannot establish intent. Thanks for adding such a sharp breakdown.
The decoy cases are useful because a tidy explanation can still be completely unsupported. I would add a linked issue that is real but belongs to a different repository, then check that matching issue numbers cannot supply the rationale. This evaluation design exercise has a useful follow-up about reward hacking; accepting any citation feels like exactly that kind of shortcut.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Testing against a real issue from a different repository and checking that colliding issue numbers cannot supply the rationale are sharp decoy cases. Accepting any citation blindly is a classic reward-hacking shortcut, so tightening the eval around cross-repo and number-collision traps is a great addition.
Building AI systems and fixing AI-generated apps before they collapse in production.
Working with agentic AI, RAG pipelines, AI orchestration, and startup MVP scaling at IT Path Solutions.
Another useful safeguard would be to make confidence in the underlying evidence visible in the release note itself. For example, distinguish between a behavior change confirmed by an issue or acceptance criteria, an implementation detail established by the diff, and a suspected user impact inferred by the model. These are three different levels of evidence and shouldn't be presented with the same certainty. I'd also preserve that distinction when the linked issue is unavailable or contains conflicting context, rather than letting the model fill the gap with a plausible explanation. A changelog doesn't need to explain every engineering decision, but every claim it does make should be traceable to something verifiable. That matters even more when release notes become part of customer-facing documentation.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Separating confirmed behavior changes, diff-verified implementation details, and inferred user impact, and keeping that distinction intact when an issue is missing or conflicting is a great way to surface epistemic confidence right inside the release notes. Treating every claim as traceable to verifiable evidence rather than forcing a narrative on every engineering detail makes customer-facing changelogs far more reliable. Thanks for building on the discussion with another strong point.
"The 'unsupported-plausible' archetype nails it — that's exactly the flavor of release note I've learned to distrust on sight. Does the pipeline fall back to heuristics silently when a PR mentions the issue in prose but skips the closing keywords, or does it flag that as low-confidence?"
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Right now, CLOSING_KEYWORD_PATTERN only matches explicit GitHub closing keywords (close, fix, resolve, etc.), so an issue mentioned purely in prose without a closing keyword won't be picked up as a verified causal link and will trigger the heuristic fallback. Making that fallback path visibly distinct, such as marking unlinked or prose-only items as lower-confidence rather than blending them seamlessly with issue-backed claims is definitely the right direction so reviewers can spot missing provenance immediately.
Building LoreNext — independent long-form publishing & Passcard-gated reader clubs on Base. Own your pricing, settle in USDC, and archive works permanently.
The distinction between "what" changed in a diff and "why" it was needed is spot on. Even a simple timeout bump from 5s to 15s looks like a random tweak in isolation, whereas linked issues or PR discussions capture the actual production context. Grounding release notes in those artifacts rather than guessing from code diffs alone makes a huge difference.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
That timeout example captures it well. Isolated config changes rarely explain the production pressure behind them on their own. Anchoring release notes in issues and PR context keeps the focus on real impact instead of guesswork. Thanks for chiming in.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Raw diffs only record line-level mutations, so prompting an LLM without linked issue graphs trades the CI latency and context-window overhead of graph hydration for plausible-sounding causal hallucinations in production release notes, while counterfactual evals fail silently whenever engineers merge unlinked hotfixes under incident pressure. Diffs record mutations, not intent.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Trading graph hydration latency and token overhead for ungrounded causal guesses is a real cost, and unlinked incident hotfixes are a classic blind spot when context is missing. Keeping diffs strictly to what mutated while surfacing unlinked or low-context changes explicitly helps avoid turning urgency into false confidence.
I measure AI coding claims in public. LGTM — Let's Get the Measurements: real runs, real numbers, receipts. Every article is an experiment I actually ran. Books & packs: aheadkit.gumroad.com
The v1.4.0 story is the one that stays with me. A memory leak that crashed pods under peak traffic, retold as "optimized JSON payload serialization for low-latency clients". That is not a summary error, that is a press release for a fire. I keep thinking about the gap between what happened and what got written down, because I measured a version of it last week: a finished step missed its save by 5.9 seconds, so the log said the work was banked and the patch said otherwise. Your counterfactual test is the part I want to steal. Do you have an FPR number from it yet, or is that still the next run?
Guessing intent from raw code diffs feels a lot like guessing box specs without an order ticket at The Printing World. Linking real issue context keeps release notes honest, just like keeping job notes with every dieline.
We're a place where coders share, stay up-to-date and grow their careers.
I really like the “What vs Why” framing here! 😸
That gap is exactly one of the hardest parts of generating release notes with AI.
A diff can give you plenty of implementation detail, but if the reason isn’t actually present in the evidence, a model can very easily fill in the blank with something that merely sounds convincing.
I’m especially happy to see the linked-issue evidence and counterfactual evaluation highlighted.
For
changelog-bot, the goal isn’t just to generate nicer prose, it’s to make sure the WHY we surface is actually supported by something we can point back to.Thanks for digging into the project so deeply! 💚
Thanks so much for the kind words and for the work on
changelog-bot! Framing it around "What vs. Why" really clicked once I saw how easily a plausible-sounding summary can mask the real reason behind a change. Grounding claims in linked issues and testing against counterfactual decoys makes the whole pipeline much more trustworthy in practice. Really appreciate you taking the time to read and share your thoughts.This is interesting example of the difference between what machines can see and what humans understand. As the OS contributors, we know there's more to a code change than just the diff. Issues and PR discussions often tell the story behind it. But that also depends on how well we document our thoughts and decisions. AI can certainly connect the dots, but I still think human review matters.
Spot on, especially about how much depends on the context we actually write down in issues and PR threads. AI is great at connecting dots across those artifacts, but when context is missing or implicit, human review is still essential to catch what the code alone cannot explain. Thanks for sharing that perspective.
The memory leak patch turned into a 'JSON serialization optimisation' is a perfect example. The diff showed deleted buffers, so the model invented a reason that fit. Linking the issue is the fix because the issue holds the why and the diff only holds the what. Do you block generation entirely when a commit has no linked issue?
No, it does not block generation entirely. Unlinked changes fall back to deterministic heuristics or lighter summaries without inventing intent, while keeping ungrounded items clearly separated from issue-backed claims.
The two-issue limit makes provenance especially useful: if a PR closes three issues, a release note can end up with only part of the reason. I'd keep the issue URLs beside each generated claim and flag uncited rationale for review. That also makes the API-failure fallback visible instead of presenting a heuristic as sourced intent.
Great catch on the two-issue cap and provenance tracking. Attaching explicit issue URLs to individual claims, surfacing ungrounded items for review, and making fallback heuristics visibly distinct from verified intent are super practical ways to keep release notes honest when context is partial or APIs degrade.
Measure the substrate before blaming the model: on my own repo git log --format=%b is empty for 23 of 120 commits and under ten words for 50, so for 42% of the history there is no why to retrieve and any summary of those is extrapolation with a citation. Index PR bodies and issue links as a separate corpus, and make the generator name the artifact per claim instead of per commit.
Measuring the substrate before tuning the model is a great point. When commit bodies are sparse or missing, forcing a rationale is just extrapolation with extra steps. Indexing PR bodies and issue links separately and tying citations to the specific supporting artifact per claim rather than the commit as a whole makes provenance much cleaner.
Splitting the corpora is right, but measure corpus two before you trust it: gh api repos/:owner/:repo/pulls --paginate -f state=closed --jq '.[] | [.merge_commit_sha, (.body|length)] | @tsv' joined against git log --format=%H shows which merges carry a real body and which are just the title repeated. I'd set the bar at 100 characters and label everything under it unknown rather than citing the commit — a citation pointing at a body that says "fix tests" is the same extrapolation with a nicer reference.
Checking PR body lengths against merged commits before trusting the second corpus is a sharp way to catch title-only or near-empty descriptions. Setting a minimum threshold like 100 characters and marking shorter ones as unknown keeps a citation from dressing up a "fix tests" note as real rationale.
Run the join before you trust it: squash and rebase merges come back with merge_commit_sha null, so a hash join quietly drops exactly the PRs whose body is the only rationale you have. Count the loss first — gh api repos/:owner/:repo/pulls?state=closed --paginate --jq '.[] | select(.merged_at) | .merge_commit_sha' | grep -c null — and if that number is above zero, attach bodies through the "(#123)" suffix in the squash subject instead of the sha.
Turning a memory-leak buffer removal into 'optimized JSON payload serialization' is painfully accurate. A raw diff shows timeoutMs going from 5000 to 15000, never that a downstream gateway started dropping handshakes. Pulling linked PR descriptions or incident tickets into the prompt helps way more than feeding bare diffs.
Incident tickets and linked PR discussions carry the exact operational context that a raw diff strips away. Giving the model those upstream artifacts turns release notes from guesswork into a reliable record of why the change was actually needed.
Great breakdown of the diff-context gap. We ran into almost the exact same failure mode when generating changelogs solely from commit logs — models love inventing "performance improvements" whenever a diff removes allocations or bumps a timeout.
Adding the linked issue summary and the "Motivation / Risk" section from the PR template into the prompt fixed most of the hallucinations, since that's usually the only place the actual why lives.
That performance improvements reflex around deleted allocations and bumped timeouts shows up everywhere when context is missing. Pulling in both the linked issue summary and an explicit Motivation / Risk section from PR templates is a very clean way to capture intent where it actually gets written down.
That opening example of an emergency memory leak patch turning into "optimized JSON payload serialization for low-latency clients" hits way too close to home. LLMs are fundamentally trained to be optimistic narrative-completers, so when you feed them raw diffs without context, they naturally treat every deleted line or tweaked constant as an intentional, user-facing improvement.
The point about AI-generated PR descriptions compounding this problem is huge, too. We’re increasingly seeing a "game of telephone" where an AI coding agent writes an unsupported-plausible rationale in the PR body, and then a second AI summarizer treats that hallucinated PR description as ground truth for the release notes. Anchoring the pipeline back to the linked GitHub issue—where a human actually described the pain point—cuts right through that noise.
Also really appreciate the Unix-style decoupling of
--output stdoutfrom side effects like opening PRs. Too many CI tools assume they should own the entire write lifecycle out of the box, which makes local dry-runs and custom release workflows way harder than they need to be.That "game of telephone" between an AI coding agent and a changelog summarizer is a great way to put it. Once a plausible but unsupported rationale enters the PR body, downstream tools easily treat it as established fact. Going back to the linked issue where the actual pain point was reported helps break that chain, and keeping
--output stdoutseparate from write side effects makes local testing and custom pipelines much cleaner. Thanks for sharing such a thorough response.The counterfactual evaluation approach is particularly important here. A release note can be technically consistent with a diff and still be completely wrong about the reason behind the change. One additional safeguard is to preserve the evidence chain for every generated claim: linked issue, relevant PR context, commit, and the specific user impact being described. Issue links are useful signals, but they can be stale, overly broad, or attached to PRs that address only part of the original problem. I’d also keep unsupported rationale separate from verified facts rather than letting the model turn missing context into confident prose. That makes release notes easier to audit and gives teams a clear fallback when the source history cannot establish intent.
That evidence-chain framing, linking issue, PR context, commit, and concrete user impact - hits on why a diff-consistent note can still miss the mark when an issue is stale, broad, or only partially resolved. Keeping unsupported rationale separate from verified facts makes auditing straightforward and gives a clear fallback when history cannot establish intent. Thanks for adding such a sharp breakdown.
The decoy cases are useful because a tidy explanation can still be completely unsupported. I would add a linked issue that is real but belongs to a different repository, then check that matching issue numbers cannot supply the rationale. This evaluation design exercise has a useful follow-up about reward hacking; accepting any citation feels like exactly that kind of shortcut.
Testing against a real issue from a different repository and checking that colliding issue numbers cannot supply the rationale are sharp decoy cases. Accepting any citation blindly is a classic reward-hacking shortcut, so tightening the eval around cross-repo and number-collision traps is a great addition.
Another useful safeguard would be to make confidence in the underlying evidence visible in the release note itself. For example, distinguish between a behavior change confirmed by an issue or acceptance criteria, an implementation detail established by the diff, and a suspected user impact inferred by the model. These are three different levels of evidence and shouldn't be presented with the same certainty. I'd also preserve that distinction when the linked issue is unavailable or contains conflicting context, rather than letting the model fill the gap with a plausible explanation. A changelog doesn't need to explain every engineering decision, but every claim it does make should be traceable to something verifiable. That matters even more when release notes become part of customer-facing documentation.
Separating confirmed behavior changes, diff-verified implementation details, and inferred user impact, and keeping that distinction intact when an issue is missing or conflicting is a great way to surface epistemic confidence right inside the release notes. Treating every claim as traceable to verifiable evidence rather than forcing a narrative on every engineering detail makes customer-facing changelogs far more reliable. Thanks for building on the discussion with another strong point.
"The 'unsupported-plausible' archetype nails it — that's exactly the flavor of release note I've learned to distrust on sight. Does the pipeline fall back to heuristics silently when a PR mentions the issue in prose but skips the closing keywords, or does it flag that as low-confidence?"
Right now,
CLOSING_KEYWORD_PATTERNonly matches explicit GitHub closing keywords (close,fix,resolve, etc.), so an issue mentioned purely in prose without a closing keyword won't be picked up as a verified causal link and will trigger the heuristic fallback. Making that fallback path visibly distinct, such as marking unlinked or prose-only items as lower-confidence rather than blending them seamlessly with issue-backed claims is definitely the right direction so reviewers can spot missing provenance immediately.The distinction between "what" changed in a diff and "why" it was needed is spot on. Even a simple timeout bump from 5s to 15s looks like a random tweak in isolation, whereas linked issues or PR discussions capture the actual production context. Grounding release notes in those artifacts rather than guessing from code diffs alone makes a huge difference.
That timeout example captures it well. Isolated config changes rarely explain the production pressure behind them on their own. Anchoring release notes in issues and PR context keeps the focus on real impact instead of guesswork. Thanks for chiming in.
I think the linked issue idea is the part that makes this click for me.
Thanks!
Raw diffs only record line-level mutations, so prompting an LLM without linked issue graphs trades the CI latency and context-window overhead of graph hydration for plausible-sounding causal hallucinations in production release notes, while counterfactual evals fail silently whenever engineers merge unlinked hotfixes under incident pressure. Diffs record mutations, not intent.
Trading graph hydration latency and token overhead for ungrounded causal guesses is a real cost, and unlinked incident hotfixes are a classic blind spot when context is missing. Keeping diffs strictly to what mutated while surfacing unlinked or low-context changes explicitly helps avoid turning urgency into false confidence.
The v1.4.0 story is the one that stays with me. A memory leak that crashed pods under peak traffic, retold as "optimized JSON payload serialization for low-latency clients". That is not a summary error, that is a press release for a fire. I keep thinking about the gap between what happened and what got written down, because I measured a version of it last week: a finished step missed its save by 5.9 seconds, so the log said the work was banked and the patch said otherwise. Your counterfactual test is the part I want to steal. Do you have an FPR number from it yet, or is that still the next run?
Guessing intent from raw code diffs feels a lot like guessing box specs without an order ticket at The Printing World. Linking real issue context keeps release notes honest, just like keeping job notes with every dieline.