Skip to content

feat: Decouple OTF token/report data from the app into a content pipeline#150

Open
thekidnamedkd wants to merge 40 commits into
developmentfrom
app-556-decouple-otf-token-report-data-and-framework-from-dashboard
Open

feat: Decouple OTF token/report data from the app into a content pipeline#150
thekidnamedkd wants to merge 40 commits into
developmentfrom
app-556-decouple-otf-token-report-data-and-framework-from-dashboard

Conversation

@thekidnamedkd

Copy link
Copy Markdown
Contributor

Moves token/report/framework data out of the frontend bundle into a normalized, validated, API-served model (APP-556). Lean v1: the dashboard composes its data from the otf-cms content repo at build time and serves it from versioned endpoints — no storage services, no separate API deploy (both designed and shelved for when traffic/SLAs justify them).

What changed

Domain model — the 6k-line metrics.json blob + JSON-inferred types are replaced by:

  • normalized write-model atoms (registry / framework rubric / per-criterion evaluations) — the data is a join, composed at build time
  • a shared Zod contract (vendored from otf-cms, CI integrity-gated) — types derive from schemas, not from JSON
  • a deterministic composer producing consumer-shaped read models + a content-hash snapshot_id
  • canonical-only status vocabulary (legacy fail/partial corrected; no runtime normalization)

API/api/v1/{tokens, tokens/{id}, framework, faq} with a { data, provenance } envelope, served directly by the app. Plus /llms.txt + /agent-guide.md as the agent-native surface.

Build-from-refscripts/build-data.mjs composes data from otf-cms at build (OTF_CONTENT_REF for prod/preview, local checkout for dev, committed fallback for hermetic builds). Production builds from otf-cms main; content PRs render previews.

Cleanup — per-token branch-deploy filtering retired; hydration + SSR query layer; dead prior-art removed.

Verification

Behavior-preserving: golden round-trip fixtures prove composed output matches the pre-refactor render byte-for-byte (one intentional diff: stale token counts corrected). 12 tests, type-check, biome, production build + SSR all green. API + llms.txt smoke-tested over the wire.

Out of scope / follow-up

CMS hosting + the deploy-trigger wiring are provisioning items (handoff prepared separately). Blob/Edge Config/standalone otf-api are built and shelved behind the same /api/v1 contract.

@linear-code

linear-code Bot commented Jun 9, 2026

Copy link
Copy Markdown

APP-556

@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ownership-token-framework Ready Ready Preview, Comment Jun 18, 2026 4:04pm

Request Review

Comment thread scripts/build-data.mjs Fixed
@thekidnamedkd thekidnamedkd force-pushed the app-556-decouple-otf-token-report-data-and-framework-from-dashboard branch from b8a1343 to 672bb07 Compare June 10, 2026 12:33
@thekidnamedkd thekidnamedkd changed the title Decouple OTF token/report data from the app into a content pipeline feat: Decouple OTF token/report data from the app into a content pipeline Jun 16, 2026
@thekidnamedkd thekidnamedkd force-pushed the app-556-decouple-otf-token-report-data-and-framework-from-dashboard branch from a590f98 to db3326c Compare June 18, 2026 15:55
…le-otf-token-report-data-and-framework-from-dashboard

# Conflicts:
#	pnpm-lock.yaml
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

You don't have permission to create a Preview Deployment for this Vercel project: ownership-token-framework.

View Documentation: https://vercel.com/docs/accounts/team-members-and-roles

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants