You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the legacy migration-based flow compiler after #650 and #651 are implemented and validated, but before their first stable release.
Worker startup becomes the only supported deployment path for flow definitions. During #650 and #651, leave the legacy path unchanged and do not extend it with queue mode, step routes, aliases, or other deployment metadata.
This is a pre-release cleanup for #653, not a prerequisite for implementing queue identity or private per-step queues.
Keeping it for new deployment metadata would require a second implementation of queue-mode and route validation. Removing only ControlPlane would break pgflow compile. Remove the complete legacy unit instead.
Do not make #650 or #651 wait for this cleanup. Do not publish the permanent dual-path support matrix either.
Remove
pkgs/cli
Delete pgflow compile and its tests.
Stop creating supabase/functions/pgflow/ during installation.
Remove compile-command output, options, and current documentation.
pkgs/edge-worker
Delete ControlPlane, its public export, server code, fixtures, and tests.
Remove compilation: false; every flow worker compiles or verifies its definition during startup.
Remove compilation.allowDataLoss; remote startup never authorizes destructive recompilation.
pkgs/dsl
Delete the public SQL-text compileFlow() helper, export, and tests.
Delete TypeScript shape-comparison helpers that have no caller after ControlPlane removal.
Keep flow-shape extraction used by worker startup.
Documentation and examples
Remove the installed and demo ControlPlane functions.
Redirect current manual-compilation, Compile API, and ControlPlane pages to startup compilation or the migration notice.
Remove migration-based flow compilation from current examples, package READMEs, architecture guides, navigation, and generated indexes.
Keep historical release-news pages intact while marking removed APIs as obsolete in current versions.
Behavior after removal
missing concrete flow -> compile during worker startup
matching flow -> verify and start
local mismatch -> use the existing automatic local recompilation behavior
remote mismatch -> fail without deleting data; deploy a new concrete slug
A structural or semantic production change uses a new concrete slug:
constgreetUserV2=newFlow({slug: 'greetUserV2'})
Startup shape verification cannot detect handler-code or TypeScript contract changes. The versioning guide must continue to require a new slug for those changes.
Preserve
Preserve current local same-slug hot reload and destructive recompilation behavior.
Preserve the existing SQL startup compiler, flow-shape extraction, and concrete-slug advisory lock.
Preserve create_flow() and add_step() as database building blocks used by startup compilation.
Preserve existing generated migrations as ordinary historical SQL in user repositories.
Summary
Remove the legacy migration-based flow compiler after #650 and #651 are implemented and validated, but before their first stable release.
Worker startup becomes the only supported deployment path for flow definitions. During #650 and #651, leave the legacy path unchanged and do not extend it with queue mode, step routes, aliases, or other deployment metadata.
This is a pre-release cleanup for #653, not a prerequisite for implementing queue identity or private per-step queues.
Why remove the complete path
The legacy workflow has four coupled surfaces:
Keeping it for new deployment metadata would require a second implementation of queue-mode and route validation. Removing only ControlPlane would break
pgflow compile. Remove the complete legacy unit instead.Scheduling
Do not make #650 or #651 wait for this cleanup. Do not publish the permanent dual-path support matrix either.
Remove
pkgs/clipgflow compileand its tests.supabase/functions/pgflow/during installation.pkgs/edge-workerControlPlane, its public export, server code, fixtures, and tests.compilation: false; every flow worker compiles or verifies its definition during startup.compilation.allowDataLoss; remote startup never authorizes destructive recompilation.pkgs/dslcompileFlow()helper, export, and tests.Documentation and examples
Behavior after removal
A structural or semantic production change uses a new concrete slug:
Startup shape verification cannot detect handler-code or TypeScript contract changes. The versioning guide must continue to require a new slug for those changes.
Preserve
create_flow()andadd_step()as database building blocks used by startup compilation.Migration requirements
PostgreSQL keeps overloads with different argument lists. The migration must explicitly remove the production data-loss entry point:
Then create or keep the intended signature without
allow_data_loss, and regenerate database types.The migration notice must tell existing users to:
supabase/functions/pgflow/and any matching function configuration.pgflow compilefrom scripts and CI.compilation: falseandcompilation.allowDataLossfrom worker configuration.Acceptance criteria
pgflow compile, its tests, options, installation output, and current docs are removed.compileFlow()and orphaned TypeScript-only compiler helpers are removed.compilation: falseandcompilation.allowDataLossare rejected by the type system and runtime.ensure_flow_compiled(text, jsonb, boolean)overload is absent after migration.Out of scope
worker_functions.enabledchanges.