Repository navigation
feat(history): read the commit range for a release from git - #42
Merged
Merged
Conversation
Add Chartula.Infrastructure with GitCliCommitReader, which finds the commits belonging to a release by shelling out to git: the range since the previous tag, or all history when there is no previous tag (first release). The pipeline depends only on the IReleaseCommitReader port in Chartula.Core; the concrete reader is chosen in the CLI composition root. Shelling out to git avoids a native git dependency, which keeps the planned native-AOT binaries viable. Tests exercise the real git CLI against throwaway repositories: between-tags range, first-release fallback, sha/subject mapping, and the unknown/blank-tag error paths.
goldbarth
added a commit
that referenced
this pull request
Oct 1, 2026
…rd decided, recorded and amended (#318) Follows #264, which moved the ADRs to `docs/development/adr/`, and #317, which ruled out the claim that the audiences "cannot disagree". - **Why:** the ADRs had one `Date` line that mixed when a decision was taken with what changed later ("2026-07-16 (#45), extended by #96"), no record of when each file was written, and no list of their own; CONTRIBUTING kept the only list. ADR 0003 did not mention #235, which added a refusal to the decision it records, and ADR 0002's title named the tools rather than the decision. - **`docs/development/adr/README.md`** holds the index, when to write an ADR, and a template with separate fields: **Decided** (when it took effect in the code, which can precede the record), **Recorded** (when the file was written), and **Amended** (every later change to the decision or to a fact in it, each dated with its pull request). A moved file, a fixed link or a reworded sentence is not an amendment, so the list stays a record of meaning. - **0001** gives the date and pull request of each part: facts first on 2026-07-16 (#45), and the structure of a rendering on 2026-09-16 (#129, for #96), which the Decision now marks as its own paragraph with the reason #96 found. Amended here: "so they cannot disagree on what happened" becomes what a shared fact base actually gives, the same changes, categories and breaking status, and says why texts can still disagree. - **0002** is retitled to its decision, "Dependencies that keep a native-AOT build reachable", and the file renamed to match; the Decision opens on the rule the bullets implement. #268's correction of the platform count is listed as its amendment. - **0003** records #235: a model endpoint on the API host of the other provider is refused before any request, with the reason (a key sent there must be rotated) and why the list of hosts stays short. Dated 2026-09-23, the day of #235, and marked as recorded here. - **CONTRIBUTING** links the index instead of listing the ADRs, and the README's "Contribute" table gains a row for it, so the list exists in one place. **Verified:** - Every date and number was taken from GitHub: the merge dates of #42, #43, #45, #129, #166, #216, #235 and #268, and the issues each closes (#3, #4, #6, #96, #158, #184, #233). - What #268 changed in 0002 was read from its diff: the platform count, nothing else. #264, #270 and #316 only moved the files or changed a link, so they are not amendments. - The rule 0003 now states was checked against `ProviderHost.cs` and #235's description. - Every relative link and anchor in all Markdown files of the repository resolves (script, with a negative test); the renamed 0002 had no inbound link besides CONTRIBUTING's list. 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 #3
What
Finds exactly the commits belonging to a release.
Chartula.Core: theIReleaseCommitReaderport plusCommitInfoandCommitRange(withIsFirstRelease). Pure domain, no I/O.Chartula.Infrastructure(new layer):GitCliCommitReadershells out togit- the range since the previous tag (<prev>..<tag>), or all history up to the tag when there is no previous tag (first release). Clear errors for unknown/blank tags.Chartula.Cli: composition root registers the git reader; the pipeline depends only on the port.Decisions
gitis present in any repo Chartula runs on.Chartula.Infrastructurelayer for concrete I/O adapters, keepingCorepure domain andClia thin composition root. Future home for the GitHub API (Fetch pull requests via the GitHub API #4), file writers (Serialize the fact base to changelog.json #12/Write CHANGELOG.md (prepend, preserve history) #20/Write back to GitHub release notes #21), and webhooks (Webhook output as a swappable adapter #28).Acceptance criteria
CommitRange.Commits, resolvable viaIReleaseCommitReader).Verification
Tests run the real
gitCLI against throwaway repositories (deterministic, offline): between-tags range, first-release fallback, sha/subject mapping, unknown-tag and blank-tag errors. Build 0 warnings / 0 errors; all tests green (Core 5, Infrastructure 6).