Skip to content

chore(workflow-sdk): drop unused codegen exports and alias indirection - #10549

Merged
waleedlatif1 merged 1 commit into
stagingfrom
chore/wac-qa-b11-code-quality
Dec 1, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
chore/wac-qa-b11-code-quality

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

Code-quality cleanups for workflows-as-code (QA batch B11). No behavior change.

  • @sim/workflow-sdk/codegen barrel: drop five names nothing imports (GenerateSdkTypesFn, GenerateWorkspaceTypesFn, BuilderLookup, BuilderReference, WorkspaceManifestColumn). generateSdkTypes and generateWorkspaceTypes are now plain function declarations instead of consts typed by a one-use alias. The three interfaces become file-local. SdkTypeFile stays (a test imports it).
  • knip.jsonc: workflow-sdk now checks entry exports, exempting only the authoring .d.ts surface (core.d.ts, workspace/*.d.ts) and the cookbook/test fixtures. Dropped the src/runtime.ts and src/codegen/index.ts entries, which knip already takes from the package exports map. An unused ./codegen export now fails check:unused-exports (checked by re-adding BuilderReference to the barrel: knip flags it).
  • compile-source.ts and sim-cli stored-edges.ts import CompileInput from @sim/workflow-code instead of re-deriving it via Parameters<typeof compileWorkflow>[0].
  • refusals.ts: read blockRenames.get(key) instead of inverting the map twice to rebuild it.

Test plan

  • tsc --noEmit for workflow-sdk, sim-cli and apps/sim
  • bun run check:unused-exports (baseline unchanged)
  • workflow-sdk vitest (55), sim-cli protocol vitest (724), apps/sim lib/workflows/code + source-pipeline vitest (274)
  • biome on touched files

- codegen barrel: drop GenerateSdkTypesFn, GenerateWorkspaceTypesFn, BuilderLookup,
  BuilderReference and WorkspaceManifestColumn; generateSdkTypes and generateWorkspaceTypes
  become plain function declarations
- knip: check workflow-sdk entry exports (exempting only the authoring .d.ts surface and
  fixtures), so an unused ./codegen export now fails check:unused-exports
- compile-source.ts and stored-edges.ts import CompileInput instead of re-deriving it
- refusals.ts reads blockRenames directly instead of inverting it twice
@vercel

vercel Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Dec 1, 2026 7:58am 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 8 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 Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · This PR appears safe to merge; no actionable issues were found.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge; no actionable issues were found.

Summary

This PR removes unused codegen types and simplifies existing code without an identified behavior change.

  • The workflow SDK codegen entry exports fewer helper types.
  • The app and CLI name the shared workflow compile input type directly.
  • Source refusal checks find renamed stored blocks through the existing rename map.

No actionable issues were found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "chore(workflow-sdk): drop unused codegen..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 1bf58c9 into staging Dec 1, 2026
87 checks passed

This branch was successfully deployed

1 active deployment
Preview — ad48a1e1 Deployed Dec 1, 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