Skip to content

feat(observability): record the range a run read in its run record - #251

Merged
goldbarth merged 1 commit into
mainfrom
feat/run-record-range
Sep 24, 2026
Merged

goldbarth merged 1 commit into
mainfrom
feat/run-record-range

Conversation

@goldbarth

@goldbarth goldbarth commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Follows #250, which introduced run record schema version 2, and #227 and #231.

  • Why: a run over a wrong range looks like any other run of the same tag, with other facts and flags. The ServiceDeskLite v1.9.0 comparison runs recorded 19 commits, while v1.8.0..v1.9.0 holds 10 today, and nothing in those records says which range they read.
  • What: range: { start, from, fromCommit, toCommit } next to tag. start is previous-tag, since or whole-history, named after the CLI's options. from is the ref as named or found.
  • Hashes, not only names: a tag can be moved, and a --since ref such as a branch moves by itself. git log <fromCommit>..<toCommit> replays the range later. An annotated tag is peeled to its commit (^{commit}).
  • Resolved where the range is read: GitCliCommitReader fills CommitRange.FromCommit and ToCommit, optional init properties so the test stubs stay as they are. ToCommit is the output of the rev-parse --verify the reader already runs; fromCommit costs one more rev-parse.
  • start is derived, not stored twice: from the start the operator named and CommitRange.From, following IReleaseCommitReader's contract: a named start wins, then the previous tag, then the whole history.
  • Arrives in schema version 2 with feat(faithfulness): name the pull request behind each flag #250. Absent in a version 1 record.
  • changelog.json is unchanged.

Verified end to end, no paid tokens: binary from this branch against local Ollama (gemma3:12b) in a scratch clone of this repository:

$ chartula generate --no-publish --tag v0.1.0-preview.2 --since 616bbf5 --repo goldbarth/chartula
  "range": {
    "start": "since",
    "from": "616bbf5",
    "fromCommit": "616bbf50cae137a9f1f154908daa7a49740fed55",
    "toCommit": "ca35f082b088099ffc62deabc99111c95cbd874f"
  }

$ chartula generate --no-publish --tag v0.1.0-preview.2 --repo goldbarth/chartula
  "range": {
    "start": "previous-tag",
    "from": "v0.1.0-preview.1",
    "fromCommit": "8930f18d6438acd6a86e2da7b6d7f35f45e2e592",
    "toCommit": "ca35f082b088099ffc62deabc99111c95cbd874f"
  }

Every hash matches git rev-parse of its ref in the clone.

Tests: GitCliCommitReaderTests (both ends' commits kept, annotated tag peeled, whole history has no start commit, a named start's commit), RunRecordPipelineTests (range and named start reach the record), RunRecordJsonSerializerTests (the three starts, an unknown range left out). Full suite 828 passing, build without warnings, dotnet format clean.

@goldbarth
goldbarth changed the base branch from feat/flag-pull-request to main September 24, 2026 12:25
The run record keeps where the range started (the previous tag, a start
named with --since, or the whole history), the ref it started after, and
the full hashes both ends pointed to. The same tag read over other commits
is another release, and without the range such a run cannot be told apart
from any other. The hashes replay the range after a tag has moved.

The field arrives in schema version 2, introduced with the flag objects.
@goldbarth
goldbarth force-pushed the feat/run-record-range branch from 78f76d5 to e079600 Compare September 24, 2026 12:25
@goldbarth goldbarth self-assigned this Sep 24, 2026
@goldbarth
goldbarth merged commit 863b56a into main Sep 24, 2026
4 checks passed
@goldbarth
goldbarth deleted the feat/run-record-range branch September 24, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant