Repository navigation
feat: keep a run's metrics in a local run record - #227
Merged
Merged
Conversation
This was referenced Sep 24, 2026
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 #224
Follows #225 (the record carries the settings it added)
generaterun,chartula-runs/<UTC time>-<tag>.json: the run metrics as the summary prints them (calls and tokens per operation, both checks' activity,onlyThoroughFlags,notEvaluated), the provenance, each audience's flags or error, the time, repository and mode. Two runs compare from their files alone.-2,-3; a tag's/becomes-.changelog.jsonand the release notes are untouched.docs/run-record.mdsays to ignore/chartula-runs/, and this repository does.changelog.json's own fields:ChangelogJsonSerializer.ToDocumentis shared, so a record and the file its run wrote match without a second source.schemaVersion: 1and Stability section, documented likechangelog.json.previewwrites no record: its promise is to write nothing.changelog.jsonis still held back then.flags: a zero is a value that compares; an empty list would read as a clean check.Recorded in <path>.+,') followschangelog.json; whether both should relax is changelog.json escapes '+', quotes and every non-ASCII character #226.Verified, release build:
generate --no-publish --tag v0.1.0-preview.1 --since v0.1.0-preview.1~2on this repository with an invalidANTHROPIC_API_KEY(no tokens spent): both audiences fail with 401, exit 1, the summary ends withRecorded in .../chartula-runs/20260922T144044Z-v0.1.0-preview.1.json, the file holds both errors, zeroed metrics and the full provenance, and git ignores it.Not verified end-to-end: a run that renders, which needs a paid model run; covered by the pipeline and serializer tests.
Tests: 6 new in
RunRecordJsonSerializerTests, 4 inRunRecordPipelineTests(generate and --no-publish record, preview does not, a run with nothing rendered does), 4 inFileRunRecordWriterTests(name, same second, slash in tag, provenance), 2 inReleaseCommandMetricsTests, 1 assertion inOutputWiringTests; full suite 677 passing, build anddotnet formatclean.