ci(gendoc): regenerate the catalog on PRs, gate breaking changes at release#166
Merged
Conversation
Add a dedicated workflow that builds fce and FirstClassErrors.GenDoc on every push to a pull-request branch, regenerates the human-readable catalog (Markdown, split layout) into doc/generated/gendoc/catalog, and reports the pending change against a committed baseline (errors-baseline.json) into errors-diff.md -- informational only, this workflow never blocks a pull request. Both are committed back onto the pull request's own branch, never main, so the regenerated content goes through normal review and merges like any other change. Bootstrap the initial baseline and catalog: as of this commit neither existed, so 'fce catalog update' explicitly accepts the current 16-error surface as the starting contract. Refs: #142 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0148FgVG3MkKn2kudM2TkmGa
GenDoc ships bundled inside the fce tool, not as its own package, so a breaking change to its error catalog is a breaking change of the cli train. Before packing, compare the catalog against the committed baseline with 'fce catalog diff --fail-on breaking': if it reports a breaking change, require the version being published to bump the major component over the previous cli-v tag, or fail the release. Runs on a dry run too, catching a missed bump before a real attempt. After a successful (non-dry-run) cli publish, 'fce catalog update' accepts the released catalog as the new baseline and pushes it directly to main -- the one direct-to-main write in this pipeline, justified because it only ever follows a deliberate, already-published release, never an ordinary pull request. Refs: #142 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0148FgVG3MkKn2kudM2TkmGa
Reefact
force-pushed
the
claude/publish-gendoc-catalog
branch
from
July 17, 2026 09:39
2f50a98 to
bbaad05
Compare
Add ADR-0010: a breaking change to GenDoc's own error catalog requires a major version bump of the cli train, enforced at release time. Accept it, and accept ADR-0009 (GenDoc modeling its own failures as first-class errors) alongside it, since the two decisions ship together. Refs: #167 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0148FgVG3MkKn2kudM2TkmGa
Reefact
enabled auto-merge
July 17, 2026 10:00
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.
Summary
Wire the CI/CD generation angle #142 called for, using
doc/generated/gendoc/(created by #164/#165 as the living-documentation target). Two closed-loop pieces:main) — the regenerated content goes through normal review, exactly like any other change.release.ymlgates theclitrain release (GenDoc has no package of its own — it ships bundled insidefce): a breaking change to GenDoc's error catalog must be matched by a major version bump, or the release is refused. After a successful publish, the baseline is accepted and pushed tomain— the one direct-to-main write in this design, and only ever after a deliberate, already-published release.Type of change
Changes
.github/workflows/gendoc-docs.yml: onpull_request(same-repo only — a fork PR gets a read-only token by GitHub's own default), buildsfce+FirstClassErrors.GenDoc, regeneratesdoc/generated/gendoc/catalog/(Markdown, split layout — wiped first so a removed error's page never lingers), runsfce catalog diff --report markdown --fail-on noneagainst a committed baseline intodoc/generated/gendoc/errors-diff.md(informational only, never blocks the PR), and commits both to the PR's own branch when changed.doc/generated/gendoc/errors-baseline.jsonand the initial catalog/diff content — neither existed before this PR, sofce catalog updateexplicitly accepts the current 16-error surface as the starting contract. Remove the now-redundant.gitkeep.doc/generated/README.mdto describe the newgendoc/sub-structure (catalog/,errors-baseline.json,errors-diff.md).release.yml,clitrain only, beforePack: runfce catalog diff --fail-on breakingagainst the baseline; if breaking (exit2) and the new tag's major component does not exceed the previouscli-vtag's, fail the release with a clear message. Runs on dry runs too. After a successful non-dry-runclipublish:fce catalog updaterefreshes the baseline and pushes it tomain, best-effort (a push race degrades to a::warning::, never fails an already-successful release).Testing
dotnet build FirstClassErrors.slndotnet test FirstClassErrors.slnFirstClassErrors.Analyzers.UnitTests)No source changed, so the suite is unaffected; ran a full solution build (
-warnaserror, 0 warnings) as a sanity check. Verified for real: builtfce+FirstClassErrors.GenDoclocally and ran the exact commands used by both workflows —fce generate --layout split(19 files, verified content),fce catalog update(baseline created, 16 errors),fce catalog diff --fail-on none(correctly reports "No catalog changes" against the fresh baseline). Validated the release-gate's version-comparison shell logic standalone against 6 scenarios (no breaking change; breaking + major bump; breaking + no major bump correctly failing; breaking on a train's first release; breaking + major bump with a pre-release suffix; an unexpectedfceexit code correctly failing loud) — all matched the intended behavior. Confirmedfce catalog diff --fail-on breakingreally returns exit code2on a simulated breaking change (a removed code) against a scratch baseline copy — no repository file touched by that check.Documentation
doc/updateddoc/generated/README.md's existing bullet forgendoc/is extended, not rewritten; ADR-0010 is added in EN + FR;doc/handwritten/for-users/CatalogVersioning*.mdalready documents the underlyingfce catalogcommands this reuses verbatim, no new CLI behavior to document.Architecture decisions
Proposedin Model GenDoc's own failures as documented first-class errors #163) which this work completes.Related issues
Closes #167
Refs #142
🤖 Generated with Claude Code
https://claude.ai/code/session_0148FgVG3MkKn2kudM2TkmGa