docs: make the operational settings discoverable and the handbook true - #90
Merged
Conversation
Two gaps left by the security and operability work, both of the same kind: the behaviour changed and nothing outside the code said so. The settings were invisible. Throttling budgets, the reservation sweep window and TrustForwardedFor existed only as C# defaults, so nobody deploying this could discover they were tunable at all. That made the load-bearing one a trap: the app warns when TrustForwardedFor is wrong for its traffic, but there was nothing in configuration to set right. appsettings.json now carries both sections with the values written out. Writing them down costs a second source of truth, so ShippedConfigurationTests guards it: the file and the code defaults are asserted equal in both directions, and a fourth test pins that the sweep window stays longer than the interval that looks for it - a window shorter than its own sweep leaves orders expired but unreleased for most of their life. Change one side without the other and the build fails rather than the file quietly starting to lie. The handbook did not know what the application does. Zero mentions of health/ready, correlation ids, TrustForwardedFor or the sweep. On a project whose handbook is a large part of what it is for, that drift undoes the work: a reader reads the handbook, not the diff. Configuration chapter gains a section on throttling, built around the setting that can cause an outage - what each direction of getting it wrong does, a table of which deployments need which value, and the fact that the warning it logs is not advisory - and a section on the sweep explaining ExpireAfterMinutes as a trade rather than a knob. Runbook gains the two probes with a table of which to point at what, and why merging them would cost roughly 180 CU-hrs against a 100 CU-hr budget; plus how to trace a customer's failure report through a correlation id. Bugs table gains the six defects from this round, including the three the tooling found rather than the author, and the lessons list gains four: let the row arbitrate rather than the handler, write what you mean rather than the whole row, read the reasoning before changing the code, and the gates catch what the author cannot. README and the setup guide list both endpoints, and the troubleshooting note now says which one keeps checking. 518 backend tests pass; build clean under -warnaserror; dotnet format clean. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EA4mmpcb1rcvNntHR1iG6j
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.
Two gaps left by the security and operability work, both the same kind: the behaviour changed and nothing outside the code said so.
The settings were invisible
Throttling budgets, the reservation sweep window, and
TrustForwardedForexisted only as C# defaults. Nobody deploying this could discover they were tunable at all — which made the load-bearing one a trap: the app warns whenTrustForwardedForis wrong for its traffic, but there was nothing in configuration to set right.appsettings.jsonnow carries both sections with the values written out.Writing them down costs a second source of truth, so
ShippedConfigurationTestsguards it — the file and the code defaults are asserted equal in both directions. A fourth test pins that the sweep window stays longer than the interval that looks for it; a window shorter than its own sweep leaves orders expired but unreleased for most of their life. Change one side without the other and the build fails rather than the file quietly starting to lie.The handbook didn't know what the app does
Zero mentions of
health/ready, correlation ids,TrustForwardedFor, or the sweep. On a project whose handbook is a large part of what it's for, that drift undoes the work — a reader reads the handbook, not the diff.ExpireAfterMinutesexplained as a trade, not a knobThe four new lessons: let the row arbitrate, not the handler · write what you mean, not the whole row · read the reasoning before changing the code · the gates catch what the author cannot.
Drift, measured
health/readyTrustForwardedForVerification
-warnaserror;dotnet format --verify-no-changescleanGenerated by Claude Code