Public and Internal Docs Consumer Fixture
Source of truth
ForgeTrust.AppSurface.Docs.ConsumerFixture is the executable reference host for named Docs composition. It keeps the
legacy /docs fixture path for existing browser-layout checks and exposes a separate named mode for the public/internal
proof.
The named mode is deliberately small and mirrors the copyable composition contract:
publicreads the fixture's public source root at/docswith theAppSurfaceDarkpreset.internalreads a disjoint contributor source root at/internal/docswith theGraphiteDarkpreset.- The host owns the
ConsumerFixtureInternalDocspolicy. A non-blankX-Consumer-Fixture-Userrequest header is the fixture-only authentication mechanism used to demonstrate the order ofUseAuthentication,UseAuthorization, instance mapping, and finalization. It is not a production authentication recommendation.
Run the proof
From the repository root, run the real Kestrel-hosted integration test:
dotnet test Web/ForgeTrust.RazorWire.IntegrationTests/ForgeTrust.RazorWire.IntegrationTests.csproj \
--filter FullyQualifiedName~AppSurfaceDocsMultiInstanceConsumerFixtureTests
The walkthrough starts the actual WebStartup consumer host, waits for both isolated search indexes, and proves this
sequence over HTTP:
- Anonymous
GET /docsreturns the public surface and never includes contributor identity or corpus markers. - Anonymous
GET /internal/docsreceives an authentication challenge before a Docs view is rendered. X-Consumer-Fixture-User: contributor-aliceunlocksGET /internal/docs, which renders the contributor identity and graphite theme without public markers.- The public and contributor search-index payloads contain only their own fixture marker.
The test records the measured elapsed time in its test output and fails if the complete fixture walkthrough exceeds five
minutes. Because it is an existing WebStartup consumer host with real routing, middleware, MVC, and Kestrel, that
five-minute gate also remains within the ten-minute existing-host integration target.
Adapt the shape
Use the multiple independent Docs products guide for the production API and host-authorization responsibilities. Replace the fixture header handler with your real authentication scheme and keep source roots, route families, and branding prefixes disjoint.