Repository navigation
feat: ask where a first release starts instead of rendering all history - #198
Merged
Merged
Conversation
added 2 commits
September 21, 2026 12:37
A first tag's range was the whole history, rendered as a development log: intermediate states next to the changes that replaced them, and on a late adoption the first thing a new user saw. A range that spans all history now stops the run after the commits are read, before any GitHub request or model call, and names both ways out: --since <ref> starts the release after a tag or commit, and --whole-history renders all of it on purpose. Where a release starts is a fact decision, so it is the operator's, not a heuristic's or the model's. Closes #138
On Windows git writes its objects read-only, and Directory.Delete refuses a read-only file, so the first-tag test failed in cleanup.
goldbarth
added a commit
that referenced
this pull request
Oct 1, 2026
…320) Follows #319 (ADR 0004); this branch builds on it for the index row and is rebased onto `main` once #319 is merged. - **Why:** seven changes since September made Chartula stop where it used to choose silently, each with its own reasoning in its pull request, but the rule they share was written down nowhere. A contributor adding an option or a setting could not tell whether to refuse an ambiguous value or take the likelier reading, nor when refusing goes too far. - **Context** lists the seven cases in one table, each with what the silent choice did and the change that ended it: a first tag (#198 for #138, #282), a key sent to the other provider's host (#235), an unknown or misindented key (#238), a shallow clone read as a first release (#244), review mode approving unseen text (#247), two configuration files (#287 for #278), and options a command does not take (#301). Decided is #198, the first of them. - **Decision:** stop and say so instead of choosing; before anything is spent; with a message that names the cause and the fix, shown with two real messages; ask at a terminal where the answer is the user's, and stop naming the option without one; refuse only what Chartula can tell for certain (an empty list, an unknown host and an unknown model id are taken as written); refuse a setting that would have no effect. The rule is about what the user meant, not about what the release says, which is what flags are for. - **Consequences** name the cost: a run that could have produced something stops, and a CI job fails until the input says what it means. The ADR weighs that rerun against what a silent choice cost in the seven cases. For a new case, four questions in order, so a contributor can apply the rule rather than match it against the examples. - The index in `adr/README.md` lists 0005. **Verified:** - Each case was checked against its pull request's description and the issue it closes (#237, #243, #233, #278, #300, #138); the dates are the merge dates. - Both messages are the ones `docs/cli.md` and `docs/configuration.md` show from the built binary. - The counter-cases were checked in the code: `ProviderHost` accepts every host but two, `ClaudeThinkingSupport` passes an unknown model id, #289 reads an empty list as written, and #244 still runs `--since` in a shallow clone when the range holds. - Every relative link and anchor in all Markdown files of the repository resolves (script, with a negative test). Tests: none, documentation only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #138
--since <ref>names the start,--whole-historyrenders everything on purpose. Not chosen: an automatic cut-off, which would silently decide which changes belong to the release, and detecting superseded changes, which beyond exact reverts means reading meaning - a fact decision in the model.ReleasePipelineright after the commits are read, before the first GitHub request and before the model, so asking costs neither API budget nor tokens. It holds for every mode.WholeHistoryExceptionwith the tag and the commit count and knows no flags;ReleaseCommandturns it into the message with both options. It goes to stdout asError: ..., like every other failure after the pipeline started (docs/cli.md, "Exit status").--sinceworks on any tag and overrides the previous tag.GitCliCommitReaderverifies the ref resolves to a commit and is an ancestor of the release tag (git merge-base --is-ancestor), otherwise the range would hold commits that are not in the release.CommitRange.FromTagbecomesFromandIsFirstReleasebecomesIsWholeHistory: the start can now be a commit, and a first tag with--sinceis not a whole-history range. Neither is serialized, sochangelog.jsonis unchanged.--sincewithout a value, is refused before configuration is read.docs/cli.mdgets "Where a release starts", including the remaining limitation that a change replaced later in the same range is still its own entry; the README usage shows both options. The README's known-limitations line goes in with README does not show what Chartula produces, what it costs, or where it stops #182 (noted there).Repro and verification on this repository, whose first tag is
v0.1.0-preview.1: before,chartula preview --tag v0.1.0-preview.1rendered 48 entries from 69 commits (the #95 run). After:exit 1, no request made. An unresolvable
--sinceand passing both options fail with their own messages. A full run with--sincewas not made, since it costs tokens; the range it reads is covered by the reader tests.Tests:
WholeHistoryTests(a first tag without a start throws before GitHub and the model, enforced by stand-ins that throw if reached;WholeHistoryrenders;Sincereaches the reader);GitCliCommitReaderTests(a named start bounds a first tag, overrides the previous tag and accepts a commit expression, an unresolvable or non-ancestor start is refused);ReleaseStartTests(parsing, both refused, missing value refused, help names both, the refusal names cause and both ways out);FirstTagTestsruns the built CLI in a checkout whose only tag is its first.CliProcessnow returns stdout as well.