docs: the V10 registration examples now compile - #136
Merged
Conversation
Task 6.7 measured that `AddBrighter().AddProducers(...).AddConsumers(...)` is CS1929 — `AddConsumers` extends IServiceCollection and AddProducers extends the IBrighterBuilder it returns, so the consumer registration comes first. Eleven blocks across six pages had the chain, and so did CLAUDE.md's own "V10 — current" example, which is where a writer would go to copy it. `DistributedLock.md` matched the same grep and is correct: its chain is rooted at AddSingleton, which returns IServiceCollection. The leading dot is not the defect; the receiver is. The blocks carrying the chain carried four more invented APIs, each of which stops a reader's build: `options.ChannelFactory` for `DefaultChannelFactory` (13), `options.Inbox` for `InboxConfiguration` (6), `InboxConfiguration.NoActionOnExists` for `actionOnExists: OnceOnlyAction.Warn` (5), a one-argument `InMemoryChannelFactory` (2), and `.AutoFromAssemblies().AddHostedService<>()` (2). V10MigrationGuide.md's rename table now names the two property changes it was silent about. Four representative corrected shapes were compiled against the pinned packages: 0 errors, 0 warnings. Nine blocks were pulled into `--changed` scope by one-word edits; four gained real `using` directives and five declared `// ...`, so the debt goes 787 -> 783. One of the five was truncated mid-lambda and is now closed. Gates unmoved otherwise: link 156, pagelint 0 errors across 154 pages, shape 153, redirects 77/7858, versioncheck 0 stale of 18, optioncheck 0 across 37 tables and 427 rows. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0146UueHL6H3zGBGTYwz7GtL
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.
Phase 6's compile obligation (task 6.7) measured a defect that is not on any page phase 6 wrote. This is the repair, authorised as its own unit.
The chain
services.AddBrighter().AddProducers(…).AddConsumers(…)does not compile.AddConsumersextendsIServiceCollection;AddProducers,Handlers,UseSchedulerandAutoFromAssembliesextend theIBrighterBuilderit returns. ChainingAddConsumersoff the builder isCS1929— measured in a project against the pinned 10.7.0 packages, with a control: deleting that one line from the same file builds clean.So the consumer registration comes first, and everything else chains off it. That is the shape Brighter's own samples use (
samples/CommandProcessor/HelloWorldInternalBus/Program.cs), andAddBrighterremains the entry point when there are no consumers.Eleven blocks across six pages carried the chain, and so did
CLAUDE.md's own ✅ V10 — current example — the one place a writer goes to copy the modern form.DistributedLock.mdmatched the same grep and is correct. Its chain is rooted atservices.AddSingleton<IAmazonDynamoDB>(…), which returnsIServiceCollection, so.AddConsumers(…).AddProducers(…).UseOutboxSweeper(…)is legal. A leading-dot.AddConsumers(is not the defect; the receiver is. The tutorials are clean for the same reason — they writebuilder.Services.AddConsumers(…), which is why 009's compile-and-run pass never met this.What the repair found once it started
The chain was the entry point, not the extent. The blocks it lives in carried four more invented APIs, each of which stops a reader's build:
options.ChannelFactoryDefaultChannelFactoryoptions.InboxInboxConfigurationInboxConfiguration.NoActionOnExistsactionOnExists: OnceOnlyAction.Warn, and the second positional parameter is anInboxScopenew InMemoryChannelFactory(bus)(InternalBus, TimeProvider, …).AutoFromAssemblies().AddHostedService<…>()AddHostedServiceextendsIServiceCollection, not the builderPlus one local to
InMemoryOptions.md: two helpers declared their bus parameterIAmABusand passed it whereInternalBusis required.V10MigrationGuide.md's rename table now names the two property changes it was silent about, and its After (V10) block no longer shows the sameoptions.ChannelFactoryas its Before (V9) block.Verification
Four representative corrected shapes were compiled, not reviewed — consumer-only, consumers-then-producers, the inbox configuration, and consumers-then-
Handlers— against the same packagesoptioncheckpins: 0 errors, 0 warnings.The using-directive debt goes 787 → 783. Nine blocks were pulled into
--changedscope by edits of one word; four earned realusingdirectives and five declared// ..., which downgrades and still counts. One of the five was truncated —AzureServiceBusConfiguration.md's consumer example ended mid-lambda with an unbalanced brace — and is now closed.Full record in
spec/012-configuration_reference/tasks.mdunder Phase 6 as executed.🤖 Generated with Claude Code
https://claude.ai/code/session_0146UueHL6H3zGBGTYwz7GtL