Always regenerate SDK client on application install and upgrade (#24696)
## Context The generated SDK client (per workspace, per app) was only regenerated on first install or when the app's metadata schema changed (`isFirstApply || hasSchemaMetadataChanged` in `ApplicationManifestApplyService`). Function-only app upgrades never triggered a regeneration, so a workspace could keep a client generated against an old SDK version forever and miss SDK-level additions like `enqueueJob`. This is what broke Last Contact on cloud: the workspace's client was generated on SDK 2.25 (pre `enqueueJob`) and every 1.2.x upgrade was function-only, so it stayed frozen until a reinstall forced a regen. ## What this does - `applyManifestToWorkspace` now always regenerates the SDK client after a manifest sync by default, so marketplace/tarball installs and upgrades (including auto-upgrades) always pick up SDK-level changes. - CLI dev sync opts into the previous behavior via `shouldOnlyGenerateSdkClientOnSchemaChange: true`, keeping the schema-change optimization so the client is not regenerated on every file save. - Adds unit tests for `ApplicationManifestApplyService` covering both paths (install/upgrade always regenerates; dev sync skips when the schema is unchanged, regenerates on first apply or schema change). ## Test `npx jest packages/twenty-server/src/engine/core-modules/application/application-manifest/__tests__/application-manifest-apply.service.spec.ts` passes; server typecheck and diff lint clean. --- _Generated by [Claude Code](https://claude.ai/code/session_016Fm7PgerEwNbchGbUCkYuY)_ <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/twentyhq/twenty/pull/24696?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
M
martmull committed
37d3879c0dfa694868ca8f149916cf1a8b152f3d
Parent: eef6ab6
Committed by GitHub <noreply@github.com>
on 8/24/2026, 2:09:32 PM