Skip to content

docs: a walkthrough of one orders service, run by CI from the packages - #141

Merged
CaffeinatedCoder merged 6 commits into
release/2.3.0from
docs/walkthrough
Oct 29, 2026
Merged

CaffeinatedCoder merged 6 commits into
release/2.3.0from
docs/walkthrough

Conversation

@CaffeinatedCoder

@CaffeinatedCoder CaffeinatedCoder commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Closes #116

Problem

Each guide covers one boundary, and none shows one value object crossing all of them in a single application, or says where it changes on the way through. The smoke test's host consumer puts EF Core and OpenAPI together, but it is a check, not something a reader can follow, and a walkthrough written as prose alone would go stale.

Change

  • docs/walkthrough.md, in the plain-docs voice: one orders service from request to response (value objects declared, stored, bound from route, query and body, rejected as problem details, an Option as a 404, a query on .Value, a Patch<T>, the e-mail address masked in the log, the OpenAPI document), each step saying what changes there or that nothing does. Linked from the root README's Documentation table and from docs/value-objects.md. Since docs: publish the guides, the READMEs and the API to GitHub Pages with DocFX #138 merged, site/toc.yml lists it first among the guides, as the README table does, and site/docfx.json takes the sample's sources as resources, so DocFX checks the page's links to them and rewrites them to GitHub (dotnet docfx site/docfx.json --warningsAsErrors reports 0 warnings; without the resources, 5 InvalidFileLink).
  • The sample application is the smoke test's fifth consumer, tools/ConsumerSmokeTest/Consumers/walkthrough/: Orders.cs (domain, entity, patch), OrderEndpoints.cs (the minimal API), Tour.cs (the requests), Program.cs (the host: Generators, EF Core on SQLite in memory, ASP.NET Core, Serilog with the console sink). Every C# block of the page is one of its regions.
  • The smoke test (Walkthrough() in tools/ConsumerSmokeTest/Program.cs) builds it as a web project outside the repository against the packed packages, runs it, and asserts on every answer it prints, the log line, the SQL EF Core logs and the OpenAPI document, each read from the page's comments by tools/ConsumerSmokeTest/WalkthroughPage.cs. … in a comment stands for an id or a trace id. --only <consumer> runs one consumer locally; CI runs all five.
  • WalkthroughTests (test/CodoMetis.TypeKit.Samples) compiles the same sources and the same page reader, runs the service in memory on the test server, and checks the same statements, so the walkthrough runs on every PR's Linux leg (it is in the prose suite too) and the page's claims have a test class to name. The packed run is in the pack lane, which every change to the consumer's sources selects; a stated answer is a comment in a compiled block, so changing one changes a source too.
  • ReadmeSampleTests: a page can name its own sources (ReadmeSamples.RegionSources); walkthrough/{name} regions are found in the walkthrough consumer, under the same exactly-one-region rule, and a region must live in its page's sources (A_sample_lives_in_the_sources_of_its_page).
  • docs-query finds the walkthrough's regions too (Corpus.PageSources), or its claims read "no region".
  • Claims W01–W12 in test/oracles/claims.json, held by WalkthroughTests; docs/walkthrough.md joins the promise documents, and the TypeKitSerilogExtensions.WithTypeKit waiver goes, since W01 and W05 now claim it.
  • CHANGELOG line under 2.3.0; design/native-aot.md no longer says no smoke consumer calls AsText().

Tests

  • WalkthroughTests, ReadmeSampleTests, the oracle catalogue tests and the full suite pass locally; consumer-smoke-test.dll --only walkthrough passes against a freshly packed feed.
  • Seeded and caught (both reverted by the inverse edit):
    • An excerpt edited in the page alone (value > 0 to value >= 0 in the Quantity block of docs/walkthrough.md): ReadmeSampleTests fails twice, the block is compiled by no region and walkthrough/values is shown nowhere.
    • An answer changed in the sample without the page's comment (the mask *** to ** in Email.ToString(), in Orders.cs and in the page's code, so the excerpts still match): ReadmeSampleTests passes, WalkthroughTests fails on the log line, and consumer-smoke-test.dll --only walkthrough exits 1 with FAIL: the log line is what the page states.

🤖 Generated with Claude Code

docs/walkthrough.md follows one minimal-API orders service from request to
response and says what changes at each boundary. The service is the smoke
test's fifth consumer, walkthrough: built outside the repository against the
packed Generators, EF Core, ASP.NET Core and Serilog packages, on SQLite in
memory. Its answers, its log line, the SQL EF Core logs and the OpenAPI
document are checked against the page's comments, read by WalkthroughPage.

WalkthroughTests compiles the same sources and runs the service in memory,
so it runs on every pull request's test leg and holds the page's claims
(W01-W12). ReadmeSampleTests and docs-query find walkthrough/ regions in the
consumer's sources, and a region must live in its page's sources.

Seeded: an excerpt edited in the page alone fails ReadmeSampleTests; the
mask changed in the code but not in the comment fails WalkthroughTests and
the smoke test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CaffeinatedCoder CaffeinatedCoder added this to the 2.3.0 milestone Oct 29, 2026
@CaffeinatedCoder CaffeinatedCoder added documentation Improvements or additions to documentation package/core Affects CodoMetis.TypeKit package/generators Affects CodoMetis.TypeKit.Generators package/efcore Affects CodoMetis.TypeKit.EntityFrameworkCore package/aspnetcore Affects CodoMetis.TypeKit.AspNetCore package/serilog Affects CodoMetis.TypeKit.Serilog area/option-result Option, Result and their extensions area/value-objects Value-object contracts and what the aspects generate for them area/json System.Text.Json wire forms, values and dictionary keys area/tooling The repository's tools: prober, verdict, guard, docs-query, smoke test labels Oct 29, 2026
CaffeinatedCoder and others added 4 commits October 29, 2026 14:43
…odoMetis.TypeKit into docs/walkthrough

# Conflicts:
#	test/oracles/claims.json
… sample

site/toc.yml lists the walkthrough first among the guides, as the README's
Documentation table does (DocsSiteTests). The sample's sources join the
site's resources, so DocFX checks the page's links to them and the template
rewrites them to GitHub: without them the build reported five
InvalidFileLink warnings, with them none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…odoMetis.TypeKit into docs/walkthrough

# Conflicts:
#	test/oracles/claims.json
#	test/oracles/surface-waivers.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/json System.Text.Json wire forms, values and dictionary keys area/option-result Option, Result and their extensions area/tooling The repository's tools: prober, verdict, guard, docs-query, smoke test area/value-objects Value-object contracts and what the aspects generate for them documentation Improvements or additions to documentation package/aspnetcore Affects CodoMetis.TypeKit.AspNetCore package/core Affects CodoMetis.TypeKit package/efcore Affects CodoMetis.TypeKit.EntityFrameworkCore package/generators Affects CodoMetis.TypeKit.Generators package/serilog Affects CodoMetis.TypeKit.Serilog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant