Repository navigation
Audit Tier B third pass: PublishedCake and PlacedOrder, no role-word type suffixes - #11
Merged
Merged
Conversation
…type suffixes B2 from docs/critter-stack-audit.md. Rename only; JSON shape, routes, and contract untouched. - The two HTTP response records were named like events (CakePublished, OrderPlaced) while being neither events nor messages. The repo has no events (state-stored by design) and one message, the command NotifyBaker. Renamed to noun phrases, PublishedCake and PlacedOrder, so (PlacedOrder, NotifyBaker) reads as response-plus-command at a glance. - Standing rule added to CLAUDE.md: never suffix a type with a role word such as Response, Request, Event, or Message when it can be avoided; name the type for what it is. The JasperFx sample style (TodoCreationResponse) was considered and declined. - README code excerpt and build log updated. Suffix scan: after twin clean except BakerTaskItem (flagged, not changed); before twin's Command/Query/ Dto/Request names are the Clean Architecture exhibit and stay. Build 0 warnings. Contract suite 54/54, unit tests 15/15. Line counts unchanged (after twin 695 raw / 574 non-blank).
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
B2 from
docs/critter-stack-audit.md. A rename only: JSON shape, routes, and the contract are untouched, and the contract suite never names these types. Remaining open items after this: B6, B7, B8, B10, B11 (all recommended as accepted divergences).Changes
B2. HTTP response records are noun phrases.
CakePublishedis nowPublishedCakeandOrderPlacedis nowPlacedOrder. Both were named like events while being neither events nor messages: the repo has no events at all (state-stored by design) and exactly one message, the commandNotifyBaker. With the rename,(PlacedOrder, NotifyBaker)inPlaceOrderEndpoint.Postreads as response-plus-command at a glance, and past tense stays reserved for events.Standing naming rule, now in CLAUDE.md. Never suffix a type with a role word such as
Response,Request,Event, orMessagewhen it can be avoided; name the type for what it is. The JasperFx sample style (TodoCreationResponse) was considered and declined for this repo.Suffix scan of the solution. After twin clean except
BakerTaskIteminGetBakerTasks.cs(flagged in the build log, not changed). The before twin'sCommand/Query/Dto/Requestnames are the Clean Architecture exhibit and stay by non-negotiable 1. The contract suite's private...Item/...Enveloperecords are test-local deserialization shapes.Bookkeeping. README code excerpt updated, build-log entry added, audit doc marks B2 done. Line counts unchanged (after twin 695 raw / 574 non-blank).
Verification
dotnet build: 0 warnings, 0 errorsdotnet test: contract suite 54 passed, unit tests 15 passed, 0 failedgrepforCakePublished/OrderPlacedoutside history: none