Repository navigation
test: keep placeholder content in the content package's shape - #1561
Closed
BenjaminMichaelis wants to merge 6 commits into
Closed
BenjaminMichaelis wants to merge 6 commits into
BenjaminMichaelis wants to merge 6 commits into
Conversation
…in CI The 19570 content package writes sitemap.descriptions.json entries with a singular "Key" while the shared SiteMappingDescription type requires "Keys", so ChapterDescriptionService throws and every page 500s (dev outage). - ChapterDescriptionService reads both shapes and reports malformed entries with the file and entry index. - Resolve ChapterDescriptionService and IGuidelinesService at startup so bad content fails the new revision instead of the first page request. - Add a placeholder sitemap.descriptions.json in the package's shape so PR CI exercises the real code path; make chapter metadata tests content-agnostic. - Add ContentPackageContractTests (structural assertions only). - build-and-test restores/builds against the real content package; feed credentials exist only during restore. - Add scripts/smoke-test.sh (health + real pages) and run it after the dev deploy and in the prod deploy.
…hape
PlaceholderShapeTests compares property names and value kinds of
Placeholders/{sitemap,sitemap.descriptions,guidelines}.json against the
content files the build uses. It passes trivially on PR builds (content is
the placeholders) and runs for real in build-and-test on main, where the
content package is restored. Failures report only property names/kinds.
The check immediately found drift: the placeholder sitemap.json lacked
PrimaryKey and LastModified, which the package has. Add them.
3 of 4 tasks
BenjaminMichaelis
added a commit
that referenced
this pull request
Oct 24, 2026
## Summary - Bumps `ToolingPackagesVersion` 1.1.1.19570 -> 1.1.1.19573. - 19570's content package shipped `sitemap.descriptions.json` with the old single-string `"Key"` format, which `SiteMappingDescription` (used by `ChapterDescriptionService` since #1560) cannot deserialize, so dev returned 500. 19573 is built from IntelliTect-dev/EssentialCSharp.Tooling#2606, which converts the file to the `Keys` array format and adds a tooling test that reads the real file. ## Test plan - [x] `dotnet build EssentialCSharp.Web.slnx` - [x] `EssentialCSharp.Web.Tests`: 190 passed - [x] At the tooling commit 19573 was built from (1f77290e), `sitemap.descriptions.json` has 589 `"Keys"` entries and no `"Key"` entries - [ ] Not checked locally: the restored ContentFeedNuget package contents. Please confirm dev serves pages after deploy. Related: #1561 (Key/Keys compatibility and CI check against the real package content) is still open and no longer needed to fix dev once this is deployed.
This reverts commit 2b20328.
BenjaminMichaelis
added a commit
that referenced
this pull request
Nov 11, 2026
## Summary - Upgrade gh-aw dispatcher templates and action pins to v1.2.2. - Regenerate accessibility-review, ci-doctor, and repo-assist workflow locks. - Update accessibility-review setup-dotnet to v6.1.0. ## Validation All three workflows compiled successfully with gh-aw v1.2.2. Shellcheck completed with the existing unused-loop-variable warning; accessibility-review still reports its existing missing discussions permission warning. Container pin refresh reported a registry metadata lookup failure. No live Actions runs were dispatched. ## Scope This PR contains only the gh-aw upgrade extracted from #1561; the upgrade was reverted on that PR. Unrelated local UI edits are not included.
1 of 2 tasks
Member
Author
|
Closing in favor of #1734, which carries the startup content check rebased onto current main. The Key/Keys compatibility code is no longer needed (tooling ships Keys since #1562), and the smoke-test script is redundant with the Playwright Deployed smoke tests now on main. The NuGet-credential CI changes can be proposed separately if wanted. |
2 of 3 tasks
BenjaminMichaelis
added a commit
that referenced
this pull request
Nov 28, 2026
## Why The dev outage came from `sitemap.descriptions.json` changing shape (`Key` vs `Keys`), and the placeholders that PR builds use did not model that file at all, so CI could not notice. ## What changed - Add `Placeholders/sitemap.descriptions.json` in the shape the content package now ships (`Keys` + `Value`, matching `SiteMappingDescription`) and copy it into `Chapters/` for placeholder builds. - Bring `Placeholders/sitemap.json` in line with `SiteMapping` (`PrimaryKey`, `LastModified`). - Add `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`/`Keys` reader fallback (tooling ships `Keys`), the smoke-test script (main runs the Playwright `Deployed` smoke tests), and a real-package restore in CI, which should be reviewed on its own. Until that exists, `PlaceholderShapeTests` compares the placeholders with themselves in CI. ## Test plan - [x] `EssentialCSharp.Web.Tests`: 351 passed; 2 failures (`CaptchaService_Verify_Success`, `KnownBreachedPassword_IsDetected`) call external services and are unrelated. - [x] `Parser.Shared.dll` from package 19663 declares `SiteMappingDescription { Keys, Value }` and `SiteMapping` with `PrimaryKey` and `LastModified`, matching the placeholders. - [ ] Not run against the real content files (no feed credentials available).
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) while the placeholders 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.Narrowed from the original PR
Key/Keysreader fallback is dropped: tooling now shipsKeys.Deployedsmoke tests.PlaceholderShapeTestscompares the placeholders with themselves in CI and only does real work locally or in a build that restores the package.Test plan
EssentialCSharp.Web.Tests: 351 passed; the 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.