Repository navigation
test: keep placeholder content in the content package's shape - #1737
Merged
BenjaminMichaelis merged 2 commits intoNov 28, 2026
Merged
Conversation
Add the sitemap.descriptions.json placeholder (Keys/Value, matching SiteMappingDescription), bring the sitemap.json placeholder in line with SiteMapping (PrimaryKey, LastModified), and add a test that compares each placeholder's JSON shape with the content files the app loads. Built against the real content package the test fails when the package changes shape; without it the placeholders are compared with themselves.
BenjaminMichaelis
deleted the
fix/chapter-descriptions-schema-and-content-checks
branch
November 28, 2026 21:41
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.
Why
The dev outage came from
sitemap.descriptions.jsonchanging shape (KeyvsKeys), and the placeholders that PR builds use did not model that file at all, so CI could not notice.What changed
Placeholders/sitemap.descriptions.jsonin the shape the content package now ships (Keys+Value, matchingSiteMappingDescription) and copy it intoChapters/for placeholder builds.Placeholders/sitemap.jsonin line withSiteMapping(PrimaryKey,LastModified).PlaceholderShapeTests, which compares each placeholder's JSON property names and value kinds with the content files the app loads. Built against the real content package (-p:AccessToNugetFeed=true) it fails when the package changes shape; failures print property names only, so no book content reaches a public log.Relation to earlier work
This is the remaining part of #1561, which was closed in favour of #1734 (startup check). Not included: the
Key/Keysreader fallback (tooling shipsKeys), the smoke-test script (main runs the PlaywrightDeployedsmoke tests), and a real-package restore in CI, which should be reviewed on its own. Until that exists,PlaceholderShapeTestscompares the placeholders with themselves in CI.Test plan
EssentialCSharp.Web.Tests: 351 passed; 2 failures (CaptchaService_Verify_Success,KnownBreachedPassword_IsDetected) call external services and are unrelated.Parser.Shared.dllfrom package 19663 declaresSiteMappingDescription { Keys, Value }andSiteMappingwithPrimaryKeyandLastModified, matching the placeholders.