Repository navigation
chore(sdk): generate the SDK fixture catalog from a script and add a generate-all umbrella - #10253
Merged
Merged
Conversation
…generate-all umbrella
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
[Medium impact] The PR appears safe to merge. SummaryMoves SDK fixture generation out of a test and adds a root generator runner.
Reviews (1) · Last reviewed commit: "chore(sdk): generate the SDK fixture cat..." · Reviewed by Greptile |
This branch was successfully deployed
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
packages/workflow-sdk/test/fixtures/catalog.jsonis generated, but its only generator was a branch insidereal-catalog.test.tsbehindUPDATE_SDK_FIXTURE_CATALOG=1. A models or blocks change made it stale without anyone noticing until a CI test shard failed (staging broke this way after feat(models): add Gemini 4 Neon/Hydrogen/Carbon, GPT-6.2 Astra/Sol, GPT Image 2.6 #10247).apps/sim/scripts/generate-sdk-fixture-catalog.tsand the pairgenerate:sdk-fixture-catalog/check:sdk-fixture-catalog. It projects the block types already in the fixture withprojectBlockCatalog, pinshash: 'fixture', and writes the same bytes the test hook wrote.check:auditsnow runs the check automatically, so drift fails the lint job, and the failure message names the fix command.UPDATE_SDK_FIXTURE_CATALOGhook fromreal-catalog.test.ts, since the audit owns that invariant now. The other 12 tests are unchanged.bun run generate(scripts/generate-all.ts). It builds its list from package.json the same wayrun-audits.tsdoes: everygenerate:<x>that has acheck:<x>, plusskills:sync(paired withcheck:skills). Any new pair is picked up automatically. The generators run one at a time in package.json order because some read what an earlier one wrote: cli-docs reads cli-api, docs-manifest reads cli-docs, and the SDK fixture reads tool-metadata and sdk-names. The script prints a summary at the end and exits non-zero if any generator failed./shipPhase A now runsbun run generateinstead of its hardcoded loop of 4 generators. A failure still aborts the ship, and the note about not running the mship/domain generators is kept.Type of Change
Testing
bun run apps/sim/scripts/generate-sdk-fixture-catalog.ts, thencmpagainst the file written byUPDATE_SDK_FIXTURE_CATALOG=1 bun run test lib/workflows/code/real-catalog.test.tson the pre-change test: byte-identical.bun run check:sdk-fixture-catalog: passes. After corrupting one label in the fixture it fails with "... is stale ... Runbun run generate:sdk-fixture-catalogand commit the result." (exit 1). After restoring the label it passes again.bun run generate: all 13 generators ran and passed, with no diff beyond this PR's files.bun run skills:sync/bun run check:skills: in sync.bun run --cwd apps/sim test lib/workflows/code/real-catalog.test.ts: 12/12 passed.packages/workflow-sdkvitest run src/codegen/reference.test.ts src/codegen/generate.test.ts(both read the fixture): 12/12 passed.bunx biome check --writeon the changed files. I did not run the full gate locally; CI runs it.Checklist