Skip to content

Add hybrid API docs with on-demand rendering - #1874

Closed
David Pine (IEvangelist) wants to merge 31 commits into
release/17.0from
ievangelist-hybrid-api-rendering
Closed

David Pine (IEvangelist) wants to merge 31 commits into
release/17.0from
ievangelist-hybrid-api-rendering

Conversation

@IEvangelist

@IEvangelist David Pine (IEvangelist) commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Summary

Add the hybrid Astro/Starlight architecture as the default site build. Non-API documentation, API landing pages, search indexes, sitemaps, browser assets, and other static routes remain prerendered, while C# and TypeScript API detail HTML and Markdown render on demand through two private Astro/Node renderers behind StaticHost.

The incremental-build implementation previously added to this branch has been reverted. There is no ASPIRE_INCREMENTAL_BUILD, incremental cache, OG build cache, incremental script, Astro incremental experiment, or incremental dependency/patch change in this PR.

Runtime and build behavior

  • Ordinary production frontend builds write dist-hybrid; the old ASPIRE_HYBRID_API_DOCS opt-in is retired.
  • StaticHost remains the public entry point and forwards dynamic API requests to the private renderers.
  • AppHost run mode keeps the Vite hot-reload development loop. Publish mode always packages the hybrid client and manifest and configures both renderer sidecars.
  • StaticHost publishing fails clearly when the hybrid manifest or client entry point is missing. Development may omit the artifact only when AppHost explicitly routes the website through Vite.
  • Existing API aliases, canonical redirects, Markdown negotiation, API search indexes, sitemap discovery, Pagefind output, browser assets, native renderer caching, ETags, response compression, failover, 404 behavior, and explicit 502/504 failures remain part of the hybrid architecture.
  • Obsolete build:hybrid* wrappers and the incompatible static-wwwroot build path were removed because ordinary builds now produce the hybrid artifact directly.

CI

  • The ordinary frontend artifact is dist-hybrid, uploaded only after a successful build.
  • Browser tests download that artifact and run against StaticHost plus a real renderer instead of astro preview, which cannot serve middleware-mode hybrid output.
  • The renderer/container acceptance workflow remains label/manual-gated. Its obsolete static baseline comparison and hybrid opt-in flag were removed, and output verification checks hybrid-specific invariants.
  • The version-dependent Astro 7.4 parallel-prerender experiment and the API route/cache rewrites evaluated from Speed up site build with Astro 7.4 parallel prerender and incremental builds #1927 are not included in this PR.

Aspire CLI dependency

Hybrid output writes the on-demand API URLs to sitemap-api.xml and links it from sitemap-index.xml. The Aspire CLI must ingest the sitemap index rather than only sitemap-0.xml; that dependency is tracked in microsoft/aspire#20967. Until it ships, aspire docs api list|search against a hybrid-built site returns an incomplete catalog, while get for a known page still works.

Third-party links and affiliations

None. This change does not add or change third-party links.

Validation

Current head: 356691770b60a23bc6f52c12bcb957ddbe9cd9ae, targeting release/17.0.

  • pnpm install --frozen-lockfile - passed; the reverted lockfile is current and the supply-chain policy passed.
  • Focused frontend hybrid/config tests - passed: 47 tests across 5 files.
  • pnpm lint - passed.
  • pnpm test:unit - passed: 86 files, 1,195 tests passed, one expected skip.
  • dotnet test tests/StaticHost.Tests --filter FullyQualifiedName~HybridApiDocs - passed: 45 tests.
  • dotnet test tests/Aspire.Dev.AppHost.Tests --filter FullyQualifiedName~HybridApiDocs - passed: 4 tests.
  • git diff --check - passed.
  • No local production build or browser matrix was run, per repository guidance. GitHub Actions provides the production hybrid build and browser verification for this head.

@aspire-repo-bot

aspire-repo-bot Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1874. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally. The prerendered site is in client/; API reference pages are rendered on demand from server/ by StaticHost.

VS Code: Open PR #1874 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

Hybrid mode serves plain files and forwards uncompressed renderer output, so pages, assets and sitemaps lost the precompression of the static build. Enable Brotli and gzip response compression for the hybrid pipeline.

Co-authored-by: Copilot App <[email protected]>
The TypeScript API landing page embedded a 13 MB search index in its HTML.
Landing, package and module pages now fetch a prerendered JSON file with a
delayed loading state and an in-place retry when the download fails.

Co-authored-by: Copilot App <[email protected]>
The name link was a flex item with min-width:auto and the inline code
ignored overflow, so long signatures widened the page by over 1,000 px.

Co-authored-by: Copilot App <[email protected]>
- Do not forward query strings or an Authorization-driven cache bypass for pages
- Share one render per URL while it is in flight
- Route pages to a stable renderer by path hash, with a failure cooldown
- Answer matching validators with 304 and serve pages with an ETag and no-cache
- Serve the site 404 page for unknown API URLs and a retry page for 502/504
- Keep the two API landing pages prerendered
- Bound renderer heap and decouple the App Service health check from renderer readiness

Co-authored-by: Copilot App <[email protected]>
Paths outside the on-demand manifest now fall through to static files, and
the site 404 page is the fallback for unknown API URLs.

Co-authored-by: Copilot App <[email protected]>
UseStaticFiles refuses unknown extensions, so Pagefind's index files, its
WASM and the terminal recordings returned 404. The acceptance script now
requests one file per extension in the client output.

Co-authored-by: Copilot App <[email protected]>
The hybrid model forced the plan to 2 instances and the site to 2 workers,
which would override the existing 3 automatically scaled instances.

Co-authored-by: Copilot App <[email protected]>
App Service resolves a sidecar environment variable's value as the name of an
app setting, so the literal PORT values were ignored and both renderers bound
4323, which stopped the whole site from starting.

Co-authored-by: Copilot App <[email protected]>
The earlier merge resolution recorded tarball URLs from a corporate proxy,
which the supply-chain policy check rejects.

Co-authored-by: Copilot App <[email protected]>
@IEvangelist
David Pine (IEvangelist) force-pushed the ievangelist-hybrid-api-rendering branch from 2f75c44 to 586d45e Compare October 19, 2026 20:27
Squash the net changes from ievangelist-astro-incremental-builds
(e89a7af) onto the hybrid API rendering branch so the incremental
build work ships with it instead of as a stacked change. The resulting
tree is identical to e89a7af.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 6006114b-0a66-4e3d-a4f5-b3b55ab17eea
@IEvangelist David Pine (IEvangelist) changed the title Add a build-time opt-in hybrid API documentation POC Add hybrid API docs with incremental builds Oct 19, 2026
@IEvangelist
David Pine (IEvangelist) marked this pull request as ready for review October 20, 2026 12:58
Copilot AI balanced review requested due to automatic review settings October 20, 2026 12:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved runtime reliability, cache correctness, and artifact-publication issues need correction before approval.

7 open issues
1 file not reviewed
  • src/frontend/pnpm-lock.yaml: Generated file
What changed in this PR

Adds opt-in hybrid API rendering and incremental frontend builds to aspire.dev while retaining the default static deployment.

Changes:

  • Routes API detail pages through private Astro renderers behind StaticHost.
  • Adds incremental caching and separately downloaded API search indexes.
  • Adds packaging, deployment configuration, and validation coverage.
File Description
tests/​Aspire.Dev.AppHost.Tests/​HybridApiDocsConfigurationTests.cs Tests local workers and Azure sidecars.
src/​statichost/​StaticHost/​StaticHost.csproj Selects hybrid build assets.
src/​statichost/​StaticHost/​Program.cs Wires hybrid hosting and routing.
src/​statichost/​StaticHost/​NotFoundPage.cs Shares site 404 rendering.
src/​statichost/​StaticHost/​HybridApiDocs/​HybridApiDocsRoutingMiddleware.cs Selects API representations and redirects.
src/​statichost/​StaticHost/​HybridApiDocs/​HybridApiDocsRenderer.cs Forwards requests with validation and failover.
src/​statichost/​StaticHost/​HybridApiDocs/​HybridApiDocsFlights.cs Shares concurrent rendering requests.
src/​statichost/​StaticHost/​HybridApiDocs/​HybridApiDocsExtensions.cs Registers hybrid services and endpoints.
src/​statichost/​StaticHost/​HybridApiDocs/​HybridApiDocsErrorPages.cs Provides retry pages during outages.
src/​statichost/​StaticHost/​HybridApiDocs/​HybridApiDocsEndpointPool.cs Distributes requests between renderers.
src/​statichost/​StaticHost/​HybridApiDocs/​HybridApiDocsArtifact.cs Validates manifests and indexes routes.
src/​statichost/​StaticHost/​AgentReadiness/​MarkdownNegotiationMiddleware.cs Defers hybrid Markdown negotiation.
src/​statichost/​StaticHost/​AgentReadiness/​LinkHeaderMiddleware.cs Links hybrid Markdown companions.
src/​frontend/​tsconfig.json Excludes hybrid output.
src/​frontend/​tests/​unit/​twoslash-environment.vitest.test.ts Checks SDK declaration resolution.
src/​frontend/​tests/​unit/​og-build-cache.vitest.test.ts Tests OG cache keys.
src/​frontend/​tests/​unit/​icon-safelist.vitest.test.ts Tests deferred icon metadata loading.
src/​frontend/​tests/​unit/​hybrid-native-cache.vitest.test.ts Tests native response caching.
src/​frontend/​tests/​unit/​hybrid-api-docs.vitest.test.ts Tests hybrid configuration and artifacts.
src/​frontend/​tests/​unit/​dev-resource-catalog.vitest.test.ts Aligns fixtures with canonical content IDs.
src/​frontend/​tests/​unit/​build-performance.vitest.test.ts Updates workflow assertions.
src/​frontend/​tests/​unit/​api-search-lifecycle.vitest.test.ts Covers asynchronous index loading.
src/​frontend/​tests/​unit/​api-search-index-loading.vitest.test.ts Tests loading and retry behavior.
src/​frontend/​tests/​unit/​api-markdown.vitest.test.ts Tests request-time Markdown resolution.
src/​frontend/​tests/​e2e/​hybrid-api-docs.spec.ts Checks built-site hybrid navigation.
src/​frontend/​tests/​e2e/​api-search-contract.spec.ts Covers downloaded indexes and recovery.
src/​frontend/​tests/​e2e/​api-cross-language-navigation.spec.ts Checks long-signature overflow.
src/​frontend/​src/​utils/​packages.ts Reuses extracted route helpers.
src/​frontend/​src/​utils/​og-build-cache.ts Generates OG cache keys.
src/​frontend/​src/​utils/​hybrid-api-cache.ts Controls native response caching.
src/​frontend/​src/​utils/​dev-center/​catalog-normalization.ts Uses canonical content IDs.
src/​frontend/​src/​utils/​csharp-route-identity.ts Extracts C# route identities.
src/​frontend/​src/​utils/​api-search-index.ts Shares search-index generation.
src/​frontend/​src/​utils/​api-route-data.ts Resolves request-time API data.
src/​frontend/​src/​utils/​api-route-catalog.ts Builds API route inventories.
src/​frontend/​src/​types/​incremental-build.d.ts Types incremental icon metadata.
src/​frontend/​src/​pages/​reference/​api/​typescript/​index.astro Downloads the landing search index.
src/​frontend/​src/​pages/​reference/​api/​typescript/​[module]/​index.astro Resolves modules and downloads indexes.
src/​frontend/​src/​pages/​reference/​api/​typescript/​[module]/​[item]/​index.astro Resolves items on demand.
src/​frontend/​src/​pages/​reference/​api/​typescript/​[module]/​[item]/​[member]/​index.astro Resolves members on demand.
src/​frontend/​src/​pages/​reference/​api/​typescript/​[module]/​[item]/​[member].md.ts Resolves member Markdown on demand.
src/​frontend/​src/​pages/​reference/​api/​typescript/​[module]/​[item].md.ts Resolves item Markdown on demand.
src/​frontend/​src/​pages/​reference/​api/​typescript/​[module].md.ts Resolves module Markdown on demand.
src/​frontend/​src/​pages/​reference/​api/​csharp/​index.astro Downloads the landing search index.
src/​frontend/​src/​pages/​reference/​api/​csharp/​[package]/​index.astro Resolves packages and downloads indexes.
src/​frontend/​src/​pages/​reference/​api/​csharp/​[package]/​[type]/​index.astro Resolves types on demand.
src/​frontend/​src/​pages/​reference/​api/​csharp/​[package]/​[type]/​[memberKind].md.ts Resolves member-group Markdown on demand.
src/​frontend/​src/​pages/​reference/​api/​csharp/​[package]/​[type]/​[memberKind].astro Resolves member groups on demand.
src/​frontend/​src/​pages/​reference/​api/​csharp/​[package]/​[type].md.ts Resolves type Markdown on demand.
src/​frontend/​src/​pages/​reference/​api/​csharp/​[package].md.ts Resolves package Markdown on demand.
src/​frontend/​src/​pages/​reference/​api/​_search-presentation.ts Adds loading and retry states.
src/​frontend/​src/​pages/​reference/​api-search/​typescript/​[module].json.ts Prerenders module search indexes.
src/​frontend/​src/​pages/​reference/​api-search/​typescript.json.ts Prerenders the TypeScript search index.
src/​frontend/​src/​pages/​reference/​api-search/​csharp/​[package].json.ts Prerenders package search indexes.
src/​frontend/​src/​pages/​reference/​api-search/​csharp.json.ts Prerenders the C# search index.
src/​frontend/​src/​pages/​og/​reference/​samples/​[sample].png.ts Adds sample-image cache keys.
src/​frontend/​src/​pages/​og/​[...slug].png.ts Adds documentation-image cache keys.
src/​frontend/​src/​middleware.ts Applies hybrid caching and URL handling.
src/​frontend/​src/​components/​api-reference/​search-lifecycle.ts Loads external search indexes.
src/​frontend/​scripts/​verify-hybrid-output.mjs Checks hybrid output inventories.
src/​frontend/​scripts/​test-hybrid-host.mjs Exercises packaging and runtime behavior.
src/​frontend/​scripts/​serve-api-docs.mjs Hosts private API renderers.
src/​frontend/​scripts/​build-incremental.mjs Enables incremental hybrid builds.
src/​frontend/​scripts/​build-hybrid.mjs Enables hybrid builds.
src/​frontend/​pnpm-workspace.yaml Registers dependency compatibility patches.
src/​frontend/​playwright.hybrid.config.mjs Configures built-host browser checks.
src/​frontend/​playwright.config.mjs Separates hybrid browser tests.
src/​frontend/​patches/​[email protected] Defers icon safelist loading.
src/​frontend/​patches/​[email protected] Stabilizes incremental asset hashes.
src/​frontend/​package.json Adds build commands and runtime dependencies.
src/​frontend/​frontend.esproj Separates hybrid assets and intermediates.
src/​frontend/​eslint.config.mjs Excludes hybrid output from linting.
src/​frontend/​Dockerfile.hybrid.dockerignore Restricts renderer build inputs.
src/​frontend/​Dockerfile.hybrid Packages the private renderer.
src/​frontend/​config/​twoslash.config.mjs Adjusts SDK declaration lookup.
src/​frontend/​config/​hybrid-api-docs.mjs Configures routes, manifests, and sitemaps.
src/​frontend/​astro.config.mjs Integrates hybrid and incremental modes.
src/​apphost/​Aspire.Dev.AppHost/​HybridApiDocsExtensions.cs Configures workers and Azure sidecars.
src/​apphost/​Aspire.Dev.AppHost/​AppHost.cs Selects hybrid orchestration.
package.json Exposes the incremental build command.
CONTRIBUTING.md Documents hybrid operation and deployment.
.gitignore Ignores hybrid output and measurements.
.github/​workflows/​hybrid-api-docs-poc.yml Adds hybrid build and runtime validation.
.github/​workflows/​frontend-build.yml Adds opt-in validation and upload conditions.
.github/​workflows/​ci.yml Integrates optional hybrid checks.

