feat: Decouple OTF token/report data from the app into a content pipeline#150
Open
thekidnamedkd wants to merge 40 commits into
Open
Conversation
Signed-off-by: Milos Dzepina <milos@aragon.org>
chore: Deploy to prod
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
b8a1343 to
672bb07
Compare
a590f98 to
db3326c
Compare
…le-otf-token-report-data-and-framework-from-dashboard # Conflicts: # pnpm-lock.yaml
|
Deployment failed with the following error: View Documentation: https://vercel.com/docs/accounts/team-members-and-roles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-cmscontent 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.jsonblob + JSON-inferred types are replaced by:snapshot_idfail/partialcorrected; 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.mdas the agent-native surface.Build-from-ref —
scripts/build-data.mjscomposes data from otf-cms at build (OTF_CONTENT_REFfor prod/preview, local checkout for dev, committed fallback for hermetic builds). Production builds from otf-cmsmain; 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-apiare built and shelved behind the same/api/v1contract.