Skip to content

ForgeBook S4: Cut over to durable popularity projections after soak #75

Description

@nicholasdbrady

Parent

  • coreai-microsoft/foundry-devx#173

Blocked by

  • coreai-microsoft/foundry-devx#175
  • Seven consecutive successful daily projection runs with current health state and zero reconciliation differences

Summary

Switch Forgebook’s build-time popularity reader from direct raw Application Insights queries to the durable Azure Table Storage projection owned by Foundry DevX. Preserve the freshly deployed page-view snapshot as the last-known-good fallback until the durable reader passes its soak and cutover gates.

User stories covered

  • Rank the Popular carousel by production recipe page views in the trailing 30 days.
  • Display production recipe page views accumulated since the June 2, 2026 launch.
  • Exclude localhost, PR previews, non-recipe routes, and unpublished registry slugs.
  • Keep deployments successful and counters stable when analytics data is stale or unavailable.
  • Use GitHub OIDC and least-privilege Entra RBAC without storage keys or browser access.

Acceptance criteria

  • The GitHub Actions identity has only the Azure Storage Table Data Reader access required for the aggregate table.
  • The build-time reader uses Entra/OIDC authentication and reads the small materialized totals projection; no storage keys, SAS tokens, or public browser API are introduced.
  • Only current registry.yaml slugs with a positive trailing-30-day view count are eligible for the carousel.
  • The carousel is ordered by trailing30PageViews, capped at six, and each badge displays sinceLaunchPageViews.
  • The reader validates metric version, asOfUtc, source coverage, and reconciliation health before replacing popular.json.
  • Missing, stale, malformed, or unhealthy projection data causes the deploy to emit a warning and retain the committed last-known-good popular.json rather than failing or rendering an empty carousel.
  • The generated snapshot remains deterministic and includes the as-of timestamp, launch boundary, ranking window, metric version, and both view measures.
  • Reader tests use fixture projections and cover healthy data, unpublished slugs, zero recent views, stale data, unhealthy reconciliation, malformed rows, and unavailable Azure access.
  • The existing homepage Playwright seam verifies trailing-30-day ordering and since-launch displayed views without hard-coding daily-changing counts.
  • Registry validation and the production site build pass.
  • Cutover occurs only after the Foundry DevX projection has completed seven consecutive successful daily runs with current health and zero reconciliation differences.

Testing

Test the external build-time behavior rather than Azure SDK call sequences. Use fixture projection entities at the reader seam, retain the existing homepage Playwright coverage, and record the seven-run production soak as a release gate.

Out of scope

  • Provisioning or writing the aggregate store.
  • Changing the canonical metric or Log Analytics summary rules.
  • Giving the browser direct access to Azure Storage.
  • Removing the committed fallback.
  • Raw telemetry export, Logic Apps reporting, or proactive Action Group notifications.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions