refactor(catalog): compose and inject validated definitions - #278
lloydrichards wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes in PR #278 against feat/catalog-distribution, including catalog composition, service injection, application wiring, tests, and authoring guidance.
- Validated composition: Added a fragment schema, typed validation errors, duplicate and graph-reference checks, and a trusted exception for the bundled catalog's Finalize scripts.
- Catalog propagation: Supplied one catalog through Blueprint, Plan, preview workspaces, and Finalize, with an injected-definition test covering catalog projections and generated output.
- Composition roots: Kept explicit bundled adapters for the CLI and Recipe Builder and moved root catalog authoring scripts to a repository entrypoint.
Local @repo/catalog, @repo/scaffold, and stack-effect tests, bun run type-check, and bun run format:check passed.
GPT Sol | 𝕏

Goals/Scope
Close #249 by composing validated catalog fragments and supplying one catalog to the scaffold services. Review duplicate and reference failures, plus catalog propagation through preview and Finalize.
Description
composeCatalogvalidates each fragment, rejects duplicate IDs and broken references, and returns the catalog used by Blueprint, Plan, Apply, and Finalize. For example,yield* composeCatalog([officialFragment, trustedFragment])validates the combined graph before planning. CLI and Recipe Builder keep a temporary bundled adapter until #273 and #274 replace it.How to Test
Run
bun format,bun lint,bun run type-check, andbun run okf:check. Run scoped catalog, scaffold, CLI, and docs tests, then build the CLI and docs site. Use a temporary repository for the CLI smoke test.Comments
Closes #249. The HTTP loader and deployed source belong to later PRs in #275.