Skip to content

feat!: keep pull request descriptions out of changelog.json, and the complete facts in the run record - #294

Merged
goldbarth merged 1 commit into
mainfrom
feat/changelog-json-without-descriptions
Sep 30, 2026
Merged

goldbarth merged 1 commit into
mainfrom
feat/changelog-json-without-descriptions

Conversation

@goldbarth

Copy link
Copy Markdown
Owner

Closes #260

  • Why: changelog.json is meant to be published and carried every pull request description in full: what authors wrote for reviewers, internal notes, measurements, links to internal systems. The file had two roles pulling in opposite directions. The decision to split them, with its reasons, is recorded in changelog.json is meant to be published but carries every pull request description in full #260.
  • changelog.json is the release payload, schema version 2: a change entry loses description. Every entry field is always present, so dropping one is breaking and bumps the version. Titles, numbers, links, categories, flags, labels, closed issues, renderings and provenance stay. changelog-json.md says what the file holds and that it is safe to publish, and where a version 1 consumer finds the description now.
  • The run record keeps the complete facts: a new facts array, the change entries with their descriptions (FactEntry). It is an added optional field, so the record stays at version 3, and a record written before has none. The record already was the local, never-published record of a run, and one file per run keeps it that way.
  • Reading a fact base back comes from the record: RunRecordJsonSerializer.DeserializeFactBase reads only tag and facts, and refuses a record without facts by name. ChangelogJsonSerializer.DeserializeFactBase is gone: a version 2 file cannot give the model what it read.
  • Fixtures are the tag and facts of a run record, so a real run is still frozen into a fixture by copying what it wrote. The five files were converted without changing a value; FactBaseFixtureTests still re-serializes each and compares it to disk. docs/development/testing.md describes it.
  • chartula-evals reads the fact base from the record: tools: read the fact base from the run record, since changelog.json leaves the descriptions out chartula-evals#12 adds --record to tools/from_chartula_run.py, keeps version 1 files working, and refuses a version 2 fact base without the record.
  • Webhook output as a swappable adapter #28 sends changelog.json, which now carries no description; noted on Webhook output as a swappable adapter #28.
  • Docs: changelog-json.md (schema, what is published, the example, version history), run-record.md (the facts field, why the descriptions live there), cli.md, writing-pull-requests.md (the model still reads a description, so a reviewer note can still surface in a rendering), README.
  • Breaking, hence feat!. Conflicts with feat(facts): take closed issue numbers from the text the model reads, at every depth #293 on the linkedIssues row in changelog-json.md, whichever merges second.

Verified end to end, no tokens: the built binary ran generate --no-publish in a scratch repository, GitHub and the model served by a local stub, with a pull request body holding "Internal note: measured 40 ms on bench-7, see https://wiki.internal/perf.":

changelog.json   schemaVersion 2
                 change fields: breaking, category, labels, linkedIssues, number, title, url, userVisible
                 "Internal note" found: 0 times
run record       schemaVersion 3
                 facts[].description: [null, "Adds search. Internal note: measured 40 ms on bench-7, see https://wiki.internal/perf."]

Tests: FactBaseRoundTripTests (facts round-trip through the run record; changelog.json is version 2 with no description; facts without labels read as empty; a record without facts is refused; an unknown category is refused), RunRecordJsonSerializerTests (facts written with descriptions and read back; no facts, no field), RunRecordPipelineTests (the pipeline hands the record the facts it rendered from, descriptions included), ChangelogJsonSerializerTests and FileChangelogJsonWriterTests (version 2, no description), fixtures loaded from the new format and re-serialized to disk. Full suite 884 passing, build without warnings, dotnet format clean.

@goldbarth goldbarth self-assigned this Sep 30, 2026
@goldbarth
goldbarth merged commit ed7791b into main Sep 30, 2026
4 checks passed
@goldbarth
goldbarth deleted the feat/changelog-json-without-descriptions branch September 30, 2026 12:08
goldbarth added a commit that referenced this pull request Sep 30, 2026
…its issue (#303)

Follows #299 and #301; after them every issue the documentation plan
waited for is closed.

- **Why:** `ROADMAP.md` described plans in internal terms ("pull request
text as data", "an author-supplied outcome as a fact source"), linked
only three of its points, still listed the launch work as it stood
before `doctor`, `--version` and the thorough-check measurement landed,
and did not say which point removes which known limitation. A reader
could not tell what a point changes for them, whether work on it exists,
or when a limitation goes away.
- **One bold sentence per point on what changes for the user,** then at
most one sentence of detail. The internal wording is gone.
- **Every point links its issue or milestone, or says "No issue yet".**
The issue list was checked in full: only the GitHub Action (milestone
6), native AOT (milestone 8) and #249 have one; the rest have none, and
the page says so rather than implying work in progress.
- **"Now" names the actual launch scope:** the three open issues of the
Launch milestone (#210, #211, #226), each as what it changes, and this
documentation rework, which has no issue. `chartula doctor`, `--version`
and the thorough check's measured default (#176) are shipped and leave
the list; `doctor` joins the sentence on what the alpha has.
- **#249 joins point 2,** which it is: a run with flags stops before it
writes, and a published release is not changed unasked. The working-tree
protection in the same point has no issue and says so.
- **GitLab joins as point 9,** last, since the order after it was not
decided; the README's "GitHub is the only source" is the limitation it
removes.
- **Plans and limitations each live in one place:** the README keeps the
limitations, the roadmap names each one it removes with the README's
exact wording (checked by script: all eight names match a README
bullet), and the README's introduction to the limitations points to the
roadmap for the order instead of saying "after the alpha".
- **Point 5 is worded from stored facts, not from `changelog.json`:**
since #294 the facts with their descriptions are in the run record, and
`changelog.json` no longer carries what rendering needs. Point 8 no
longer promises a runtime-free binary, because the binaries are already
self-contained (`docs/install.md`); it says what native AOT changes, a
native executable that starts faster.

**Verified:**
- Every issue and milestone link was checked against the GitHub API, and
the open issues of each milestone against the points that name them.
- Every relative link and anchor in all Markdown files of the repository
resolves (script, with a negative test).

Tests: none, documentation only.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01BQ1Z71j4Q2W1CwGYjF55No

---
_Generated by [Claude
Code](https://claude.ai/code/session_01BQ1Z71j4Q2W1CwGYjF55No)_

Co-authored-by: Claude <[email protected]>
goldbarth added a commit that referenced this pull request Oct 1, 2026
…eal release into a fixture (#316)

Follows #294, which made a fixture the `tag` and `facts` of a run
record, and #314, which made the run record page the schema it points
to.

- **Why:** `testing.md` explained the fixtures and the prompt snapshots
of `Chartula.Core.Tests` only. A contributor working on an adapter or on
the CLI found nothing on how those layers are tested, and the fixture
instruction ("copy those two fields") left out the one detail that
decides whether the new fixture passes.
- **A table up front** names each project, what it tests and how, so a
contributor knows where a new test belongs before reading further.
- **Running the tests:** the whole suite, one class or one test with
`--filter`, and why to name the project: on the solution, every other
project reports `No test matches the given testcase filter`.
- **`Chartula.Core.Tests`:** the fixtures as before, now with a numbered
procedure and a command that copies `tag` and `facts` out of a record
byte for byte. Not `jq`, which writes the escaped characters as plain
ones and fails `FactBaseFixtureTests`. The stand-in models and the
prompt snapshots stay; the reason no test can reach a model is one
sentence and a link to `architecture.md`, not a repeated argument.
- **`Chartula.Infrastructure.Tests`:** real git in `TempGitRepository`,
GitHub answered by a stub handler that also records the requests,
writers in a temporary directory. A git configuration that rewrites
`[email protected]:` URLs fails `Reads_the_url_of_the_named_remote`; the
page says so, and how to run without it.
- **`Chartula.Cli.Tests`:** the three ways it tests and which question
each answers: the built binary as a process (`CliProcess`, GitHub
pointed at `https://127.0.0.1:1/`), the production client factory with
an `HttpMessageHandler` as transport (`CreateChatClient`,
`DoctorTransports`), and the report around a `StubPipeline`.
- **Found while verifying, filed as #315:** a fixture from a real
release whose descriptions hold a code block fails
`Text_that_only_repeats_the_facts_is_never_flagged`, because the
rule-based check looks for the one-line rendering in descriptions that
keep their line breaks. The same causes false flags in a run for a
quoted phrase the description wraps. The page names the limit and links
the issue.
- **The page is titled "Testing"** now; the links that called it "Test
fixtures" (README, CONTRIBUTING, `architecture.md`, ADR 0001, the
recipe) say "Testing", and the two that are about fixtures point to the
fixture section.

**Verified:**
- The fixture procedure, followed as written, on a run record of a
release without code blocks in its descriptions: the copied file is
byte-identical to the record's fields, and with its constant on
`FactBaseFixture` the Core suite passes (496 of 496). The same procedure
through `jq` fails
`Every_fixture_is_exactly_what_a_real_run_would_write`; on the record of
`v0.1.0-preview.3` it fails the echo test as #315 describes. The
experiment files are not part of this PR.
- Both `--filter` commands were run as written; on the solution, the
other projects print the message the page quotes.
- The URL rewrite failure was reproduced with `GIT_CONFIG_COUNT=1`,
`url.https://github.com/[email protected]:`.
- The full suite passes: Core 490, Infrastructure 79, Cli 374.
- Every relative link and anchor in all Markdown files of the repository
resolves (script, with a negative test).

Tests: none changed, documentation only.
goldbarth added a commit that referenced this pull request Oct 1, 2026
…cks and where messages are written (#321)

Follows #318, #319 and #320, after which every principle the page names
has a decision record to link.

- **Why:** `architecture.md` mixed product behavior (what `--no-publish`
writes, what a customer page holds, which outputs exist) with code,
argued its principles in place instead of pointing to their records,
named the pipeline steps but not the code path from `Program` to the
writers, and had no answer to "where is this message written?". Its
"Where things are" left out `Cli/Configuration`, `Cli/Commands`,
`Core/Pipeline`, `Core/Formatting` and the provider adapters in
`Cli/Composition`.
- **A run in code:** a diagram and a numbered walk from `Program.Main`
through `BuildConfiguration` and `BuildServices` to `ReleaseCommand` and
every step of `ReleasePipeline`, each with its port and adapter. Review
is shown as what it is today: it approves as is, because review mode is
refused until #249.
- **Principles, one sentence each with its ADR:** facts first and the
structure of a rendering (0001), one fact base for every audience stated
as what it gives and not as a guarantee of agreement (0001, as amended
in #318), the AOT-friendly dependencies (0002), endpoints from the
environment (0003), `IChatClient` in the domain (0004), refuse rather
than guess (0005). The page no longer argues any of them.
- **How the two checks work,** in code: what the rule-based check builds
and searches (with #315 named), what the thorough check sends and how it
keeps a pull request number, and how `CallValidity` treats a failed
rendering and a failed verdict differently.
- **Where user-facing messages are written:** a table from what the user
sees to the file that writes it, under the rule that a message is
written where its cause is known (ADR 0005).
- **Where things are** is complete for every folder of the three
projects and links the recipe.
- **The recipe** caught up with #294: step 3 is now "keep it in the run
record, and decide whether it is published" (`FactEntry` always,
`ChangelogChange` only for what may be published, `schemaVersion` 2 and
3); step 5 names the file `FactBaseFixtureTests` lives in and how it
compares; step 6 names the round-trip tests that exist
(`FactBaseRoundTripTests`), not the removed
`ChangelogJsonRoundTripTests`. Its terms (fact, fact base, fixture,
statement, haystack, run record, `schemaVersion`) are explained on first
use.
- **Three doc comments** (`GroundedFactsFactory`, `IReleaseRenderer`,
`ReleaseRenderer`) said the renderings "cannot contradict each other";
they now say what the shared fact base gives, as the glossary, ADR 0001
and the README do. `CHANGELOG.md` keeps the line, since it is committed
as Chartula wrote it.

**Verified:**
- Every step, type and file named was checked against the code: the
order in `Program.Main` and `ReleasePipeline.RunStepsAsync`, the ports
and their adapters, `RuleBasedFaithfulnessChecker`,
`ThoroughFaithfulnessChecker`, `CallValidity`, and the file each listed
message comes from (`git grep` on the message text).
- The recipe's step 3 against `FactEntry.cs`, `ChangelogDocument.cs` and
`ChangelogJsonSerializer.cs`; step 5 against `FixturePipelineTests.cs`;
step 6 against the test files that exist.
- `dotnet build` without warnings (doc comments only changed in code).
- Every relative link and anchor in all Markdown files of the repository
resolves (script, with a negative test).

Tests: none changed, documentation and doc comments only.
goldbarth added a commit that referenced this pull request Oct 7, 2026
Follows #344. Step 1 of `docs/development/releasing.md`.

- **Why now:** the launch points are merged, and the binary people
install is still `0.1.0-preview.3`, which has none of them. The
announcement needs a release that holds what the README and the docs on
`main` describe.
- **What ships since preview.3,** 63 commits:
- a first run: `chartula doctor` (#295, grouped in #341), `chartula
--version` (#286), a free `preview` (#292), progress while a run works
(#297, with a spinner and `--plain` in #340), a first tag from the first
commit with a confirmation for a large range (#282);
- what a release contains: commits without a pull request (#291), issue
numbers at every depth (#293), a sentence for a release with nothing for
developers (#307 in #333);
- checks and prompts: pull request text quoted and bounded (#338), no
false flag for a wrapped phrase or a fenced block (#336), flags set
apart from the entries (#331);
- publishing: the token checked before the first model call (#285), a
published release not replaced unless asked (#335);
- the files: `changelog.json` without descriptions and readable as text
(#294, #332).
- **Breaks to state in the notes,** as `docs/versioning.md` asks of a
preview:
- `changelog.json` is schema version 2: a change's `description` is gone
(#294). The run record is schema version 3 and holds the complete facts.
- `generate` stops on a tag whose release is already published;
`--replace-published` restores the old behaviour (#335).
- An option a command does not take stops the run (#301), and
`--whole-history` is gone (#282).
- The terminal output changed form (#340 to #342): the summary's first
line, audience headings in place of `--- Technical ---`, and `doctor`'s
last line. A script that reads those lines needs a look; exit codes and
the files are unchanged.
- The csproj `Version` is the single source; nothing else carries the
number.

**After merge:** tag the merge commit on `main` with `v0.1.0-preview.4`
and push it; `release.yml` builds the draft, `chartula generate --tag
v0.1.0-preview.4` writes the notes into it, and publishing runs
`install.yml`. The pinned `v0.1.0-preview.3` in `docs/ci.md` and
`docs/install.md`, and the template link in the `doctor` samples, move
to the new tag once the release exists, with the changelog pull request
of step 6.

**Verified:** the built CLI prints `chartula 0.1.0-preview.4+<commit>`.

Tests: no test changed. Full suite 1,010 passing, build without
warnings.
goldbarth added a commit that referenced this pull request Oct 8, 2026
…ber in the rule-based check (#357)

Closes #350

- **Why:** the rule-based check read numbers as text, with a pattern a
comma is not part of. Facts that say `8,000` were read as `8` and `000`,
so a rendering that wrote `8000` was flagged although the facts back it,
and a rendering that invented "8 retries" was not.
- **Fix:** the pattern reads a number with thousands separators as one
number, and both sides are compared without the commas: `8,000`,
`1,234,567` and `1,234.50` are `8000`, `1234567` and `1234.50`. The
comparison stays a lookup of text in a set; nothing is parsed into a
numeric type, so a version such as `10.0.1` compares as it did.
- **What counts as a separator:** a comma directly followed by exactly
three digits. `1, 2, 3`, `#294, #292` and `12,34` stay lists of separate
numbers.
- **One case that is read the other way now:** three-digit numbers
listed without a space, `100,200`, are one number. Text alone cannot
tell that from a hundred thousand, and prose puts the space; the comment
on the pattern says so.
- **The finding quotes the number as the rendering wrote it,**
`'9,000'`, so it can be found in the text.
- **Docs:** one sentence in `docs/costs-and-checks.md` for the reader of
a flag, one in `docs/development/architecture.md` next to the note on
#315.

**Reproduced first:** the tests below were written against the unchanged
checker, and 8 of them failed, among them the flag two runs on
`v0.1.0-preview.4` raised (facts `Cut at 8,000 characters`, rendering
`at 8000 characters`). Reproduced at the checker with the phrases of
those runs, not with a new model run.

Tests: `RuleBasedFaithfulnessCheckerTests` gain a theory of six pairs
written with and without separators, the two groups `8` and `000` that
are no longer supported, two lists, a version and a decimal, and an
absent number quoted as written. The fixture tests, where an echoing
model must never be flagged, pass unchanged. Full suite 1,043 passing,
build without warnings.
goldbarth added a commit that referenced this pull request Oct 8, 2026
…arkdown source (#360)

Closes #355

- **Why:** below each audience heading the summary printed the rendering
as it is stored: `### What needs action`, `**Breaking:**`, backticks and
links as Markdown source, and the customer description as a
`description:` line of a front matter the reader is not looking at. It
was the one part of the terminal output that still read as a file dumped
to the screen.
- **The form on a terminal:** a group is a bold heading without its
`###`, an entry is a bullet with a hanging indent, a label and
`Breaking:` are bold, code is coloured and loses its backticks, and a
link shows as its text, `(#294)`. The description stands above the
entries as the sentence it is on the page. Entries are broken between
words at the width of the window; a word longer than the room, such as a
URL, is not cut.
- **Two colours, the two roles of the Goldbarth ramp:** `Breaking:` is
what the system marks, in teal (#2DD4BF) and bold; code is what the
reader types, in amber-glow (#FFE6A3), the ramp's tone for highlights.
Not the identity amber (#E0A34B), which a warning's mark has. An earlier
state of this pull request had the marker in that amber, then both in
teal, where only the weight told them apart. With 256 colours each takes
the nearest of the cube (43, 223), with 16 cyan and bright yellow.
- **Built in, not handed to `glow` or a pager:** Chartula is one binary
that starts no program but `git`, and a viewer most machines do not have
would make the summary depend on what is installed. A rendering is put
together by `RenderingComposer`, so its structure is five constructs,
and `TerminalMarkdown` reads those and nothing else. It is not a
Markdown renderer and does not try to be: an `*aside*` a model writes, a
lone backtick or an unclosed `**` stay as written.
- **Links as their text** (the variant chosen in the issue's
discussion): the number says which pull request, and the URL is in
`CHANGELOG.md`.
- **Only a live terminal gets this form.** Redirected output, CI and
`--plain` keep the Markdown and the `description:` line exactly as
before, because there the text is copied or read by a program. So this
changes what #342 said about a terminal: the Markdown no longer copies
out of it as written; `docs/cli.md` says where to copy it from.
- **Without colour** (`NO_COLOR`) the layout is the same, nothing is
bold, and code keeps its backticks, since they are what still marks a
name. Without Unicode the bullet is a hyphen.
- **Each row is painted on its own,** so a colour never runs over a line
break into the indent, and no row reaches the last column.
- **The flags** below a rendering stay as #211 placed them.

**Verified:** the built CLI in a pseudo-terminal of 78 columns
(`script`, `COLORTERM=truecolor`), `generate --no-publish` against a
local stub for GitHub and the model. Bold is shown as `<b>`, the bold
teal of `Breaking:` as `<B!>`, the amber-glow of code as `<c>`:

```text
<b>Customer</>
  This release lets you choose where a release starts and keeps the filter
  you set when a page reloads.

  <b>What needs action</>
    • <B!>Breaking:</> You can now pass <c>--since <ref></> to <c>generate</>, so a first tag no
      longer renders the whole history of a repository that is years old.

  <b>What's New</>
    • <b>Release start:</> You can now pass <c>--since <ref></> to <c>generate</>, so a first
      tag no longer renders the whole history of a repository that is years
      old.
```

The widest row is 75 columns. The same run with `--plain` prints the
source as before.

Tests: `TerminalMarkdownTests`, new, hold the layout, the weights and
both colours at each colour depth and without colour, a link as its
text, what stays as written, code that contains link or bold syntax, the
hanging indent, a style across a line break, no row as wide as the
window from 30 to 120 columns, a long word, and a row left whole without
room or width. `ReleaseCommandOutputTests` gain the summary on a
terminal; its existing tests hold the plain form unchanged. Full suite
1,082 passing, build without warnings.
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 is meant to be published but carries every pull request description in full

1 participant