Skip to content

feat(serialization): record how changelog.json was made - #202

Merged
goldbarth merged 1 commit into
mainfrom
feat/run-provenance
Sep 21, 2026
Merged

goldbarth merged 1 commit into
mainfrom
feat/run-provenance

Conversation

@goldbarth

@goldbarth goldbarth commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

Closes #179

  • changelog.json gains an optional provenance object with toolVersion, provider, model and promptHash (OD18, OD19). It is additive under schemaVersion: 1, which the Stability section of docs/changelog-json.md allows for a new optional field.
  • toolVersion is the assembly's informational version, which the SDK already suffixes with the commit it was built from (0.1.0-alpha+2c43772...), so the file names the exact build.
  • promptHash is sha256: over every instruction Chartula sends - each audience's system prompt, the thorough check's system prompt and its user template - without the facts, so it changes exactly when a prompt changes. It lives on ChangelogPromptBuilder.PromptHash, where A change to the prompt text is invisible in CI #180's snapshot test can use it too.
  • A value the run does not have (null or blank) is left out, never written empty; a file written without provenance has no provenance key at all. That keeps the stored fixtures byte-identical, so none needed regenerating.
  • Endpoint hosts, flags and check verdicts stay out: the file is meant to be published, and a host can name an internal gateway.
  • Provenance is assembled in the composition root (OutputServiceCollectionExtensions.Provenance) from LlmOptions and handed to FileChangelogJsonWriter; the pipeline and its port are unchanged.
  • docs/changelog-json.md documents the object and narrows "fields are always present" to the fields that always were.

Verification: the built binary's informational version reads 0.1.0-alpha+2c43772833e4ed32790e5549848f7f42bc0e4eee. A full generate was not run, since writing changelog.json needs a rendering and that costs tokens; the writer, the serializer and the wiring are covered below.

Tests: ProvenanceSerializationTests (all four fields written, a null or blank value left out, no provenance means no key, reads back without touching the facts, the prompt hash is a stable SHA-256); FileChangelogJsonWriterTests (the written file carries the provenance it was given); ProvenanceWiringTests (a run records the tool version, the configured provider and model, and the prompt hash). FactBaseFixtureTests pass unchanged, which is the check that files without provenance serialize exactly as before.

Tool version, provider and model were visible only on stdout during the
run, so a bad release could not be explained afterwards from the file.

changelog.json gains an optional provenance object: the Chartula version
with the commit it was built from, the provider, the model id, and a
SHA-256 of every instruction Chartula sends, without the facts. It is
additive under schemaVersion 1; a value the run does not have is left
out, and a file written without provenance has none, so the stored
fixtures do not change. Endpoint hosts stay out of a file meant to be
published.

Closes #179
@goldbarth goldbarth self-assigned this Sep 21, 2026
@goldbarth
goldbarth merged commit 058667d into main Sep 21, 2026
4 checks passed
@goldbarth
goldbarth deleted the feat/run-provenance branch September 21, 2026 11:28
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.

changelog.json does not say how it was made

1 participant