Review effort: Balanced

HYBRID_TEST_CONTAINERS: '1'
run: node scripts/test-hybrid-host.mjs
- name: Upload private POC artifact
if: ${{ always() && inputs.artifact_run_id == '' }}
Comment thread CONTRIBUTING.md
Comment on lines +32 to +34
at **build time** leaves non-API documentation and assets static, but renders all
C# and TypeScript API HTML and Markdown on demand through the existing StaticHost.
This includes both API search pages. The convenience command `build:hybrid` sets
Comment thread CONTRIBUTING.md
Comment on lines +73 to +78
Astro's native `memoryCache()` is the only response cache: 128 LRU entries with a
30-minute lifetime, not a 128 MiB byte budget. It does not guarantee cold-miss
coalescing. StaticHost forwards every request, buffers up to 64 MiB, and sends
on-demand output with `Cache-Control: no-store`. Negotiated Markdown shares the
native `.md` entry; its private/Vary headers are applied during forwarding.
Authorization requests bypass caching; preference cookies are not forwarded.
Comment on lines +7 to +8
if (/[\p{Extended_Pictographic}\p{Emoji_Presentation}\u20e3]/u.test(renderedText)) {
return undefined;
throw new InvalidOperationException("Invalid hybrid redirect status.");
_redirects.Add(redirect.Path, redirect);
_canonical.TryAdd(redirect.Path, redirect.Path);
_canonical.TryAdd(redirect.Path.TrimEnd('/'), redirect.Path);
Comment on lines +147 to +152
if ((int)response.StatusCode >= 500 && index < candidates.Length - 1)
{
logger.LogWarning("Renderer {Endpoint} returned {Status}; trying another replica",
candidates[index].Address, (int)response.StatusCode);
continue;
}
try
{
File.WriteAllText(Path.Combine(artifactDirectory, "hybrid-api-docs.json"),
$$"""{"mode":"hybrid-api-docs","platform":"{{(OperatingSystem.IsWindows() ? "win32" : "linux")}}"}""");
The Astro build now always produces the hybrid artifact in dist-hybrid:
prerendered landing, guide and search pages, with API detail pages
rendered on demand by the renderer sidecars. ASPIRE_HYBRID_API_DOCS no
longer exists and nothing reads it. ASPIRE_INCREMENTAL_BUILD stays an
explicit opt-in and is unchanged.

Build and publish
- astro.config.mjs: the node middleware adapter, dist-hybrid output and
  hybrid integration are unconditional; the incremental-requires-hybrid
  guard is gone. The middleware only keeps the .md redirect in astro dev.
- frontend.esproj publishes dist-hybrid/client unconditionally.
- StaticHost always compiles and configures the hybrid artifact. Publish
  fails with an explicit error when hybrid-api-docs.json or
  client/index.html is missing. Run mode may omit the artifact only when
  AppHost routes the website to the Vite dev resource
  (HybridApiDocs:WebsiteServedByDevServer).
- AppHost publish mode always wires the artifact and the two renderer
  sidecars. Run mode keeps the Vite hot reload resource, selected by
  execution mode rather than an environment opt-in.
- Removed build:hybrid*, build:statichost* and their scripts. The first
  pair only wrapped the flag. The second wrote a static site into the
  StaticHost wwwroot, which the always-hybrid build rejects and which
  StaticHost no longer serves.

CI
- The build job uploads dist-hybrid, still only after a successful
  build.
- The e2e jobs download dist-hybrid and run Playwright against the
  renderer plus StaticHost instead of astro preview, which does not
  serve the node middleware output. A Redis service backs the live
  status services as in production, and the Playwright config falls back
  to a non-aborting connection string for local runs.
- The renderer and container acceptance workflow stays label and manual
  gated. Its opt-in wording and the static baseline build and comparison
  are removed, and verify-hybrid-output now checks hybrid-only
  invariants.
- measure-build-output reads dist-hybrid/client.

Tests
- Rewrote the hybrid, incremental and build-performance unit tests for
  the unconditional build. Added StaticHost tests for the artifact
  requirement and an AppHost theory that rejects a missing or
  incompatible artifact at publish.

Not included
- Astro 7.4.x, the parallelPrerender experiment, its Astro patch port
  and the matching markdown-remark bump are held until 7.4.1 is seven
  days old (2026-10-26T14:13:57Z). No dependency, patch or pnpm policy
  changes here.
- The route-prop and cache-key rewrites from the other build-time work
  are omitted; og-build-cache.ts already covers the same OG inputs.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 6006114b-0a66-4e3d-a4f5-b3b55ab17eea
Back out 8e3038f ("Add incremental builds to hybrid API architecture")
as a normal revert on top of 698bbd7 (Make hybrid API documentation
the default build). History is not rewritten.

Removed (incremental-build only):
- config/incremental-build.mjs, scripts/build-incremental.mjs and the
  build:incremental script, plus the Astro experimental and Vite wiring
- the Astro 7.3.2 patch, the Starlight icon patch change, the pnpm
  workspace and lockfile entries, and the parse5-sax-parser and vite
  devDependencies
- the OG build cache and its OG page hooks, and the incremental changes
  to the twoslash config and dev-center catalog normalization
- tests: incremental-build, og-build-cache and icon-safelist

Preserved from 698bbd7: always-on dist-hybrid output, on-demand API
rendering, and the StaticHost, AppHost, publish, E2E and workflow
changes.

Conflict resolutions:
- build-incremental.mjs and the incremental-build test: deleted (698bbd7
  had edited them, but they no longer exist).
- package.json: no build:incremental and no build:hybrid* scripts;
  serve:hybrid, preview and preview:host stay.
- astro.config.mjs: dropped the incremental settings; kept the
  unconditional hybrid outDir, node middleware adapter, session: false,
  hybrid cache config and hybrid integration. cacheDir is
  ./node_modules/.astro.

Deliberate deviations from a literal revert:
- Keep the successful-build-only artifact upload gate in
  frontend-build.yml (id: frontend_build and the upload condition); it
  is not incremental-specific. Only the diagnostics upload condition
  returns to always() && inputs.profile_build.
- Add a hybrid-by-default config test that checks the node adapter and
  dist-hybrid output, and that the retired ASPIRE_HYBRID_API_DOCS flag
  is ignored.

Dependencies return to the previous lockfile state: astro 7.3.2 is
resolved from the ^7.2.8 range, with no Astro patch and no age
exemption.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 6006114b-0a66-4e3d-a4f5-b3b55ab17eea
@IEvangelist David Pine (IEvangelist) changed the title Add hybrid API docs with incremental builds Add hybrid API docs with on-demand rendering Oct 20, 2026
David Pine (IEvangelist) added a commit that referenced this pull request Oct 26, 2026
…tal builds (#1929)

## Summary

<!-- Describe what this pull request changes and why. -->

Explores incremental builds, parallel prerender and Bun together, based
on `main`. Only the build changes are here; the hybrid API work stays in
#1874, which targets `release/17.0`. An earlier version of this branch
targeted `release/17.0` and also shared contributor fetches across
prerender workers. `main` now pre-generates contributor data (#1803), so
that change is dropped.

- **Parallel prerender and incremental builds:** Sébastien Ros's #1927
(Astro 7.4 `experimental.parallelPrerender` and `incrementalBuild`, plus
`cacheKey` refactors for the glossary, API and OG routes) is the first
commit, applied unchanged with his authorship kept. Whichever of #1927
and this PR merges second rebases and drops it. This PR also fixes a
quadratic comparison in `ts-api-route-catalog.vitest.test.ts` (about 34
s down to about 1.6 s in a local run). Astro is then bumped to 7.4.2
(the structured-clone patch is renamed and applies unchanged), and the
TypeScript item Markdown routes now take an item index instead of the
whole item: parallel prerender workers get a structured clone, so a slug
lookup by identity fell back to the unsuffixed slug for a duplicate
handle such as `thing-thing-2`.
- **Bun replaces pnpm** (1.4.3) for installs and scripts. `bun.lock` is
migrated from `pnpm-lock.yaml`, and the pnpm workspace settings move to
`package.json` (`overrides`, `patchedDependencies`,
`trustedDependencies`) and `bunfig.toml` (one-day release age gate). The
`devalue` override from #1940 moves with them (`devalue@<5.9.3` resolves
to 5.9.4). `patches/README.md` keeps the patch rationale that lived in
`pnpm-workspace.yaml` comments.
- **The production Astro build runs on the Bun runtime** (`bunx --bun
astro build`). Dev, preview, Vitest, ESLint and Playwright stay on Node.
Two Bun differences are handled in config:
- `ec.config.mjs` imports the `starlight-plugin-icons` TypeScript source
natively, because Bun has no Node module hooks, which `tsx` needs.
- `astro.config.mjs` defaults `process.env.BASE_URL` to `/`. Bun
resolves `import.meta.env` to `process.env`, and
`starlight-links-validator` reads `import.meta.env.BASE_URL`, so without
it `astro:build:done` crashed with `undefined is not an object
(evaluating 'path.replace')`.
- **CI:** `frontend-build`, `indexnow` and `update-integration-data` use
the SHA-pinned `oven-sh/setup-bun` action (`bun-version-file` points at
`src/frontend/package.json`), then `bun install --frozen-lockfile`. The
CodeQL ADO pipeline, dev container and Dependabot (`bun` ecosystem) are
converted too.
- **Astro build cache in `frontend-build`:** `node_modules/.astro` is
restored on every run (keyed on `bun.lock`, `astro.config.mjs` and the
patches) so incremental builds can skip unchanged pages. It is saved
only by push builds and by a PR build that found nothing to restore, so
each PR commit doesn't write another entry against the 10 GB repo cache
limit. The job summary reports the restored key, exact hit and size.
- **`Frontend Build` runs on the 8-core runner.** The `build` job in
`frontend-build.yml` uses `8-core-ubuntu-latest` (runner group
`aspire-runners`, granted to this repository in
microsoft/github-operations#1993) when the repository owner is
`microsoft`, and `ubuntu-latest` otherwise, because forks can't use the
label. The other jobs stay on `ubuntu-latest`. With the same four
prerender workers, the cold build step went from 731 s to 296 s and the
job from 968 s to 417 s (see the timings below).
- **One flaky E2E test is fixed.** The `a missing live API stays
disabled across navigation and visibility changes until reload` test in
`live-status.spec.ts` failed on CI runners where the real WCP script
shows its consent banner: the test helper rejects it, WCP reloads the
page, and `/api/live/` is requested a second time. The test now aborts
the WCP script, as other specs already do.
- **Docs, agents and skills** now say Bun. In the contributor guide, the
prerequisites list Bun, the pnpm | npm install tabs became one `bun
install` step with a note (other package managers ignore `bun.lock` and
the patches), and the `pnpm` commands became `bun run ...`.
`CONTRIBUTING.md`, `CODESPACES.md`, the agent instructions and the
skills match, and the pnpm card is gone from the thanks page. The
contributor data hint in `ContributorList.astro` (and its unit test) now
says `bun run update:contributors`.

Timings (four prerender workers throughout; `ubuntu-latest` is 4 vCPU
and 16 GB, `8-core-ubuntu-latest` is 8 vCPU and 32 GB). The `main` rows
are push builds of `main`, which has sequential prerender, Node and no
cache:

| Run | Runner | Prerender | Astro build step | `Frontend Build` job |
| --- | --- | --- | --- | --- |
| `main` push `a62b64bec` (this PR's earlier base) | `ubuntu-latest` |
18 m 22 s | 1,252 s | 1,471 s |
| `main` push `6be625cd0` (a fast runner) | `ubuntu-latest` | 12 m 13 s
| 826 s | 976 s |
| `main` push `3120da6c3` (a fast runner) | `ubuntu-latest` | 11 m 36 s
| 786 s | 934 s |
| This PR, cold (no cache) | `ubuntu-latest` | 9 m 36 s | 732 s | 963 s
|
| This PR, cold (no cache), after the rebase | `ubuntu-latest` | 9 m 33
s | 731 s | 968 s |
| This PR, warm cache, same commit (re-run) | `ubuntu-latest` | 3 m 27 s
| 438 s | 650 s |
| This PR, cold (no cache) | `8-core-ubuntu-latest` | 3 m 53 s | 296 s |
417 s |
| This PR, cold (no cache), after the Astro 7.4.2 bump |
`8-core-ubuntu-latest` | 3 m 49 s | 386 s | 534 s |
| This PR, warm cache, same commit (re-run) | `8-core-ubuntu-latest` | 3
m 15 s | 297 s | 485 s |

On the 8-core runner the cold build step took 296 s against 731 s on
`ubuntu-latest` for the same content and the same four workers, and the
job 417 s against 968 s. That is more than the doubled vCPU count alone
explains, and I didn't isolate why (the runner also has twice the
memory). The cold artifact upload went from 171 s to 87 s and the cache
save from 29 s to 6 s. The warm re-run on the 8-core runner took the
same 297 s: prerender was 38 s faster, but Vite (38 s to 64 s) and
Pagefind (43 s to 66 s) were each about 25 s slower, which looks like
run-to-run noise in a single sample, and its artifact upload took 146 s.
So on the larger runner the incremental cache gains little, while on
`ubuntu-latest`, which forks fall back to, it saved about 5 min. A
second cold run on the 8-core runner, after the Astro 7.4.2 bump, took
386 s for the build step and 534 s for the job: prerender took the same
time (3 m 49 s), but Vite (54 s), Pagefind (52 s) and the artifact
upload (109 s) were each slower, so read the 8-core figures as a range
(417 to 534 s for the job).

Runner speed varies a lot, so a single run says little. `Frontend Build`
on `main` took 15.6 to 27.0 min over its last 20 pushes (median 23.5
min), and the cold run on `ubuntu-latest` (16 m 03 s) sits inside that
spread, level with `main`'s two fastest pushes. The cold 8-core jobs (6
m 57 s and 8 m 54 s) are far below that spread. Prerender is the cleaner
comparison on `ubuntu-latest`: 9 m 36 s here against 11 m 36 s to 18 m
22 s on `main`. The warm re-run on `ubuntu-latest` took 10 m 50 s.

Prerender is the phase that moved; on `ubuntu-latest` Vite (about 70 s)
and Pagefind (about 2 min over roughly 32k HTML files) don't change with
parallelism or caching. On the 8-core runner the cold Astro build took 4
m 55 s (Vite 38 s, prerender 2 m 57 s, Pagefind 43 s). In the warm
re-run on `ubuntu-latest` the Astro build took 7 m 17 s (Vite 1 m 10 s,
prerender 3 m 27 s, Pagefind 2 m). It restored 48,685 of 57,144 routes
from the cache (24,057 API reference pages, 24,094 reference `.md`
endpoints and 534 OG images) and re-rendered 8,459, 7,546 of them locale
pages. Those routes have no `cacheKey` and are the floor for a warm
build. The cache entry is about 164 MB. `main` has no Astro cache entry
yet, so the first push build after merge is cold and saves the entry
that later PR builds restore. An earlier version of this branch, based
on `release/17.0`, measured 447 s and 465 s for warm builds of new
commits, so read the warm numbers as a range.

The whole workflow gained less than the build job, because E2E dominates
it now. Each of the six Playwright shards downloads the roughly 2.1 GB
`frontend-dist` artifact (about 30 s to 13 min, depending on the run)
and then runs Playwright for about 7 to 15 min, which this PR doesn't
change. On `main` pushes `ci-gate` took 33.5 to 65.2 min over the last
20 (median 43.6 min). With the 8-core build the last shard finished
about 37 min after the run started in attempt 1 (one shard spent 10 min
installing Playwright Chromium) and about 28 min after in attempt 2,
against about 33 and 38 min with the `ubuntu-latest` build on the
previous head. All of these are inside `main`'s existing range, because
the faster build only moves the point where the shards start. Speeding
up E2E (more workers per shard, a compressed E2E artifact, the 8-core
runner for the shards) is left out of this PR because it can affect test
reliability or, for the 8-core runner, multiply the larger-runner
minutes.

### Risks to watch in CI

- The Bun-runtime build has passed CI on the current head (run
`40014533725`, cold) and on the previous one (run `39981757109`, cold
and warm), including the E2E shards on the Bun-built output. If it
misbehaves later, fall back to Node for Astro only: change `bunx --bun
astro build` to `astro build` in the three `build*` scripts and
`scripts/build-static-host.mjs`.
- About 8.5k routes (mostly locale pages) have no `cacheKey`, so they
always re-render. That is the floor for a warm build.
- `Frontend Build` now depends on the shared `aspire-runners` group
(granted in microsoft/github-operations#1993, and also used by
microsoft/aspire). A job whose runner label can't be served waits in the
queue, and `timeout-minutes` only counts once it runs. Over a 12 h
sample of microsoft/aspire (74 `8-core-ubuntu-latest` jobs) the queue
time had a median of 5 s, a 95th percentile of 9 s and a maximum of 116
s, so contention looks low, but the sample was small and mostly
off-peak. To fall back, change the `runs-on` line to `ubuntu-latest`.
Larger runners are billed per minute, including in public repositories.
- `PUBLIC_GIT_COMMIT_ID` (the merge base with `origin/main`) is rendered
into every page: the footer, the commit link and `<meta
name="git-commit-id">`, and client-side navigation between pages with
different IDs falls back to a full page load (`deployment-guard.ts`).
From reading Astro 7.4's incremental build code, I expected the
dependency hash to ignore `.env`-derived values, so a page restored from
the cache could keep an older commit ID after `main` advances. I tested
that on a throwaway build: it restored a cache saved for a different
commit and built with a new `PUBLIC_GIT_COMMIT_ID`, and all 32,200 built
HTML pages carried the new ID (none kept the old one). Nothing is
affected today either way: the CI `frontend-dist` only feeds E2E and the
internal build has no Astro cache. Repeat that check before using the
cache in a build that gets deployed, or key the cache on the commit ID.
- Built HTML is no longer byte-for-byte reproducible between runs:
Starlight tab ids (`tab-panel-N`) depend on which worker renders a page.
They stay unique within each page, so nothing breaks, but diffing two
builds shows tab-id noise.
- The internal Azure DevOps build runs `frontend.esproj` (`bun run
build`), so it needs Bun on its agents. A companion internal PR (Azure
DevOps 67205, into `deploy`) installs the package manager that
`package.json` names (pnpm while `main` still pins it, Bun once this
lands), so it can merge first. A throwaway run of the same install and
publish steps on the same internal agent type passed (Bun install,
parallel prerender, no drift in the committed `.generated` output), but
the companion PR itself hasn't run in the real pipeline yet.
- pnpm-only settings were dropped: `allowedDeprecatedVersions`,
`peerDependencyRules` and the version-pinned release-age excludes. Bun's
`minimumReleaseAgeExcludes` matches names only, and a locked install
isn't age-gated.

## Third-party links and affiliations

<!--
List any third-party links added or changed by this pull request and
disclose any
material affiliation with the linked organizations, such as employment,
sponsorship, or ownership. Write "None" if this pull request doesn't add
or
change third-party links.
-->

- https://bun.sh/docs/installation: Bun install docs in the contributor
guide (replaces pnpm.io).
- https://github.com/oven-sh/setup-bun: GitHub Action that installs Bun
in CI, pinned to a commit SHA (v2.2.0) and added to the organization's
allowed actions.
- Rettend/starlight-plugin-icons#9: upstream fix
tracked for one of the patches; moved from a comment in
`pnpm-workspace.yaml` to `patches/README.md`.
- The `bun` npm package (installed by the CodeQL ADO pipeline) and the
`ghcr.io/devcontainers-extra/features/bun:1` dev container feature are
new third-party tooling.

No material affiliation with these projects or organizations to
disclose.

## Validation

<!-- List the checks you ran or explain why validation isn't needed. -->

CI on the current head `f1a7ba038` (run `40014533725`, with `Frontend
Build` on `8-core-ubuntu-latest`): every job passed on the first attempt
with a cold Astro cache, including `Frontend validation` (lint, then 81
test files with 1,103 tests passed and 1 skipped), `AppHost Build`,
`release-sync-tests`, all six Playwright E2E shards (no test failed or
needed a retry), the report merge and `ci-gate`.

On the previous head `5988e6ecd` (before the Astro 7.4.2 bump and the
item route fix), run `39981757109` also passed, with `Frontend Build` on
`8-core-ubuntu-latest`:

- Attempt 1 (cold cache): every job passed, including `Frontend
validation` (lint, then 80 test files with 1,094 tests passed and 1
skipped), `AppHost Build`, `release-sync-tests`, all six Playwright E2E
shards, the report merge and `ci-gate`. One E2E test passed only on its
retry: `mermaid-navigation.spec.ts` `Mermaid stays centered and
responsive after client navigation in dark mode` timed out after 15 s on
the tablet project while waiting for the Mermaid SVG to center. It polls
client-side rendering, so it looks timing-sensitive on a loaded runner.
It didn't retry in any of the last 14 `main` push runs (84 shard logs),
where other tests did in 4 of the 14 (`twoslash-navigation` and
`homepage`).
- Attempt 2 (full re-run, exact cache hit): every job passed, including
all six E2E shards and `ci-gate`. No test failed or needed a retry.

On an earlier head `369123798` (before the rebase onto `main` at
`1e4b28d3b` and the runner change), run `39804194596` on `ubuntu-latest`
also passed. In attempt 1 (cold cache) only shard `mobile-chromium` 1/2
failed, with `Artifact download failed after 5 retries` before it ran
any test, and attempt 2 (full re-run) passed every job. No test failed
or needed a retry in either attempt.

The E2E test fixed here (`live-status.spec.ts`, `a missing live API
stays disabled across navigation and visibility changes until reload`)
had failed on tablet shard 2/2 of run `39620067289` (the original
attempt and both retries) and on an unrelated docs PR's run
(`39344794778`). The failing trace shows the WCP consent banner
appearing, the test helper clicking Reject, and the page reloading,
which requested `/api/live/` a second time. The test now blocks the WCP
script. It passed on its first attempt on the desktop, tablet and mobile
projects in both attempts on each head above, and in run `39655383949`
on the earlier version of this branch. The banner depends on the
runner's region, so a few green runs don't prove the fix; the check is
that this test stays green across further runs. `homepage.spec.ts`
`keeps every dashboard screenshot loaded and fully contained in both
themes` is a separate known flake that passes on retry (it failed once
and passed on retry in runs `39655383949`, `39641836015` and
`39513380035`); it didn't appear in these runs.

Local checks ran on the earlier, `release/17.0`-based version of this
branch with Bun 1.4.3 and Node 24. After the rebases onto `main`,
`bunfig.toml`, `ec.config.mjs`, the `build*` scripts and
`live-status.spec.ts` are identical, the Astro patch only moved to
`[email protected]` with the same content, `bun.lock` differs by the
`devalue` override ported from #1940 and the Astro 7.4.2 bump,
`package.json` differs by those and by the `update:contributors` script
that `main` added in #1803, and `frontend-build.yml` differs only by the
`runs-on` line, so those results still apply (CI repeats the install,
lint and unit tests on the current head):

- `bun install --frozen-lockfile`: passed, lockfile unchanged.
- `bun run lint`: passed (exit 0).
- `bun run test:unit`: passed, including the workflow guard tests in
`build-performance.vitest.test.ts` for the cache restore and save steps.
CI's `Frontend validation` passed the same tests on the rebased head.
- `bunx --bun astro sync`: passed.
- `bunx --bun astro dev` probe: a docs page, a twoslash page and an OG
PNG all returned 200.
- A Bun probe of `starlight-links-validator` reproduced the
`path.replace` crash without the `BASE_URL` default and returned the
expected slug with it.
- A throwaway Playwright probe against `astro dev` (Node): with a
stand-in WCP that requires consent, the unchanged test body failed at
`live-status.spec.ts:83` (`Expected: 1, Received: 2`, the CI failure),
and with the abort line it passed. The changed spec then passed 15 of 15
(five repeats on each of the desktop, tablet and mobile projects).
- YAML parse of the changed workflows: passed.

On the rebased head I also ran the `contributor-list` and
`ts-api-route-catalog` unit tests with Node 24 (18 tests passed). The
first rebase conflicted only in
`.agents/skills/update-integrations/SKILL.md` and
`.github/instructions/astro.instructions.md`. The second one, onto
`main` at `1e4b28d3b` (#1940, a `devalue` bump), conflicted in
`pnpm-lock.yaml` in the first commit (I kept its `[email protected]`
entries, which `[email protected]` pins) and in the Bun migration commit,
which deletes `pnpm-lock.yaml` and `pnpm-workspace.yaml`. There I ported
the override to `package.json` and `bun.lock`, and `bun install
--lockfile-only` reported no changes.

Output check: on the previous head, I compared the `frontend-dist`
artifact from this PR's cold build (run `39804194596`, attempt 1) with
the one from the `main` push build of the PR's earlier base
(`a62b64bec`, sequential, Node). The later commits only change the
`devalue` override and the `runs-on` line, and I didn't repeat the
comparison:

- Both contain 32,386 HTML pages, and no `/_astro/` reference in the
HTML dangles.
- Pagefind reports the same counts.
- Non-HTML files are byte-identical except six: the Markdown of the two
edited community pages, `llms-full.txt` and `llms-small.txt` (this PR's
docs edits), and `rss.xml` and the Pagefind entry (hash and commit noise
that also differs between two builds of `main`).
- Two random samples of 201 and 251 pages have identical visible text. I
didn't diff every page.
- 150 PNG and 1 WEBP originals in `_astro/` that no page referenced are
no longer emitted.

Not run locally: `bun run build` (a full site build is too heavy to run
locally; CI covers it), the full Playwright E2E suite (CI ran it;
locally only the deflaked test ran, against `astro dev`) and the
internal Azure DevOps pipelines.

---------

Co-authored-by: Sébastien Ros <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: David Pine <[email protected]>
Copilot-Session: 7fae752f-9a4b-40b9-afa8-fe291e54acb6
Copilot-Session: 5b3c83c2-1729-4e35-863d-c38bc4e0b41f
@IEvangelist

Copy link
Copy Markdown
Member Author

Project documentation review [partial - phase A: 40 of 40 claim groups evaluated; phase B: development-site checks completed, production hybrid runtime blocked]

Inspected: PR #1874, targeting release/17.0, head 356691770b60a23bc6f52c12bcb957ddbe9cd9ae (79 changed files). This is a conversation comment, not an approval or change-request review.

Phase B summary: 12 sampled API HTML routes, 8 search scenarios, and 4 JSON indexes passed in a local development server; 6 nested Markdown companions failed. Production hybrid testing could not run because the exact-head CI artifacts have expired. Development results are not production cache/resilience evidence. Both phases are included below, with the blind tester's full report preserved. Its observations about unchanged generated API content are retained as context, not asserted as new PR defects. This is the one lifetime docs-stage report, including its limitations; a new commit does not automatically authorize another run.

Phase A - Claim verification

Frozen result: 40 contributor-facing claim groups evaluated: 20 verified, 7 verified-with-nuance, 13 contradicted, 0 unverifiable. Related statements sharing one implementation contract are grouped below. No new Aspire release-version guidance or edited API-schema data is introduced; unchanged generated API descriptions are not being re-audited as new claims.

Sources: The hybrid website is implemented by this PR, so its configuration/runtime claims were checked against microsoft/aspire.dev at the inspected head, not against an unrelated Aspire product implementation. Aspire API shape was checked against microsoft/aspire release/17.0 at 55867ce9d33c8800e6c7278f7edc5e88e0f6b839, with a package-applicable cross-check at v13.6.0 / 56f3e9c0d216c0c7069dabb49dd0464e4827744f. Both expose PublishAsAzureAppServiceWebsite<T>(..., Action<AzureResourceInfrastructure, WebSite>?, ...) and append publish-mode customization annotations (src/Aspire.Hosting.Azure.AppService/AzureAppServiceComputeResourceExtensions.cs:35-63). Azure SDK shape was checked on Azure/azure-sdk-for-net main at fcb70f9691d496404372faf372bf45dba3e86215, sdk/websites/Azure.Provisioning.AppService/api/Azure.Provisioning.AppService.net10.0.cs:3226-3246,5978-5983: SiteContainer, its parent/image/port/identity/environment/volume members, and WebAppEnvironmentVariable exist. That SDK snapshot is a shape cross-check, not proof of deployed service behavior; the PR's actual Aspire 13.6.0 / Azure.Provisioning.AppService 1.3.1 dependency graph was also exercised by its four passing focused AppHost tests. No Community Toolkit source was required.

Findings

High - The new contributor walkthrough describes an opt-in architecture that this head has removed. CONTRIBUTING.md:31-37,47-49,57-71,87-102 says "The normal build remains fully static", names build:hybrid, build:hybrid:skip-search and build:statichost, promises a static/hybrid comparison, and instructs readers to set/unset ASPIRE_HYBRID_API_DOCS to choose their workflow. At this head:

  • astro.config.mjs:59-65,249 unconditionally configures the Node adapter, dist-hybrid, and the hybrid integration; package.json:34-38 exposes ordinary hybrid build commands and none of those three documented command names.
  • AppHost.cs:24-44 always uses Vite in run mode and invokes the hybrid publishing extension only in publish mode. Downloading the Windows artifact and running the documented aspire start sequence does not create the claimed two private Node workers or serve the downloaded hybrid website. Removing the flag does not change this.
  • .github/workflows/hybrid-api-docs-poc.yml:44-49,112-131 builds hybrid artifacts and acceptance containers, not a fully static baseline comparison. StaticHost.csproj:43-63 requires hybrid publish assets, and the AppHost always adds renderer sidecars when publishing; the old static Azure deployment is not unchanged.

Smallest correction: document the architecture actually selected at this head, use existing command names, distinguish Vite development from a production-artifact preview, and remove obsolete static-baseline/opt-in claims. This extends the earlier generic report's outdated-instructions evidence to the retired flag/commands and unreachable local preview workflow; no duplicate inline thread was created.

Medium - Existing static-versus-on-demand and cache-instructions findings remain valid. The claims at CONTRIBUTING.md:32-35,73-78 are still contradicted: the two API landings and their Markdown companions remain prerendered (config/hybrid-api-docs.mjs:21-24); search JSON endpoints are prerendered too. StaticHost coalesces in-flight requests and answers matching validators without a worker call (HybridApiDocsRenderer.cs:34-46), emits no-cache plus ETag for eligible HTML/direct Markdown (:73-76), and does not forward Authorization as a cache bypass (:134-139). Keep these in the existing static-page thread and cache-contract thread, rather than adding duplicates.

Medium - The documented all-worker failure contract excludes an existing reachable 5xx path. CONTRIBUTING.md:80-84 promises gateway errors if both workers fail. HybridApiDocsRenderer.cs:141-162 retries an upstream 5xx only while another candidate remains, then forwards the last worker's 5xx with Unavailable=false; a worker rendering exception can therefore yield its plain API rendering failed body rather than the gateway retry page/Retry-After. This is the existing renderer-exhaustion blocker, not a new inline finding.

Full frozen claim catalog, including verified claims and nuances

All locations below are changed lines in CONTRIBUTING.md. Evidence paths are relative to the inspected microsoft/aspire.dev head unless the source is explicitly named above. Types: behavior = api-behavior; config = config-key; CLI = cli-surface; API = api-shape. "Nuance" means verified-with-nuance.

ID Lines / type Exact claim excerpt Verdict Evidence / qualification
A01 31 / behavior "The normal build remains fully static." Contradicted src/frontend/astro.config.mjs:59-65,249: unconditional hybrid configuration.
A02 31 / config "Opting in with ASPIRE_HYBRID_API_DOCS=1" Contradicted Same config; tests/unit/astro-vite-config.vitest.test.ts:33-42 explicitly checks the retired flag is ignored.
A03 32 / behavior "leaves non-API documentation and assets static" Verified config/hybrid-api-docs.mjs:21-24,65-66: only API-detail route components lose prerendering.
A04 32-35 / behavior "renders all C# and TypeScript API HTML and Markdown on demand ... This includes both API search pages." Contradicted config/hybrid-api-docs.mjs:21-24; four src/pages/reference/api-search/** endpoints declare prerendering.
A05 34-37 / CLI "build:hybrid ... build:hybrid:skip-search ... build:statichost" Contradicted src/frontend/package.json:34-38: documented scripts do not exist.
A06 36 / behavior "Setting a runtime flag alone cannot convert an already-static artifact." Verified Route prerendering is chosen by the build integration, not the host.
A07 43 / CLI "gh workflow run frontend-build.yml ... -f hybrid_api_poc=true" Verified .github/workflows/frontend-build.yml:4-19,58-62: matching dispatch input and reusable acceptance job.
A08 46-47 / config "A PR carrying the hybrid-api-poc label also runs the POC checks" Verified .github/workflows/ci.yml:6-7,107-110: default PR opened/synchronize/reopened events and label condition.
A09 47-49 / behavior "The comparison builds both modes from the same commit" Contradicted Acceptance workflow builds Windows and Linux hybrid output, not static/hybrid modes.
A10 48-49 / behavior "reports output counts, build resource usage, and cold/warm rendering measurements in hybrid-api-docs-results" Nuance Acceptance workflow measurements upload :144-155; output/resource/host measurements exist, but no two-mode comparison.
A11 50-51 / behavior "without also duplicating the ordinary frontend build and all viewport test shards" Verified frontend-build.yml:65,291 skips regular build/validation for manual POC-only dispatch; e2e depends on skipped build.
A12 54-56,63-64 / CLI "gh run download RUN_ID ... --name hybrid-api-docs-poc-windows" Nuance Artifact names/paths match workflow. Historical inspected-head run has no remaining artifacts; a successful retained run is required.
A13 57-58,66-68 / CLI "ASPIRE_HYBRID_API_DOCS = '1' ... aspire start --non-interactive ... Browse the StaticHost endpoint" Contradicted AppHost.cs:30-44 starts Vite, not the prebuilt hybrid website in run mode.
A14 61 / package-or-version "Restore frontend dependencies with the repository's existing pnpm setup first." Verified package.json:5, Dockerfile dependency stage, CI frozen-lockfile setup.
A15 62-66 / config "contains client, server, and hybrid-api-docs.json ... platform-specific" Verified Build integration :101-116; worker scripts/serve-api-docs.mjs:8-14; host platform validation HybridApiDocsArtifact.cs:25-33.
A16 66 / behavior "The manifest and server stay outside the public static root." Verified Host web root is artifact client (Program.cs:7-12); publication copies manifest beside hybrid/client, not inside it (StaticHost.csproj:43-52).
A17 67-68 / behavior "The AppHost runs two private Node processes" Contradicted Current run-mode AppHost has no such resources; publish creates two sidecar containers (AppHost.cs:24-44; extension :50-73).
A18 68-69 / behavior "startup does not install packages or rebuild the site" Verified AppHost extension validates files; worker imports prebuilt entry (serve-api-docs.mjs:7-19); no build/install startup path.
A19 70-71 / behavior "Missing or incompatible artifacts cause an actionable startup error" Nuance True for published host/worker and publish preparation (HybridApiDocsArtifact.cs:25-37,78-86; AppHost extension :17-24), not ordinary Vite run mode.
A20 73-74 / config "only response cache: 128 LRU entries with a 30-minute lifetime, not a 128 MiB byte budget" Verified config/hybrid-api-docs.mjs:9-13, src/utils/hybrid-api-cache.ts:11; host keeps only shared in-flight tasks (HybridApiDocsFlights.cs:18-20).
A21 74-75 / behavior "It does not guarantee cold-miss coalescing." Nuance Native provider statement is not a description of the whole path: StaticHost explicitly coalesces (HybridApiDocsRenderer.cs:46-47); focused concurrency test passes.
A22 75 / behavior "StaticHost forwards every request" Contradicted Validator shortcut HybridApiDocsRenderer.cs:34-42; concurrent requests share :46-47.
A23 75 / behavior "buffers up to 64 MiB" Verified HybridApiDocsRenderer.cs:10,151-152; oversized-output test passes.
A24 75-76 / behavior "sends on-demand output with Cache-Control: no-store" Contradicted Eligible HTML/direct Markdown uses no-cache + ETag (HybridApiDocsRenderer.cs:73-76).
A25 76-77 / behavior "Negotiated Markdown shares the native .md entry; its private/Vary headers are applied during forwarding." Verified Routing selection HybridApiDocsRoutingMiddleware.cs:59-68; renderer :68-71; isolation tests pass.
A26 78 / behavior "Authorization requests bypass caching" Contradicted Outbound headers are deliberately reconstructed without Authorization or bypass (HybridApiDocsRenderer.cs:134-139); explicit authorization test passes.
A27 78 / behavior "preference cookies are not forwarded" Verified Same outbound construction; cookie test passes.
A28 80 / behavior "Workers verify a real API render before becoming ready." Verified serve-api-docs.mjs:67-81: real detail request, status/body check, then ready=true.
A29 80-82 / behavior "retries a failed GET ... 10-second attempts within a 30-second budget" Nuance HybridApiDocsRenderer.cs:125-149: matching-build checks and deadlines exist; final upstream 5xx is passed through rather than handled as exhaustion.
A30 82-83 / config "/healthz/api-docs reports renderer readiness; /healthz reports host liveness." Verified HybridApiDocsExtensions.cs:88-94, Program.cs:109.
A31 83-84 / behavior "If both workers fail, APIs return gateway errors while static pages remain available." Contradicted Connection/timeout failures satisfy it, but final upstream 5xx bypasses gateway error path (HybridApiDocsRenderer.cs:143-162); existing thread linked above.
A32 84-85 / behavior "Restarting Node clears its cache; restarting StaticHost does not." Verified Provider is worker-process memory; host stores no persistent response cache. Whole-pair artifact identity remains required.
A33 87-88 / behavior "the static Azure deployment [is] unchanged" Contradicted AppHost.cs:24-27 unconditionally selects hybrid publication; StaticHost.csproj:43-63 changes required publish payload. Existing Redis/live-status wiring remains.
A34 88-90 / API "a .NET main container and two private Astro sidecars in the same App Service, without shared volumes" Verified AppHost extension :34-73; pinned Aspire API contract above; Azure SDK shape above; focused AppHost Bicep/model test passes. This is model verification, not an Azure deployment.
A35 90-92 / config "supply its immutable image reference as Parameters__api_docs_image" Nuance builder.AddParameter("api-docs-image") / provisioning parameter (HybridApiDocsExtensions.cs:26,64); immutable reference is an operator requirement, not enforced validation.
A36 93 / behavior "Both images must use the same Linux build artifact." Verified Linux validation in publishing extension :22-24, Dockerfile payload :17-20, worker/host build-identity check.
A37 93-94 / behavior "No Azure resources are provisioned by the POC CI." Verified Acceptance workflow publishes/builds/tests local containers; no cloud provisioning step.
A38 94 / behavior "Runtime images are restricted to bundled local files and dimensions up to 4096 pixels." Verified HybridApiDocsArtifact.cs:64-75 enumerates images; routing middleware :36-48 validates href and dimensions.
A39 96-97 / config "Set HybridApiDocsArtifactDirectory to select an artifact outside dist-hybrid" Nuance Publish extension :16-18 and MSBuild property StaticHost.csproj:10 accept this; it does not turn Vite run mode into a hybrid preview.
A40 99-102 / CLI "Unset the flag to return to the ordinary Vite/local workflow" Contradicted Vite is selected by run mode regardless of the retired flag (AppHost.cs:30-44).

Focused implementation evidence: dotnet test tests\StaticHost.Tests\StaticHost.Tests.csproj --filter FullyQualifiedName~HybridApiDocs --nologo passed 45/45; dotnet test tests\Aspire.Dev.AppHost.Tests\Aspire.Dev.AppHost.Tests.csproj --filter FullyQualifiedName~HybridApiDocs --nologo passed 4/4. Initial no-restore attempts failed for missing assets, then normal restore/test succeeded. NuGet reported an existing MessagePack advisory; this was not treated as a new PR vulnerability finding. No full production site build was run.

Phase B - Independent blind documentation experience

Documentation Test Report

Focus: Blind Phase B, microsoft/aspire.dev PR #1874
Head: 356691770b60a23bc6f52c12bcb957ddbe9cd9ae
Target: release/17.0
Date: 2026-10-30 CDT / 2026-10-31 UTC
Tester: Independent doc-tester
Local URL: http://127.0.0.1:4329
Result: Partial — development-site testing completed; production hybrid runtime remains unverified.

Independence and methodology

Loaded and followed doc-tester and playwright-cli. Read CONTRIBUTING.md as contributor-facing documentation. Used playwright-cli exclusively for browser interactions, including page navigation, searches, DOM reading, and HTTP requests through the browser session.

Did not read implementation/source/tests, microsoft/aspire source, or parent findings. Did not build the site, change checkout, post GitHub comments, or publish artifacts.

Environment and setup evidence

From src\frontend, ran the documented lightweight development command:

pnpm dev --host 127.0.0.1 --port 4329

Observed result: pnpm automatically restored dependencies before starting the development command. It reported:

Lockfile is up to date, resolution step is skipped
Packages: +853
Done in 17s using pnpm v11.9.0

Therefore, contrary to the anticipated missing-dependency failure, this invocation did not fail for missing dependencies. I did not subsequently run a separate install command.

The first browser navigation returned ERR_CONNECTION_REFUSED while initialization continued. Retrying after content synchronization succeeded.

Checked exact-head CI artifact availability:

gh api repos/microsoft/aspire.dev/actions/runs/39458442338/artifacts

Result:

{"total_count":0,"artifacts":[]}

The documented download attempt:

gh run download 39458442338 --repo microsoft/aspire.dev --name hybrid-api-docs-poc-windows --dir C:\Users\dapine\.copilot\session-state\f8eb589b-6f1f-4b7b-b60b-a05dcf94fbdd\files\hybrid-api-docs-poc-windows

returned:

no valid artifacts found to download

No further download attempts or production builds were made.

Important provenance limitation: Git HEAD was verified at the requested SHA before and after testing, but the development command printed:

git env updated: commit=73158d1929860ac896485d12ad0d5d8cd5991b57

Rendered pages also displayed SHA 73158d1. I did not investigate implementation to explain that discrepancy. These are observations against the server launched from the exact-head worktree, not proof that its displayed build metadata correctly identifies that head.

Summary

Counts represent sampled route checks or explicitly described search scenarios—not exhaustive site coverage.

Category Passed Failed Remaining
API HTML routes 12 0 Other types/packages not exhaustively tested
Markdown companions for existing HTML pages 2 6 Other companions untested
API-search JSON endpoints 4 0 Other package/module indexes untested
Search scenarios 8 0 Version/kind filters and keyboard behavior untested
Code-example compilation/execution 0 0 Not run
Production hybrid runtime/cache/failover 0 0 Blocked: no downloadable artifact

The separately supplied /reference/api/typescript/aspire/ family returned 404; the browsed landing page actually linked to /reference/api/typescript/aspire.hosting/. This is recorded as a scope discrepancy, not automatically a PR defect.

Critical issues

1. Linked nested Markdown companions return 404 in the development server

Location: C# package/type/member-group pages and TypeScript module/item pages
Type: Link / Markdown
Severity: Critical for the affected Markdown workflow in the tested development environment
Production status: Unverified; not established as a production hybrid regression.

What the interface offers:

View in Markdown

The rendered module/package pages linked to:

/reference/api/csharp/aspire.hosting.md
/reference/api/typescript/aspire.hosting.md

Reproduction:

  1. Open /reference/api/csharp/aspire.hosting/.
  2. Click Open.
  3. Click View in Markdown.
  4. Inspect the newly opened tab.
  5. Repeat for /reference/api/typescript/aspire.hosting/.

Actual results:

Origin Opened destination Body
C# package /reference/api/csharp/aspire.hosting.md/ API package not found
TypeScript module /reference/api/typescript/aspire.hosting.md/ API module not found
TypeScript createBuilder /reference/api/typescript/aspire.hosting/createbuilder.md/ API item not found

Browser-session HTTP requests independently confirmed these six Markdown failures:

Requested route Status Body
/reference/api/csharp/aspire.hosting.md 404 API package not found
/reference/api/csharp/aspire.hosting/distributedapplication.md 404 API type not found
/reference/api/csharp/aspire.hosting/distributedapplication/methods.md 404 API member group not found
/reference/api/typescript/aspire.hosting.md 404 API module not found
/reference/api/typescript/aspire.hosting/createbuilder.md 404 API item not found
/reference/api/typescript/aspire.hosting/createbuilderoptions.md 404 API item not found

The root companions worked:

  • /reference/api/csharp.md: 200, text/markdown; charset=utf-8
  • /reference/api/typescript.md: 200, text/markdown; charset=utf-8

Expected: The action should open the Markdown representation of the corresponding existing HTML page.

Recommended action: Reproduce these exact links against the production hybrid artifact/StaticHost before deciding whether the defect is development-only or also release-blocking.

Warnings

1. Production hybrid claims were not exercised

Location: CONTRIBUTING.md, “Hybrid API documentation POC”

The documentation explicitly distinguishes the modes:

Setting a runtime flag alone cannot convert an already-static artifact.

The instructions appropriately direct full-site comparisons to CI and explain platform-specific artifacts. However, the required Windows artifact was unavailable.

A normal development server is not evidence for:

  • On-demand production rendering through StaticHost.
  • Astro response-cache capacity, expiry, authorization bypass, or reuse.
  • Negotiated Markdown forwarding and private/Vary headers.
  • Worker readiness or health endpoints.
  • Standby retry, timeout budgets, or failure isolation.
  • Restart behavior or deployment/container behavior.

No pass or failure is assigned to those production claims.

As an explicitly limited observation, requesting existing HTML routes with Accept: text/markdown from the development server returned text/html, not Markdown. This was not treated as a failure of the documented StaticHost forwarding behavior.

2. Requested TypeScript aspire route does not match the browsed module links

Requested route family:

/reference/api/typescript/aspire/
/reference/api/typescript/aspire.md
/reference/api-search/typescript/aspire.json

Observed: All returned 404. The HTML/module Markdown requests reported API module not found; the search endpoint returned an HTML 404 response.

What the landing page actually linked:

/reference/api/typescript/aspire.hosting/

Its corresponding search JSON endpoint returned 200.

Suggestion: Align the review inventory with the actual linked module slug. I found no browser evidence that the landing page advertises the unavailable aspire route.

3. TypeScript function counts are inconsistent between landing and module pages

Location:

  • /reference/api/typescript/
  • /reference/api/typescript/aspire.hosting/

Observed text:

  • Landing-page Aspire.Hosting card: 493 functions, 152 types
  • Module header: 234 Functions, 152 Types
  • Module search summary: 152 types and 241 members

The interface does not explain the different counting scopes. A reader cannot tell whether these are different categories or incomplete inventories.

Suggestion: Explain the counting distinction or make the displayed totals consistent. No implementation cause is inferred.

4. Development-console noise and metadata mismatch limit confidence

Initial load produced several 504 (Outdated Optimize Dep) errors for development-toolbar modules. Subsequent pages also requested:

/api/live/          → 404
/api/live/stream/   → 404

Despite these errors, sampled API navigation and search worked. These are environment observations, not established production defects.

The displayed SHA 73158d1 mismatch described above should be resolved before treating screenshots or page metadata as reliable exact-head attribution.

Passed checks

HTML navigation and content

All twelve routes loaded with appropriate API page content:

C#:

/reference/api/csharp/
/reference/api/csharp/aspire.hosting/
/reference/api/csharp/aspire.hosting/distributedapplication/
/reference/api/csharp/aspire.hosting/distributedapplication/methods/
/reference/api/csharp/aspire.hosting/distributedapplication/constructors/
/reference/api/csharp/aspire.hosting/distributedapplication/properties/

Verified these member targets existed:

methods/#createbuilder
constructors/#constructor-ihost
properties/#services

TypeScript:

/reference/api/typescript/
/reference/api/typescript/aspire.hosting/
/reference/api/typescript/aspire.hosting/createbuilder/
/reference/api/typescript/aspire.hosting/createbuilderoptions/
/reference/api/typescript/aspire.hosting/distributedapplication/
/reference/api/typescript/aspire.hosting/distributedapplication/run/

Followed actual search-result and member links, including:

  • C# search → DistributedApplication.
  • TypeScript module search → createBuilder.
  • TypeScript DistributedApplication → run.

Sampled API HTML links were site-relative and used trailing slashes before optional anchors.

Search behavior

Eight sampled scenarios passed:

  1. C# global DistributedApplication search returned relevant type results.
  2. C# package CreateBuilder search returned three overload results.
  3. TypeScript global createBuilder search returned createBuilder and CreateBuilderOptions.
  4. TypeScript module createBuilder search returned those relevant entries.
  5. C# unmatched query displayed “No matching API entries” and a clear-search action.
  6. TypeScript unmatched query displayed the equivalent state.
  7. C# query persisted after reload.
  8. TypeScript query persisted after reload.

Search updated the URL using ?q=....

Search JSON endpoints

Browser-session requests returned 200 with JSON content types:

/reference/api-search/csharp.json
/reference/api-search/csharp/aspire.hosting.json
/reference/api-search/typescript.json
/reference/api-search/typescript/aspire.hosting.json

Responses contained API-entry arrays. This confirms availability and basic response shape, not exhaustive index completeness.

Root Markdown

Both root .md routes returned Markdown with a heading and package/module links.

Teaching effectiveness

  • Landing pages clearly identify the language and API scope.
  • Package/module badges expose package name and version.
  • C# type pages provide declaration, remarks, member groups, and links.
  • C# CreateBuilder member documentation includes an explicit deployment-related overload caveat.
  • TypeScript member pages expose signatures, parameters, optionality, and the defining handle.

These are useful reference-navigation features. They do not establish that examples compile or that a beginner can create an application from these pages alone.

Knowledge gaps

TypeScript entry-point usage

Observed: The createBuilder page shows:

interface any {
  // ... omitted for brevity
  createBuilder(): IDistributedApplicationBuilder;
}

and:

This method applies to the following types:
TYPE
any

What a new reader still needs: Where createBuilder comes from, how to import/call it, and how this reference relates to an apphost.ts entry point.

Source awareness: I did not use prior Aspire knowledge to supply an invocation or compile a substitute example.

Recommendation: Link to a minimal TypeScript AppHost example or explain the displayed any receiver.

C# example prerequisites

The DistributedApplication remarks show an example containing:

builder.AddProject<Projects.InventoryService>()
       .WithReference(inventoryDatabase);

What a new reader still needs: The project/setup context providing Projects.InventoryService and the relevant integrations.

Source awareness: Prior .NET knowledge could fill that context, but I did not do so or claim the snippet is independently runnable.

Recommendation: Link to the prerequisite tutorial or label the example’s assumed project context. This is reasonable supplementary guidance for a reference page, not evidence that the API is incorrect.

Remaining scope

Not evaluated:

  • Production hybrid artifact startup, StaticHost routing, cache behavior, resilience, health, deployment, or resource measurements.
  • Static-versus-hybrid output equivalence.
  • API correctness against product source.
  • Code compilation, package installation, or sample execution.
  • Every package/type/member and every internal/external link.
  • Full search-index completeness, version/kind filtering, keyboard accessibility, or responsive layouts.
  • Copy Markdown clipboard contents.
  • Markdown companions beyond the explicitly listed samples.

Recommendations

  1. First: Reproduce nested Markdown failures against an exact-head Windows hybrid artifact when available.
  2. Resolve the development-server SHA metadata discrepancy before relying on rendered provenance.
  3. Clarify TypeScript function/member counting and entry-point usage.
  4. Keep production hybrid approval explicitly pending; development navigation/search success cannot substitute for that validation.

Cleanup

  • Closed browser session blind1874; playwright-cli list reported no browsers.
  • Stopped my development server using its tracked shell session.
  • Verified no listener remained on port 4329.
  • The development command regenerated four tracked .starlight-icons files; restored those generated changes.
  • Final git status --short was empty.
  • Final HEAD remained 356691770b60a23bc6f52c12bcb957ddbe9cd9ae.
  • No commits, checkout changes, global installations, comments, or published artifacts.

@IEvangelist

Copy link
Copy Markdown
Member Author

Project code review

Inspected: PR #1874, base release/17.0 / a458f6938f46cd80dfcdce2b45df7d0c97cbdb96, head 356691770b60a23bc6f52c12bcb957ddbe9cd9ae. Posted after the combined documentation report. This is a top-level conversation comment, not an approval or change-request review. It is the one lifetime code-stage report; a new commit does not automatically authorize another review.

Scope: All 79 changed files were inspected, including the dependency-lock delta; generated dependency metadata was checked for configuration consistency rather than reviewed as hand-written application logic. Traced the AppHost run/publish split and sidecar model, Docker payload/CI uploads and gates, Astro route selection and artifact generation, both API languages' HTML/Markdown route resolution and identities/aliases, four static search endpoints and browser loading/retry/navigation, and StaticHost artifact validation, routing/middleware order, worker selection/cooldown, single-flight requests, buffering/cancellation, validators/cache headers, health and error paths. Contributor prose was handled in the preceding docs stage. The repository's .agents/skills/code-review/SKILL.md was read and followed; the named skill loader itself does not register code-review.

Result: Changes are not clean: one newly confirmed user-facing defect, one user-facing coverage gap, and one additional platform-fixture defect below, plus existing blockers that still apply. Static review covers the full actual diff; production-artifact validation remains limited as explicitly described below.

High

src/frontend/src/utils/api-route-data.ts:6-11,17-27 - Nested API Markdown breaks in the normal development workflow. Confidence: 10/10.

The new route hook opts nested .md.ts endpoints out of prerendering, so their getStaticPaths() props are no longer populated. In development, src/middleware.ts:35-38 deliberately redirects ...thing.md to ...thing.md/. The six changed Markdown endpoints now fall back to resolveCSharpApiRoute(url.pathname) / resolveTypeScriptApiRoute(url.pathname), but the shared map contains only the unslashed .md spelling and performs an exact lookup. The result is a 404 for an existing API page's Markdown.

Why it matters: Contributors using the AppHost's normal Vite workflow cannot use View in Markdown / the nested Markdown representations. The independently blind tester followed the actual UI actions and reproduced six failures, including /reference/api/csharp/aspire.hosting.md -> .md/ -> API package not found, and the corresponding TypeScript module/item routes. Root Markdown works. This is a confirmed development regression, not an assertion that production hybrid Markdown fails: production disables this redirect and StaticHost canonicalizes .md/ to .md.

Suggested fix: Normalize the development .md/ spelling to the catalogue's .md key in the shared resolver (without removing HTML directory slashes), or otherwise make middleware and lookup agree. Cover slashed and unslashed C#/TypeScript package/type/member Markdown with empty props, and keep a dev-browser action check. The current new unit test exercises only an unslashed URL and therefore misses the integration failure.

src/statichost/StaticHost/HybridApiDocs/HybridApiDocsErrorPages.cs:7-16 and src/frontend/playwright.hybrid.config.mjs:3-8 - The new outage/retry page has no browser or axe coverage on the supported viewport projects. Confidence: 9/10; this is a coverage finding, not a claimed accessibility violation.

Why it matters: This is a new standalone user-facing page with two navigation/retry actions and its own fixed styling. The .NET tests check response text/headers, and the acceptance harness checks text during worker outages, but neither tests keyboard/retry behavior, narrow-screen usability, or WCAG output. The new hybrid browser spec exercises healthy navigation only, and its separate config has no desktop/tablet/mobile projects or axe scan. The regular three-project suite does cover ordinary API navigation/search; that does not exercise the outage document.

Suggested fix: Extend the controlled worker-outage harness/browser scenario to load this page, exercise retry and Back to the docs, check overflow/focus at the existing desktop/tablet/mobile viewports, and run the repository-standard wcag2a/wcag2aa axe assertion. Also cover all-workers-return-5xx, not only stopped/refused workers, so the existing exhaustion blocker cannot silently persist.

Medium

tests/StaticHost.Tests/HybridApiDocsTests.cs:450-454,499-503 - New StaticHost fixtures still manufacture a Linux artifact on macOS. Confidence: 10/10.

Why it matters: HybridApiDocsArtifact.cs:29 requires darwin on macOS, but the successful-start fixture and shared HybridHost.StartAsync() fixture use OperatingSystem.IsWindows() ? "win32" : "linux". On macOS those fixtures throw Incompatible hybrid API documentation manifest before their assertions, affecting the host-based tests and StartsWithAnArtifactInAnyEnvironment. This is not a failure observed on the Windows review host; it is the deterministic mismatch between the platform branches. The prior generic comment pointed to an older AppHost fixture that no longer exists in that form, so this is new current-location evidence rather than a duplicate of that outdated anchor.

Suggested fix: Use the same Windows/macOS/Linux selection as the production manifest validator in successful StaticHost fixtures. Keep the intentionally invalid-artifact test separate.

Existing generic-review findings, re-evaluated at this head

No duplicate inline comments or threads were created.

Existing thread Current status and evidence
Partial hybrid artifact publication Still applicable. .github/workflows/hybrid-api-docs-poc.yml:135-143 uploads the ordinary Linux artifact under always() even after a partially emitted failed build. The regular frontend upload has a successful-build guard, but this acceptance upload does not. Gate it on successful artifact construction, while retaining unconditional diagnostic uploads.
Static versus on-demand pages Still applicable. Landings/Markdown and JSON indexes are prerendered; contributor prose says otherwise. Covered with exact source evidence in the docs report.
Outdated cache contract Still applicable. Validator short-circuiting, shared in-flight requests, no-cache/ETag, and stripped Authorization contradict the walkthrough. Covered in the docs report; current tests confirm the implementation rather than the old prose.
Failed emoji download cache opt-out Obsolete for the inspected diff. The cited og-build-cache.ts and incremental-build wrapper are absent at this head. Do not retain it as an outstanding defect in code removed by the revert.
Directory redirect index aliases Still applicable; reproduced against the actual artifact class. /cli/ is configured, but /cli/index.html is neither canonicalized nor registered as a redirect (HybridApiDocsArtifact.cs:53-61). The old static redirect file is no longer emitted, so the request has no remaining redirect path. The probe returned directoryRecognized=true, indexCanonicalized=false, indexRedirected=false.
All renderers returning 5xx Still applicable; reproduced against the actual renderer class. With two matching-build workers returning 500, both were called, then StaticHost returned 500, body API rendering failed, and no Retry-After, rather than the gateway retry page. HybridApiDocsRenderer.cs:143-162 passes the final 5xx through as Unavailable=false.
macOS AppHost fixture platform Old location obsolete. Current AppHost tests validate Linux publishing and no longer contain the cited local-worker theory. A separate current StaticHost fixture mismatch is identified above; the old AppHost anchor should not be treated as evidence that its current four tests fail.

Verification and limitations

  • Passed: dotnet test tests\StaticHost.Tests\StaticHost.Tests.csproj --filter FullyQualifiedName~HybridApiDocs --nologo - 45/45; dotnet test tests\Aspire.Dev.AppHost.Tests\Aspire.Dev.AppHost.Tests.csproj --filter FullyQualifiedName~HybridApiDocs --nologo - 4/4. Dependencies were restored after missing-assets failures, not preemptively changed.
  • Passed: From src\frontend, pnpm exec vitest run --config vitest.config.ts tests/unit/hybrid-api-docs.vitest.test.ts tests/unit/hybrid-native-cache.vitest.test.ts tests/unit/api-search-index-loading.vitest.test.ts tests/unit/api-search-lifecycle.vitest.test.ts tests/unit/api-markdown.vitest.test.ts tests/unit/astro-vite-config.vitest.test.ts tests/unit/build-performance.vitest.test.ts tests/unit/ts-api-route-catalog.vitest.test.ts - 8 files passed; 105 tests passed, 1 skipped.
  • Reproduced: An isolated scratch console harness, referencing the actual inspected StaticHost project, exercised its artifact lookup and renderer with two matching-build synthetic failing workers. It confirmed the two existing runtime blockers above. This is focused actual-class evidence, not a production-container/artifact or Azure-deployment test.
  • Independent browser evidence: The preceding docs report preserves twelve sampled HTML routes, eight search scenarios, four JSON endpoints, and the six development Markdown failures. No new browser run was substituted for production runtime validation.
  • Not green: Exact-head CI run 39458442338 has failed desktop/tablet/mobile shard 1/2 jobs and failed frontend/CI gates. Logs show tests/e2e/dev-layout.spec.ts:5 timing out at page.waitForLoadState('networkidle'). The built host now supplies a real live-status/SSE service, so this network-idle assumption warrants investigation, but no baseline/control was run, and I am not asserting that the PR introduced those failures or dismissing them as unrelated. The same run's focused hybrid acceptance, Windows artifact, frontend build/validation, and AppHost build jobs succeeded.
  • Not run: Full production site build, full local e2e/axe suite, real production cache expiry/recovery/containers, macOS execution, or Azure provisioning/deployment. The exact-head run currently exposes zero retained artifacts. No full build was attempted to replace them, so these runtime limits remain explicit.
  • Provenance clarification: The blind tester reported a rendered SHA different from HEAD. The unchanged scripts/write-git-env.mjs:25-33 deliberately uses the merge-base with public main, not HEAD. The review checkout was separately verified at the requested SHA; the displayed badge is not exact-head evidence and was not used as such.

Test coverage

Unit / .NET: Strong coverage exists for catalogue identity/aliases, request-time Markdown, native LRU/cache/error exclusions, search loading/retry/cancellation/lifecycle, manifest generation, single-flight rendering, HEAD and negotiation isolation, buffering/compression, endpoint selection/failover and host readiness. The new development .md/ lookup failure, final-all-worker-5xx gateway contract, directory redirect index alias, and macOS successful fixtures are not adequately covered by the passing assertions.

E2E: Regular API navigation, filters/recovery, Markdown and overflow scenarios run on the existing desktop, tablet and mobile projects through built StaticHost in CI. The dedicated healthy hybrid acceptance spec uses a separate single-project/default-viewport config. The new outage UI has no browser scenario.

Accessibility: Existing WCAG and API-search-control axe checks remain, including the C# landing audit and shared search controls. No axe assertion exercises the new standalone gateway outage page. Existing CI failures and unavailable production artifacts prevent an unqualified runtime sign-off.

David Pine (IEvangelist) pushed a commit that referenced this pull request Nov 1, 2026
…t of order (#2007)

## Summary

Fixes a site search bug that also caused an intermittent E2E failure.
When Pagefind results render out of order, the dialog highlights a later
result instead of the first one. Pressing Enter then opens that wrong
result.

**CI evidence:** the test "arrow keys cycle through results, Tab keeps
state, and Escape closes the dialog" passed only on retry on tablet in
[run 41162894318, job
124426002917](https://github.com/microsoft/aspire.dev/actions/runs/41162894318/job/124426002917).
It hit the same failure once more in the Oct 27–30 retry-only scan:

```
expect(locator).toHaveAttribute(expected) failed
Locator:  locator('site-search dialog[open]').locator('.pagefind-ui__result-link').first()
Expected: "true"   (data-search-active)
Received: ""
14 × locator resolved to <a role="option" aria-selected="false" id="aspire-search-target-0" href="/diagnostics/aspire009/" ...>
```

**Root cause:** Pagefind UI 1.5.2 renders each result's
`.pagefind-ui__result-link` only after that result's own fragment loads,
so links can appear out of order. `SearchKeyboardNav.refresh()` in
`Search.astro` then went wrong in two ways:

1. **Wrong result kept.** When a later result rendered first, it was
auto-highlighted. On the next render, when result 1 appeared, the
"preserve previous link" branch kept that later result, as if the user
had navigated to it.
2. **First result marked unselected.** `activeIndex` still held the old
index while `targets` was already the new list. `setActive` therefore
"cleared" whichever new target sat at that index, which set
`aria-selected="false"` on result 1.

**Fix (`Search.astro`):**
- Only preserve a highlight the user moved with arrow keys, Home/End or
focus/Tab. A new query (`input` event) resets this, and auto-highlights
always go to the first result.
- Re-index the previously active element in the new target list before
calling `setActive`, so the correct element is cleared.

The intended preservation still works: after ArrowDown/Tab, re-renders
keep the user's selection. The existing arrow-key, Tab and API-button
navigation tests are unchanged and pass.

**Regression test (`site-search.spec.ts`):** "auto-highlights the first
result when later results render first". It holds the first
`pagefind/fragment` request until a later result has rendered and been
highlighted, then releases it. It asserts that:
- result 1 gets `data-search-active="true"` and `aria-selected="true"`
- exactly one target is active
- `aria-activedescendant` points at result 1
- Enter opens result 1's URL

The test uses request gating, not sleeps or timeouts.

**Review follow-up (c6e30bb):** focusing a result that was already
auto-highlighted did not count as user navigation, so an earlier result
that loaded later could take the highlight while focus stayed on the
focused result. `handleFocusIn` now marks any focused target as user
navigation and only calls `setActive` when the index changes. The second
regression test, "keeps the highlight on a focused result when an
earlier result renders later", covers this.

**Screenshots:** Playwright, tablet 1024×768, light theme, search
`aspire` with the first fragment held and then released.

Before (main): the second result (ASPIRE010) stays highlighted.

![Before, tablet 1024x768, light theme: second result ASPIRE010
highlighted](https://github.com/user-attachments/assets/377e83f7-70f4-44ae-8c09-64f4d356bb3d)

After: the first result (ASPIRE009) is highlighted.

![After, tablet 1024x768, light theme: first result ASPIRE009
highlighted](https://github.com/user-attachments/assets/16020765-9592-4e81-a51b-92046ca10413)

## Third-party links and affiliations

None.

## Validation

Local runs used `astro preview` serving main's CI `frontend-dist`
artifact (run 41090849945, `f05f5561`), with retries disabled. The
extraction excluded `reference/` and most locale folders for disk space.

- **Fail-before (main build):** the new test failed 9/9 across desktop,
tablet and mobile (×3 each). It failed at
`toHaveAttribute('data-search-active', 'true')` and the element was `<a
role="option" aria-selected="false" id="aspire-search-target-0"
href="/diagnostics/aspire009/">`, identical to the CI failure. The
existing arrow-key test passed 9/9 in the same run.
- **Probe on main:** with only the first fragment delayed, 3/3 runs
highlighted result 5 (the second page) and left link 0 at
`aria-selected="false"`. At natural timing, 3/3 were correct.
- **Pass-after:** the same change was applied to the built `Search`
chunk. The new test and the arrow-key test passed 30/30 (×5 on each of 3
viewports).
- **Full spec:** `site-search.spec.ts` on all 3 projects gave 42 passed
and 6 skipped. 6 failed, all from 2 tests that need the omitted
`/reference/` API pages ("initializes when entering from API pages",
"typed query is forwarded…"). Both fail identically on the unpatched
main build in the same setup, so the failure comes from the local setup,
not this change. CI covers them with the full build.
- **Review follow-up (built from PR head 41ba000, same setup):**
without the focusin fix, the second test failed 9/9 on desktop, tablet
and mobile: the first result got `data-search-active="true"` while focus
stayed on the later result. With the fix applied to the built chunk,
both new tests and both arrow-key tests passed 60/60 (×5 on 3
viewports).
- **Lint and units:** `npx eslint . --max-warnings 0` is clean, and `npx
vitest run` passed 84 files with 1,120 tests passed and 1 skipped.
- **Overlap:** no open issue or PR covers this. #1874 only rewords
`test.skip` messages in this spec.

**🤖 Posted by AspireAgent (AI Agent)**

---------

Co-authored-by: davidfowl <[email protected]>
Co-authored-by: Copilot <[email protected]>

@IEvangelist David Pine (IEvangelist) left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[partial - phase A: 5 of 12 contributor-contract groups evaluated; phase B: complete available source-blind report, production walkthrough incomplete]

Automation: user-approved hourly local documentation PR reviewer for David Pine (@IEvangelist). This is its single combined report for this PR, even though partial; it will not automatically repeat after later commits.
Inspected head: 356691770b60a23bc6f52c12bcb957ddbe9cd9ae; target release/17.0 at a458f6938f46cd80dfcdce2b45df7d0c97cbdb96. All 79 changed-path diffs and content identities were preserved. This review covers contributor documentation accuracy and affected API-documentation user experience, not a general code review or certification of every changed implementation/test.
Trusted policy: default-branch doc-pr-reviewer, doc-tester, playwright-cli and relevant Astro instructions at 9bf972c559d50ab5fdc73f0da5318959aa6be757. Native reviewer loading was unavailable, so trusted file policy was executed directly for doc-pr-reviewer https://github.com/microsoft/aspire.dev/pull/1874. PR-head review policy was not authoritative.
Owning sources: microsoft/aspire.dev inspected implementation 356691770b60a23bc6f52c12bcb957ddbe9cd9ae, because these claims concern this website's build wrappers, route modes and workflow/configuration surfaces. Matching microsoft/aspire release/17.0 at 55867ce9d33c8800e6c7278f7edc5e88e0f6b839 was pinned read-only for CLI context; no positive CLI/runtime verdict is inferred from that pin. The core product repository is not substituted for the website's owning implementation.

Claim counts: 12 contributor paragraph/command contract groups: 2 verified, 0 verified-with-nuance, 3 contradicted, 0 unverifiable, 0 narrative, 7 not evaluated. Counts are grouped contracts, not individual sentence/API-symbol counts. The complete added contributor section is catalogued with original line ranges/text and exact diff. A bundled contract is not cleared from one verified subassertion. The other 78 changed paths are executable hosting/route/CI/config/test scaffolding; preserving their diffs is not a claim of exhaustive source or behavioral verification.
Independent Phase B: rendered exact-commit CONTRIBUTING plus 21 distinct local requested paths: C#/TypeScript search, core/Toolkit HTML details, public search indexes, advertised Markdown links, settled new-tab/history/page-swap interaction and representative 375px layout. 0 critical issues, 2 warnings: unavailable documented build-wrapper discovery and dev-only Markdown failures. Fourteen grouped checks passed; no production hybrid success is inferred.

Why this is partial, not approval

Seven source-contract groups and required end-to-end hybrid production behavior remain unfinished. The independent report below records what a reader could actually do and what the bounded dev-server browser walkthrough did, without access to Phase A or product/implementation sources. Dev HTML/search/Markdown success does not establish a published Node/StaticHost artifact, readiness/failover/cache/header behavior, platform-specific packaging, or deployment. Full-site builds, AppHost/certificate-store actions, remote workflow dispatches, registry pushes and cloud provisioning were not performed. Incomplete required validation yields the skill's labeled partial COMMENT, even with source-backed documentation contradictions; it is not an approval or a completed REQUEST_CHANGES verdict. This PR is also authored by David Pine (@IEvangelist), so GitHub self-approval is prohibited; no identity switch was attempted.

Phase A - frozen owning-source checks

C01 - normal builds are no longer fully static or opt-in.

The normal build remains fully static. Opting in with ASPIRE_HYBRID_API_DOCS=1 at build time...

At inspected 356691770b60a23bc6f52c12bcb957ddbe9cd9ae, Astro's top-level config unconditionally selects the Node middleware adapter and hybridOutputDirectory(...). The integration sets matching API routes to prerender = false, and its build-done hook writes the hybrid manifest unconditionally. These are owning website implementation checks, not an inference from the PR description.

Please update this contributor section for the current default hybrid architecture. The documented static-default/opt-in distinction no longer describes the ordinary build. No full build or production deployment was run to manufacture a runtime pass.

C02 - the two language API search/landing pages are deliberately prerendered.

This includes both API search pages.

The owning route selector explicitly excludes csharp/index.astro, typescript/index.astro and their language-level Markdown endpoints from its on-demand override; the route hook only sets prerender = false for matches. The source comment explains that the heavy landing pages remain prerendered. Please distinguish these landing/search pages from on-demand detail pages rather than promising all API HTML and Markdown are on demand. This finding is pinned to 356691770b60a23bc6f52c12bcb957ddbe9cd9ae; a dev-server rendering sample alone cannot prove production rendering mode.

C03 (also the command subassertion of C02) - the recommended build wrappers do not exist.

The convenience command build:hybrid ... build:hybrid:skip-search ... Use build:hybrid, not the static-only build:statichost command...

The inspected frontend script surface has ordinary build, build:skip-search and build:production entries and serve:hybrid; none of build:hybrid, build:hybrid:skip-search or build:statichost is defined. Please document the actual current entry points instead of wrappers removed from this head. No full-site build was executed; this is an exact manifest command-surface check, not a claim that a production build succeeded.

Unevaluated contract inventory

ID CONTRIBUTING.md lines Contract still not cleared
C05 46-51 Label/manual POC performs dual-mode comparisons and measured results without duplicated ordinary build. Full exact CI comparison/output/trigger contract and measurements not exhaustively evaluated. No remote dispatch or label mutation.
C06 53-59 Download named Windows artifact, set opt-in flag, and aspire start to launch hybrid site. Artifact/run-id availability and literal Windows start flow not exercised; no AppHost/certificate or remote workflow action. Do not clear the combined command sequence from partial metadata.
C07 61-71 Artifacts are platform-specific/private and normal AppHost startup runs two Node workers without rebuilding. Many combined startup/privacy/platform subassertions remain unverified. Run/publish distinction requires careful comparison; no assumption one branch proves both.
C08 73-78 Native cache has128entries/30minutes, no coalescing guarantee,64MiB forwarded buffer/no-store and authorization/cookie rules. 128-entry config and1800-second middleware values were read, but this entire bundled caching/forwarding/auth contract was not exhaustively cleared. No native package/cache-concurrency guarantee inferred.
C09 80-85 Readiness, matching standby retries, timeout budget, health endpoints, fault isolation and cache restarts behave as described. No production artifact or actual worker/failover lifecycle run; static inspection alone did not exhaustively verify this grouped contract.
C10 87-94 Redis/deploy unchanged; publishes sidecars, image parameter, no shared volumes/CI provisioning; bundled-image4096limit. Exact publishing/provisioning/image restrictions and unchanged-behavior claims remain unevaluated. No Azure resource/image registry/container execution.
C12 99-103 Unsetting ASPIRE_HYBRID_API_DOCS returns ordinary Vite/local workflow. No environment-toggle experiment or AppHost execution performed. Do not infer this runtime behavior from unrelated production config inspection.
Verified / verified-with-nuance catalog entries (2 verified, 0 nuance)

C04, lines 39-44 - verified: Use the Frontend Build workflow hybrid_api_poc manual input instead of full local builds.
Owning source at 356691770b60a23bc6f52c12bcb957ddbe9cd9ae: .github/workflows/frontend-build.yml:workflow_dispatch.inputs.hybrid_api_poc,jobs.hybrid-api-poc. Workflow defines the exact boolean manual hybrid_api_poc input and passes control to the gated renderer/container acceptance workflow. This verifies declarative workflow availability, not executing a dispatch or its outcomes.

C11, lines 96-97 - verified: HybridApiDocsArtifactDirectory config overrides the default artifact directory.
Owning source at 356691770b60a23bc6f52c12bcb957ddbe9cd9ae: src/apphost/Aspire.Dev.AppHost/HybridApiDocsExtensions.cs:15-16. Owning docs-site helper reads builder.Configuration["HybridApiDocsArtifactDirectory"] and falls back to Path.Combine(frontendDirectory,"dist-hybrid"). Verifies static configuration selection in this helper, not completed publish/runtime execution.

No current-release SDK/package/CLI version literal was added in this contributor section, so version-placeholder findings do not apply. Independent tester observations are combined below without retroactively converting incomplete source groups into verified contracts.

Phase C reconciliation of the tester's cleanup caveat: the nominal root script listing unexpectedly invoked the existing install lifecycle inside this automation-owned clone. No install command was deliberately requested by the tester, and no further package-manager command was used after recognition. The parent inspected the resulting status: the root pnpm-lock.yaml raw and filtered Git blob IDs both exactly equal the inspected index object 9b60ae1782d6de40a88f604fe40efd8a127d3418; its actual diff is empty. The four generated icon-file changes were already present in the parent's pre-test dev-startup status and are known exact cleanup targets. This does not erase the incident or rewrite the frozen tester report; it resolves attribution without silently discarding an unknown lockfile edit. Owned process/generated-path cleanup is handled separately, not counted as a documentation pass.

Phase B - independent, source-blind doc-tester report (complete available report)

Documentation Test Report

Focus Area: Independent, source-blind Phase B for microsoft/aspire.dev PR #1874; changed CONTRIBUTING.md “Hybrid API documentation POC” and affected public C#/TypeScript reference surfaces.
Date: 2026-11-02 America/Chicago; browser evidence 2026-11-03T00:22–00:31Z.
Tester: doc-tester agent, independent context.
Status: Frozen Phase B result. Browser walkthrough completed; production hybrid contributor walkthrough is capability/safety-blocked, not validated.

Review identity and independence

  • PR: #1874
  • Target supplied by coordinator: release/17.0; author supplied: IEvangelist. No approval, comment, claim, push, merge, or app-session message performed.
  • Actual isolated checkout HEAD, verified at beginning and end: 356691770b60a23bc6f52c12bcb957ddbe9cd9ae.
  • Checkout: C:\Users\dapine\.copilot\session-state\b1028536-a0cc-461b-98cb-21c8f8fc8a89\files\aspire-dev-automation.
  • Policies read with git show at trusted default-policy commit 9bf972c559d50ab5fdc73f0da5318959aa6be757: doc-tester, playwright-cli, necessary doc-pr-reviewer Phase B instructions. PR-head policy was not used.
  • Inputs: supplied 79-path changed-file list, filename fields only, and changed contributor section lines 29–103. No diff patches, Phase A artifacts, product implementation, authored tests, workflow implementation, or linked product-source pages were read to learn expected behavior.
  • Documentation read as rendered in Edge at https://github.com/microsoft/aspire.dev/blob/356691770b60a23bc6f52c12bcb957ddbe9cd9ae/CONTRIBUTING.md#hybrid-api-documentation-poc. The rendered section was reachable; raw changed Markdown was also read, but was not needed as a render fallback. Evidence: contributor-rendered.txt, contributor.png.
  • Browser exclusively global playwright-cli, named session pr1874, tracked .playwright\cli.config.json selecting Edge, private profile under this evidence directory. run-code/eval inspected DOM or public HTTP responses, never implementation.
  • Local URL: http://localhost:4321/, parent-owned root bun run dev. Server was available on the first local navigation. Tester did not start/restart/stop it.
  • Rendered footer/body metadata showed 73158d1, not checkout HEAD. This stamp was not used to identify the checkout. Actual Git HEAD is recorded in runtime-final.txt.

Summary

Critical issues: 0. Warnings: 2 — one contributor command-discoverability warning and one dev-only Markdown observation. Neither is represented as a proven production regression.

Category Passed Failed Warnings
Content Accuracy — rendered clarity/identity only 3 0 0
Code Examples — runtime execution not authorized 0 0 0
CLI Commands — discovery only, no hybrid build/launch 0 0 1
Links and browser interaction — grouped checks 11 1 1

Counts are grouped checks, not individual URLs or runtime claims. The one failed check is the four public Markdown links failing in this dev environment; it is W2, not an additional critical issue. Unexecuted steps are not passes. Fourteen grouped checks passed.

Coverage: 21 distinct requested local pathnames: 3 navigation-discovery pages, 10 API HTML pages, 4 advertised Markdown counterparts, and 4 public JSON indexes. Query variants and four redirected final .md/ URLs are additional observations, not extra requested-path counts. One external rendered contributor document was read.

Critical Issues

None established by this source-blind, development-server run. This does not certify hybrid production behavior or make an approval recommendation.

Warnings

W1: Named convenience build commands were not discoverable from either script listing

Location: CONTRIBUTING.md lines 32–37, “Hybrid API documentation POC”.
Type: Contributor CLI discoverability.

What the documentation says:

The convenience command build:hybrid sets the flag only for its child build; build:hybrid:skip-search also skips Pagefind.

Use build:hybrid, not the static-only build:statichost command, for this mode.

What actually happened: The explicitly permitted no-script-argument listings, pnpm --dir <checkout>\src\frontend run and pnpm --dir <checkout> run, did not advertise build:hybrid, build:hybrid:skip-search, or build:statichost. Frontend advertised serve:hybrid, but that is not the documented build command and was not substituted. No build was executed to test availability.

Evidence: Full available-scripts.txt and available-root-scripts.txt; contributor.png shows the exact rendered claim. This is a command-discoverability discrepancy, not an executed build failure or proof of how any implementation works.

Suggestion: Specify the working directory and complete invocation, and make the named convenience commands discoverable at that location. Independently validate the intended invocation in CI; do not ask contributors to discover it by running full-site builds locally.

Important execution caveat: The intended read-only root listing unexpectedly emitted $ pnpm --dir ./src/frontend i, “Already up to date”, and pnpm completion messages before listing scripts. No install command was deliberately requested, but the allowed listing had an installation/lifecycle side effect. No further package-manager command was used after this was recognized. See the safety/cleanup record below.

W2: Advertised Markdown counterparts fail in the available development server

Location: UI-advertised “View in Markdown” counterparts of the core and Toolkit details below.
Type: Observed local link failure; production attribution unverified.

The following links were derived from rendered page anchors, not constructed from implementation knowledge:

Advertised path Final URL path Observed response
/reference/api/csharp/aspire.hosting.redis/redisbuilderextensions.md same path plus / 404, API type not found
/reference/api/csharp/communitytoolkit.aspire.hosting.redis.extensions/redisbuilderextensions.md same path plus / 404, API type not found
/reference/api/typescript/aspire.hosting.redis/rediscommanderresource.md same path plus / 404, API item not found
/reference/api/typescript/communitytoolkit.aspire.hosting.redis.extensions/withdbgate.md same path plus / 404, API item not found

Browser fetches confirmed the responses, including the final redirect URLs and text/plain body. A browser request for /reference/api/csharp/aspire.hosting.redis/ with Accept: text/markdown returned 200 HTML, not Markdown.

Evidence: public-endpoints.txt, markdown-negotiation-dev.txt, core-markdown.txt, toolkit-markdown.txt, typescript-markdown.txt, markdown-dev-failure.png.

Suggestion: Recheck the exact same public URLs against the matching production hybrid artifact/StaticHost before deciding whether this is a PR defect, a known dev-routing limitation, or both. If development intentionally cannot serve these representations, explain that limitation to contributors. This run cannot validate canonical Markdown delivery, negotiation headers, or HTML/Markdown parity.

Passed Checks

Content Accuracy — three limited rendered checks

  1. Rendered contributor section readable at exact commit: GitHub rendered the changed section and all command blocks; no fabricated local Astro route was used.
  2. Contributor mode distinctions explicit: The text distinguishes build-time opt-in from runtime flags, static artifacts from hybrid artifacts, Windows from Linux artifacts, pre-restored dependencies from startup, and renderer readiness from host liveness. These distinctions were readable; their runtime truth was not established.
  3. Rendered reference version identity present: C# core detail displayed Aspire.Hosting.Redis v13.6.0, net10.0; C# Toolkit detail displayed CommunityToolkit.Aspire.Hosting.Redis.Extensions v13.5.0, net10.0. Corresponding TS pages displayed their package versions. These are rendered-body observations, not installed-runtime compatibility results. A target branch named release/17.0 does not itself prove those API versions are wrong.

Links and browser interaction — eleven grouped checks

  1. Public discovery: Home → Docs → Reference overview exposed both “Search C# APIs” and “Search TypeScript APIs”; both landed on the correct language pages.
  2. C# core HTML chain: Redis result → RedisBuilderExtensions → package and Methods collection rendered names, signatures, parameters, and descriptions.
  3. C# Toolkit HTML detail: Same search exposed the independently named Toolkit RedisBuilderExtensions, rendering its package/version and WithDbGate/WithDbx entries.
  4. TypeScript core HTML chain: Redis module, RedisCommanderResource type, and its withHostPort member rendered. An initial exact-heading wait used the shorter member name and timed out; direct navigation to the already-discovered URL succeeded with actual title RedisCommanderResource.withHostPort. This selector mismatch was not counted as a product defect.
  5. TypeScript Toolkit detail: Global search for DbGate, a term learned from the displayed C# Toolkit member, exposed withDbGate in the Redis Extensions module; its detail rendered optional parameters, return type, and applies-to link.
  6. Global indexes: Browser-observed /reference/api-search/csharp.json and /reference/api-search/typescript.json returned 200 JSON; respective searches produced results.
  7. Scoped indexes and search: Both Redis package/module indexes returned 200. C# WithHostPort and TS withHostPort scoped searches each rendered 3 results. Initial waits incorrectly looked for “Showing” although the actual small-result label was “3 results”; subsequent reads confirmed functioning results. Test-wait mistakes were not counted as product defects.
  8. C# global search/filter/pagination: Redis produced 136 results; “Show 10 more” expanded 10 to 20; Class filter produced 19 results and kinds=class; nonsense query showed “No matching API entries”; the clear control removed query text while retaining the selected kind.
  9. TypeScript global search/pagination/empty state: Redis produced 682 results, expanded from 10 to 20, and a nonsense query showed 0 results with a recovery message. DbGate produced 11 results. A guessed “No results” selector was corrected by reading the actual “No matching API entries” UI, not by reading source.
  10. Lifecycle/new tab/history/cross-language overview path: Fresh tabs loaded both ?q=Redis search URLs with populated inputs/results. After detail navigation, settled Back restored the query and results for both languages; Forward returned to the detail. Early snapshots sometimes caught old titles or loading/empty controls during page swaps; settled checks, including csharp-back-final.txt and typescript-back.txt, succeeded. C# → Reference overview → TypeScript search remained interactive. No direct C#↔TS counterpart link was discoverable on the sampled package/type/member pages; therefore direct counterpart navigation was not certified.
  11. Representative 375px layout: C# search, TS search, and TS detail had viewport/document width 375, with wrapped controls/content and no document-level horizontal overflow. Detail code was contained within its code panel. Screenshots were inspected. No exhaustive accessibility or all-viewport claim is made.

Evidence: csharp-results.txt, core-detail.txt, core-links.txt, core-methods.txt, core-package.txt, toolkit-detail.txt, typescript-search.txt, typescript-detail.txt, typescript-member-direct.txt, typescript-module.txt, toolkit-typescript-search.txt, toolkit-typescript-detail.txt, scoped-index-status.txt, csharp-package-search-final.txt, typescript-module-search-final.txt, csharp-newtab-pagination.txt, typescript-pagination.txt, csharp-filter.txt, csharp-empty-clear-final.txt, typescript-empty.txt, csharp-back-final.txt, typescript-newtab.txt, typescript-back.txt, typescript-forward.txt, cross-language-overview.txt.

Mobile evidence: csharp-search-mobile.png, typescript-mobile.png, typescript-redis-mobile.png, mobile-dimensions.txt, csharp-mobile.txt, typescript-redis-mobile.txt.

Actual Routes Exercised

All local URLs use http://localhost:4321. These are requested paths, not inferred filesystem routes.

# Path Purpose/result
1 / Discovery only; rendered
2 /docs/ Discovery only; rendered
3 /reference/overview/ Public language entry points; rendered
4 /reference/api/csharp/ Landing/search; rendered
5 /reference/api/csharp/aspire.hosting.redis/ Package/scoped search; rendered
6 /reference/api/csharp/aspire.hosting.redis/redisbuilderextensions/ Core detail; rendered
7 /reference/api/csharp/aspire.hosting.redis/redisbuilderextensions/methods/ Core member collection; rendered
8 /reference/api/csharp/communitytoolkit.aspire.hosting.redis.extensions/redisbuilderextensions/ Toolkit detail; rendered
9 /reference/api/typescript/ Landing/search; rendered
10 /reference/api/typescript/aspire.hosting.redis/ Module/scoped search; rendered
11 /reference/api/typescript/aspire.hosting.redis/rediscommanderresource/ Core type; rendered
12 /reference/api/typescript/aspire.hosting.redis/rediscommanderresource/withhostport/ Core member; rendered
13 /reference/api/typescript/communitytoolkit.aspire.hosting.redis.extensions/withdbgate/ Toolkit method; rendered
14 /reference/api/csharp/aspire.hosting.redis/redisbuilderextensions.md Advertised Markdown; redirected .md/, 404
15 /reference/api/csharp/communitytoolkit.aspire.hosting.redis.extensions/redisbuilderextensions.md Advertised Markdown; redirected .md/, 404
16 /reference/api/typescript/aspire.hosting.redis/rediscommanderresource.md Advertised Markdown; redirected .md/, 404
17 /reference/api/typescript/communitytoolkit.aspire.hosting.redis.extensions/withdbgate.md Advertised Markdown; redirected .md/, 404
18 /reference/api-search/csharp.json Global index; 200 JSON
19 /reference/api-search/typescript.json Global index; 200 JSON
20 /reference/api-search/csharp/aspire.hosting.redis.json Browser-discovered package index; 200
21 /reference/api-search/typescript/aspire.hosting.redis.json Browser-discovered module index; 200

Query variants observed: C# ?q=Redis, ?q=Redis&kinds=class, ?q=zzzz1874noresults with/without kind filter, ?kinds=class; C# package ?q=WithHostPort; TS ?q=Redis, ?q=zzzz1874noresults, ?q=DbGate; TS module ?q=withHostPort.

No separate legacy aliases were exposed by the sampled public UI. None were invented or probed using implementation knowledge. Canonical/legacy alias completeness is unverified.

Contributor Walkthrough: Executed vs Not Run

Contributor step/claim What was done What was not run and why
Read new hybrid POC section Exact GitHub rendered commit read and screenshot captured No local route substituted
Choose build-time flag/build convenience command Read distinction; listed available scripts only No full-site build or build comparison: explicitly prohibited locally
Dispatch Frontend Build with YOUR_BRANCH Read command literally No dispatch, label, push, or remote mutation authorized; no branch value invented
Review POC comparison/result artifacts Read expected artifact names in guide No run ID or trusted matching production artifact supplied; no CI result invented
Download RUN_ID Windows artifact Read exact command and platform warning No download or execution of untrusted artifacts; no run ID fabricated
Restore frontend dependencies Read prerequisite; no install deliberately invoked Deliberate restore not authorized/needed; allowed root script listing unexpectedly invoked existing install lifecycle, recorded separately
Set hybrid runtime flag and aspire start --non-interactive Read exact commands Not run: no approved matching Windows production artifact, and AppHost/shared certificates must not be mutated
Inspect private worker readiness and health endpoints Read readiness/liveness distinction No AppHost/private StaticHost runtime available; Astro dev is not a substitute
Cache bounds/lifetime/auth/cookies/negotiation Read claims; public dev Markdown observations recorded Native production cache, private/Vary headers, 64 MiB limit, auth bypass, cookie suppression, cache reset and cold misses not validated
Retry/standby/both-workers-fail behavior Read claimed timing and failure semantics No matching production worker pair; no fault injection against shared environment
Container image build/push and Aspire deployment Read image/parameter and same-Linux-artifact instructions No Docker build, registry push, cloud/App Service/IIS provision or deployment authorized
Alternate artifact directory setting Read setting name No artifact/runtime supplied; mechanism and compatibility not exercised
Unset runtime flag Read PowerShell command No hybrid flag was set, so no environment cleanup command was needed

No aspire/dotnet diagnostics or AppHost command was invoked; therefore no isolated CLI HOME/cache/certificate state was created or needed. No tool install, browser trust, certificate-store, NSS, or machine/current-user trust action was taken.

Knowledge Gaps and Capability Blockers

Knowledge gap: Turning placeholders into a trustworthy matching run/artifact

What I needed to know: Which completed run corresponds to this exact branch/commit, its run ID, which artifact to trust, and how to confirm the downloaded server/client share that build.
Source of knowledge: Not supplied by this run. The guide provides YOUR_BRANCH and RUN_ID placeholders and platform-specific artifact names, but I did not silently choose values using prior CI knowledge.
User impact: A new contributor cannot execute the download/start sequence literally without selecting real values and establishing artifact compatibility/trust.
Recommendation: Add a short workflow-run-selection/commit-verification example or a link to a prerequisite guide. Placeholder use alone is not asserted to be a PR bug.

Knowledge gap: Exact runtime/dependency versions and command location

What I needed to know: Supported Node, pnpm, .NET/Aspire versions for this POC, dependency restoration invocation/location, and the complete convenience build invocation.
Source of knowledge: Rendered API package labels are not runtime tooling versions. No product/source inspection or installed-version diagnostic was substituted. Script discovery exposed W1, not runtime compatibility.
User impact: Successful rendering under parent-owned Bun/Astro does not establish that the generated Node adapter artifact starts on Windows, Linux, or the intended AppHost version.
Recommendation: Link explicit contributor prerequisites and state the command directory/invocation. Keep platform/build-artifact distinction already present.

Production/dev gap

This was Astro/Vite dev on localhost, not an opt-in production Astro/Node hybrid build behind private StaticHost. No conclusion is made about production middleware routing, legacy aliases, static/non-API preservation in a built artifact, authorization/cookie/header forwarding, native memory-cache limits/TTL/coalescing, readiness, failover, gateway behavior, image restrictions, or Azure sidecars. W2 is a dev observation requiring production reproduction before attribution.

Some local logs included /api/live/ 404 and Vite dev-toolbar “504 (Outdated Optimize Dep)”; these did not prevent the tested search/HTML flows. They are environment observations, not attributed PR defects. No unrelated tutorial was tested.

Recommendations

  1. Clarify and verify the convenience command location/invocation identified in W1 without requiring local full-site builds.
  2. Reproduce W2 with the exact commit's approved platform-matching hybrid production artifact before filing it as a production regression.
  3. Add a concise artifact-run/commit-selection example and explicit prerequisite link; do not conceal missing run IDs or tooling assumptions.
  4. Complete separate authorized production verification for build/platform compatibility, private StaticHost negotiation, caching, auth/cookies, readiness/failover and deployment. This browser pass does not replace it.

Safety, Unexpected Side Effect, and Cleanup

  • Only pr1874 was closed, using playwright-cli -s=pr1874 close. No shared close-all/kill-all operation was used.
  • Own private profile was inspected for reparse points, then removed. runtime-final.txt confirms Private profile exists: False. Evidence/report and .playwright-cli snapshots/logs remain under pr-1874-test; no test project was created.
  • Parent server was left running: final listener 127.0.0.1:4321, owning PID 47180. No process was killed.
  • No manual repository edits, checkout/branch changes, source/test edits, pushes, workflow dispatches or external publications were made.
  • Unexpected side effect requiring parent awareness: The permitted no-script-argument root pnpm ... run listing executed an install lifecycle before listing scripts (available-root-scripts.txt). This was not a deliberately selected install command. Final status contains modified pnpm-lock.yaml and generated .starlight-icons files (language-map.json, material-icons.json, safelist.json, version.txt). A clean-status baseline was not captured before the parent-owned dev process/listing, so this tester cannot assign every modification to the listing versus existing startup work. No implementation/diff was read to investigate and no blind restore was performed that could erase parent changes.
  • Accordingly, the checkout is not asserted pristine. Actual HEAD remains exact; parent must reconcile generated/lockfile status before disposing its owned checkout. The profile/browser cleanup is complete, but repository side-effect reconciliation is explicitly outstanding.
  • Report and supporting evidence are frozen for the parent to combine with independent Phase A. No Phase A findings were consumed and no combined verdict was issued.

Comment thread CONTRIBUTING.md

## Hybrid API documentation POC

The normal build remains fully static. Opting in with `ASPIRE_HYBRID_API_DOCS=1`

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C01 - normal builds are no longer fully static or opt-in.

The normal build remains fully static. Opting in with ASPIRE_HYBRID_API_DOCS=1 at build time...

At inspected 356691770b60a23bc6f52c12bcb957ddbe9cd9ae, Astro's top-level config unconditionally selects the Node middleware adapter and hybridOutputDirectory(...). The integration sets matching API routes to prerender = false, and its build-done hook writes the hybrid manifest unconditionally. These are owning website implementation checks, not an inference from the PR description.

Please update this contributor section for the current default hybrid architecture. The documented static-default/opt-in distinction no longer describes the ordinary build. No full build or production deployment was run to manufacture a runtime pass.

Comment thread CONTRIBUTING.md
The normal build remains fully static. Opting in with `ASPIRE_HYBRID_API_DOCS=1`
at **build time** leaves non-API documentation and assets static, but renders all
C# and TypeScript API HTML and Markdown on demand through the existing StaticHost.
This includes both API search pages. The convenience command `build:hybrid` sets

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C02 - the two language API search/landing pages are deliberately prerendered.

This includes both API search pages.

The owning route selector explicitly excludes csharp/index.astro, typescript/index.astro and their language-level Markdown endpoints from its on-demand override; the route hook only sets prerender = false for matches. The source comment explains that the heavy landing pages remain prerendered. Please distinguish these landing/search pages from on-demand detail pages rather than promising all API HTML and Markdown are on demand. This finding is pinned to 356691770b60a23bc6f52c12bcb957ddbe9cd9ae; a dev-server rendering sample alone cannot prove production rendering mode.

Comment thread CONTRIBUTING.md
This includes both API search pages. The convenience command `build:hybrid` sets
the flag only for its child build; `build:hybrid:skip-search` also skips Pagefind.
Setting a runtime flag alone cannot convert an already-static artifact.
Use `build:hybrid`, not the static-only `build:statichost` command, for this mode.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C03 (also the command subassertion of C02) - the recommended build wrappers do not exist.

The convenience command build:hybrid ... build:hybrid:skip-search ... Use build:hybrid, not the static-only build:statichost command...

The inspected frontend script surface has ordinary build, build:skip-search and build:production entries and serve:hybrid; none of build:hybrid, build:hybrid:skip-search or build:statichost is defined. Please document the actual current entry points instead of wrappers removed from this head. No full-site build was executed; this is an exact manifest command-surface check, not a claim that a production build succeeded.

Copy link
Copy Markdown
Member Author

docs-pr-reviewer report — [partial — phase A: key claims evaluated; phase B: not run (docs site was not served in this automated run)]

Recommendation: needs human

Source used: microsoft/aspire main via merged source PR microsoft/aspire#20967 (not a docs-content change) (docs PR targets release/17.0; no matching branch checked).
PR status: non-draft, authored by a maintainer (IEvangelist), mergeable, opened 2026-10-12 (not stale). Touches 79 files including CI workflows.

Phase A — claims

  • ❓ This PR adds a hybrid API-docs proof of concept (CI workflows, renderer, container packaging). It makes few verifiable Aspire claims, so the docs-claim review does not apply; CI/workflow security and design need maintainer review.

Phase B — doc-tester

Not run; rendering of the changed pages is not browser-checked.

🤖 Posted by aspire.dev - squad (AI Agent)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hybrid-api-poc Run the opt-in hybrid API documentation POC checks on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants