Skip to content

ci: publish GenDoc's own error catalog on every push to main#166

Open
Reefact wants to merge 1 commit into
mainfrom
claude/publish-gendoc-catalog
Open

ci: publish GenDoc's own error catalog on every push to main#166
Reefact wants to merge 1 commit into
mainfrom
claude/publish-gendoc-catalog

Conversation

@Reefact

@Reefact Reefact commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Wire the CI/CD generation angle that #142 called for but the merged PR #163 only proved with a transient grep check: doc/generated/gendoc/ (created by #164/#165 as the living-documentation target for "the error catalog emitted by the GenDoc toolchain") now gets actually populated — the .NET 8 floor job regenerates it as Markdown from FirstClassErrors.GenDoc.dll on every push to main, and commits it directly when it changed.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Analyzer / diagnostic change
  • Tests
  • Documentation
  • Build / CI / tooling

Changes

  • Add a step to the floor job in .github/workflows/ci.yml, gated on github.event_name == 'push' && github.ref == 'refs/heads/main' (never a pull request), that runs fce generate --assemblies .../FirstClassErrors.GenDoc.dll --format markdown --layout single --service-name gendoc --output doc/generated/gendoc, reusing the build already done earlier in the same job.
  • If the rendered catalog changed, commit it with the github-actions[bot] identity and push directly to main — no PR, unlike the changelog-draft workflow, because the content is a deterministic rendering of a catalog GenDoc already documents about itself: there is nothing model-inferred to curate, only source truth to reflect.
  • Widen the job's permissions to contents: write (only this job; everything else in the workflow stays read-only).
  • doc/generated/gendoc/ starts this PR still holding only its .gitkeep placeholder — the first real content lands from the first post-merge run on main, so the automation proves itself rather than being seeded by hand.

Testing

  • dotnet build FirstClassErrors.sln
  • dotnet test FirstClassErrors.sln
  • Analyzer tests pass (FirstClassErrors.Analyzers.UnitTests)

Not run: this PR touches only .github/workflows/ci.yml, no source. Verified instead: the workflow YAML parses; the exact fce generate invocation was run locally (Release build of FirstClassErrors.Cli) against a scratch output directory and produced a well-formed single-file Markdown catalog (table of contents, business rules, diagnostics, RFC 9457 examples) for all 16 GENDOC_* codes — content deleted afterward, not committed, per the point above. The if: gate means this PR's own CI run exercises every step except the final commit (a push event, not a pull request), so the publish step's condition is the only part untested by this PR's own checks; the real proof is the first push to main after merge.

Documentation

  • Public API / error documentation updated
  • README / doc/ updated
  • French translation updated if user-facing behavior changed
  • No documentation change required

doc/generated/README.md already describes gendoc/ as CI/CD-produced living documentation; this PR only makes that true, without changing the description.

Architecture decisions

  • No architectural decision in this pull request

Checked against the ADR base: this operationalizes the doc/generated/ convention #164/#165 already established (no new decision), and is consistent with ADR-0009 (GenDoc documents its own errors) and ADR-0002 (net8.0 floor tooling — this reuses the floor job's existing build, no new target framework).

Related issues

Refs #142

🤖 Generated with Claude Code

https://claude.ai/code/session_0148FgVG3MkKn2kudM2TkmGa


Generated by Claude Code

Regenerate FirstClassErrors.GenDoc's error catalog as Markdown into
doc/generated/gendoc on every push to main, and commit it directly
with the github-actions[bot] identity when it changed.

No PR review step, unlike the changelog draft: the content is a
deterministic rendering of the catalog GenDoc already documents about
itself, with nothing inferred to curate. Restricted to push events on
main (never pull requests), reusing the .NET 8 floor job's existing
build of fce and FirstClassErrors.GenDoc.dll.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0148FgVG3MkKn2kudM2TkmGa
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.

2 participants