Skip to content

chore(sdk): generate the SDK fixture catalog from a script and add a generate-all umbrella - #10253

Merged
waleedlatif1 merged 1 commit into
stagingfrom
chore/sdk-fixture-generator
Nov 20, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
chore/sdk-fixture-generator

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • packages/workflow-sdk/test/fixtures/catalog.json is generated, but its only generator was a branch inside real-catalog.test.ts behind UPDATE_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).
  • Added apps/sim/scripts/generate-sdk-fixture-catalog.ts and the pair generate:sdk-fixture-catalog / check:sdk-fixture-catalog. It projects the block types already in the fixture with projectBlockCatalog, pins hash: 'fixture', and writes the same bytes the test hook wrote. check:audits now runs the check automatically, so drift fails the lint job, and the failure message names the fix command.
  • Removed the fixture-equality test and the UPDATE_SDK_FIXTURE_CATALOG hook from real-catalog.test.ts, since the audit owns that invariant now. The other 12 tests are unchanged.
  • Regenerated the fixture. Staging's copy was stale (missing the Gemini 4 Neon/Hydrogen/Carbon and GPT-6.2 Astra/Sol entries), and the regenerated file is byte-identical to what the old test hook produces.
  • Added a root bun run generate (scripts/generate-all.ts). It builds its list from package.json the same way run-audits.ts does: every generate:<x> that has a check:<x>, plus skills:sync (paired with check: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.
  • /ship Phase A now runs bun run generate instead 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

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: tooling

Testing

  • bun run apps/sim/scripts/generate-sdk-fixture-catalog.ts, then cmp against the file written by UPDATE_SDK_FIXTURE_CATALOG=1 bun run test lib/workflows/code/real-catalog.test.ts on 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 ... Run bun run generate:sdk-fixture-catalog and 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-sdk vitest run src/codegen/reference.test.ts src/codegen/generate.test.ts (both read the fixture): 12/12 passed.
  • bunx biome check --write on the changed files. I did not run the full gate locally; CI runs it.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@waleedlatif1
waleedlatif1 requested a review from a team as a code owner November 20, 2026 19:35
@vercel

vercel Bot commented Nov 20, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Building Building Preview Nov 20, 2026 7:35pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Moves SDK fixture generation out of a test and adds a root generator runner.

  • The SDK fixture catalog stays in step with the live block registry.
  • One command runs the repo's eligible generators in dependency order.

Reviews (1) · Last reviewed commit: "chore(sdk): generate the SDK fixture cat..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 1d1ff5b into staging Nov 20, 2026
90 of 91 checks passed
@waleedlatif1
waleedlatif1 deleted the chore/sdk-fixture-generator branch November 20, 2026 19:41

This branch was successfully deployed

1 active deployment
Preview — 7f770c9b Deployed Nov 20, 2026 by vercel[bot]
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.

1 participant