refactor(registry): generate bootstrap and health dataset registries#4
Closed
refactor(registry): generate bootstrap and health dataset registries#4
Conversation
Bootstrap and health registrations had drifted across manual maps in api/bootstrap.js, api/health.js, tests, and cache key exports. Move the dataset contracts into registry/datasets.ts, generate the edge/server artifacts, and wire the health and bootstrap endpoints to consume those outputs. Also add registry freshness checks to pre-push and the typecheck workflow. Validation: - npm run registry:check - node --test tests/bootstrap.test.mjs - node --test tests/edge-functions.test.mjs - npm run test:data - npm run typecheck - npm run typecheck:api
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
8 tasks
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.
Summary
This moves bootstrap and health dataset registration behind a generated contract registry in the fork. The runtime behavior stays aligned with the existing bootstrap and health semantics, while the source of truth moves to
registry/datasets.tsand drift is enforced in CI and pre-push.Related issue: #5.
Root cause
Bootstrap keys, health keys, seed metadata, and tier definitions had drifted across manual maps in
api/bootstrap.js,api/health.js,server/_shared/cache-keys.ts, and multiple tests. That made parity fixes and new dataset additions depend on synchronized edits across unrelated files.Changes
registry/datasets.tsplusscripts/generate-dataset-registry.tsandscripts/check-dataset-registry.mjsapi/_generated/dataset-registry.js,api/_generated/health-registry.js, andserver/_shared/_generated/bootstrap-registry.tsconsumerPricesOverview,consumerPricesCategories,consumerPricesMovers, andconsumerPricesSpreadbootstrap aliasesapi/health.jsto generated health registries while preserving bootstrap/standalone grouping, seed status handling, cascade logic, and compact mode behaviorserver/_shared/cache-keys.tsnpm run registry:checkin.husky/pre-pushand.github/workflows/typecheck.ymldocs/architecture/dataset-registry.mdValidation
npm run registry:checknode --test tests/bootstrap.test.mjsnode --test tests/edge-functions.test.mjsnpm run test:datanpm run typechecknpm run typecheck:apiRisk
Low to moderate. The runtime code path is intentionally conservative, but the generated registry now feeds both bootstrap and health, so future contract edits can affect both endpoints at once.