Add context object to handlers for platform resource access#185
Add context object to handlers for platform resource access#185
Conversation
- Introduced createQueueWorkerContext and createFlowWorkerContext for worker contexts - Added core/memoize.ts for simple function memoization - Implemented supabase-factories.ts for lazy-loaded supabase clients - Enhanced supabase-utils.ts with memoized singleton clients and reset function - Updated handler-types.ts for backward-compatible step handler signatures - Expanded platform adapters with environment variable access methods - Added comprehensive unit tests for supabase-utils functions - Exported context types and utility functions for better modularity and testing
…te connection string access - Changed EdgeWorker.start() to return Promise<void> instead of Promise<PlatformAdapter> - Removed returning platform from start methods to improve encapsulation - Updated internal calls to startQueueWorker and startFlowWorker accordingly - Modified platform DenoAdapter to use getter for connectionString instead of method - Updated platform types to reflect connectionString as a getter - Overall, improved API encapsulation and consistency in platform configuration access
…ronment support - Bumped @supabase/supabase-js to v2.50.3 and added related dependencies - Updated deno.lock and test JSON to include latest @supabase dependencies - Added env property to createFlowWorker configuration for environment variables - Extended EdgeWorker, StepTaskExecutor, MessageExecutor, and createQueueWorker to pass env and sql - Modified MessageHandlerFn to support both legacy and new handler signatures with context - Improved queue and flow worker creation functions to accept optional env and sql parameters - Enhanced queue message processing to handle context-aware handlers and environment variables
…exts - Introduced integration tests for message executor context handling, including payload and raw message verification - Added tests for backward compatibility with single-argument handlers in message and step executors - Included tests for context properties such as environment variables, SQL, abort signals, and Supabase clients - Created unit tests for context utility functions to ensure correct creation and memoization of clients - Cover scenarios with environment variables missing and ensure rawMessage is handled appropriately in different contexts
…er modules - Updated StepDefinition handler to accept context parameter - Modified Flow class to pass context to step handlers - Changed MessageExecutor to always create and pass context to handlers - Added platform-resources interface for platform-specific dependencies - Updated queue message handler type to always include context parameter - Removed redundant context creation functions for flow workers - Improved code consistency and future-proofing for context handling in workers
…ow workers - Introduced AllStepInputs to extract all step input types from a flow - Updated context interfaces to include rawMessage as PgmqMessageRecord<AllStepInputs<TFlow>> - Refined StepTaskWithMessage to pair messages with step tasks - Modified poller to return message-task pairs, avoiding race conditions - Added createSql factory for PostgreSQL client with dedicated connection pool - Enhanced createContext to lazy-load Supabase clients with environment validation - Updated handler types to support optional context parameter for backward compatibility - Added Supabase platform adapter and related types for better platform abstraction - Included new sql-factory.ts for SQL client creation and Supabase platform integration - Overall improvements facilitate more robust flow handling and platform extensibility
…signal and update context handling - Replaced individual AbortController signals with platform's shutdownSignal for graceful shutdown - Updated createFlowWorker to create context at factory level using platformAdapter.createStepTaskContext - Modified createQueueWorker and MessageExecutor to use platform's context creation - Removed unnecessary platform adapter imports and references in EdgeWorker and related files - Ensured consistent use of context objects for step tasks and message processing across modules - Minor type adjustments for clarity and alignment with new context handling approach
…and update worker setup - Replaced DenoAdapter with SupabasePlatformAdapter for enhanced platform-specific functionality - Added methods to spawn new edge functions and extend their lifetime using EdgeRuntime - Updated startWorker to manage resources and handle shutdown signals properly - Modified context creation to include SQL and Supabase clients for message handling - Export index now consolidates platform adapters, removing legacy DenoAdapter references - Overall improvements enable better resource management and platform integration in edge environment
- Introduced generic TContext with default types for StepTaskExecutor and MessageExecutor - Added convenience getters for context properties to avoid deep property access - Updated references to context properties to use getters for better readability - Minor adjustments to logging messages to use consistent identifiers - Enhanced type annotations for context parameters to improve type safety and maintainability
…queue and flow workers - Removed unused AllStepInputs import from PgflowSqlClient.ts - Added new context utility functions for queue workers, flow workers, and step tasks - Implemented simplified context creation functions with environment, SQL, and Supabase client setup - Improved modularity and testability of worker context initialization
…rove context types and tests - Replaced deprecated createAnonSupabaseClient and createServiceSupabaseClient with get* variants - Removed unused supabase-factories.ts file - Updated platform adapter to use new client getters with memoization - Enhanced context interfaces with more precise typing and backward compatibility - Fixed test assertions to match new context properties and message handling - Cleaned up test files, including removing obsolete supabase factory tests - Overall improvements streamline client creation, context handling, and testing consistency
…dules - Updated QueueWorkerContextParams to default TPayload to Json with explicit typing - Modified MessageExecutor class to accept more precise context type with TResources - Improved createQueueWorker to build context with platform resources and correct typing - Changed import of MessageHandlerContext to use the unified type across modules - Refined MessageHandlerFn to support generic context parameter for flexibility
…urce initialization - Renamed getAnonSupabaseClient and getServiceSupabaseClient to createAnonSupabaseClient and createServiceSupabaseClient for clarity - Changed functions to throw errors if required environment variables are missing, removing memoization - Updated platform adapter to initialize and expose platform resources once, improving efficiency - Modified tests to reflect new behavior, ensuring proper error handling and instance creation - Overall improvements enhance code clarity, error handling, and resource management in Supabase integrations
…le handling - Add env-validation.ts for centralized validation of required environment variables - Update platform classes to use validated environment data, ensuring consistency - Enhance createSql to accept environment object directly, removing dependency on process env - Improve type safety and robustness of Supabase client creation functions - Update tests to reflect validation logic and ensure environment variables are correctly handled - Overall, strengthen environment management and reduce runtime errors related to missing configs
- Introduced runtime environment validation for required Supabase variables - Added assertSupabaseEnv function to ensure all necessary env vars are present - Updated SupabasePlatformAdapter to validate env variables at startup - Removed deprecated env-validation.ts file - Enhanced type safety for environment variables in platform adapter
…e handlers - Updated context creation functions to handle missing environment variables gracefully - Added mock Supabase client creation for testing scenarios - Enhanced test helpers to generate full contexts for message and step task handlers - Changed test imports to use the new test context utilities - Improved type definitions for context objects to ensure better type safety and flexibility
…ontext extraction - Changed EmptyFlow to use an empty object for deps in dsl.ts - Added more permissive type parameters to Flow class for input, context, steps, deps - Enhanced type extraction utilities for flow input, output, steps, deps, and context - Updated context type to be more minimal and backward compatible in context.ts - Improved type inference for handler context and step dependencies - Overall, these changes make flow typing more flexible and better suited for complex workflows
…ion and handling - Introduced new test files with detailed scenarios for context type inference - Verified default minimal context and explicit type annotations - Ensured accumulation of context properties across multiple steps - Tested explicit, inferred, and mixed context configurations - Included type assertions to validate correct inference and extraction - Covered custom context-only handlers and preservation of step type inference - Added type-level assertions for correctness of context extraction logic
…m resources - Changed ExtractFlowContext to return base Context instead of empty object - Updated tests to reflect that context always includes base properties - Modified flow class to merge context with platform resources and explicit types - Added flow compatibility type guard to ensure context requirements are met - Enhanced type definitions for better resource and context management - Updated flow and worker start functions to accept compatible flows with platform resources - Introduced current platform resource types and compatibility checks - Adjusted default flow type to include base Context for consistency - Added new flowCompatibility and index type exports for improved type safety - Updated EdgeWorker to support flow compatibility with current platform resources - Added example and test files demonstrating type safety and resource constraints - Refactored type files to centralize resource and context logic for better maintainability
…urce integration - Introduced src/platforms/supabase.ts for Supabase-specific resources and context - Updated dsl.ts to export a specialized Flow class with Supabase resources - Modified context.ts to include Supabase resources and extend base context - Re-exported platform types in platforms/index.ts for platform implementations - Updated package.json to include @supabase/supabase-js dependency - Added comprehensive tests for context inference and flow resource access - Enhanced existing tests to verify full autocomplete and resource availability - Improved type safety for handlers accessing platform-specific resources - Refactored code to ensure consistent context merging and resource typing across flows - Marked as a feature addition to support seamless Supabase integration in flows
…or UserEnv and platform contexts - Introduced new test file to verify environment type validation system - Ensured Supabase flows get typed environment variables correctly - Verified UserEnv augmentation works as intended - Updated platform and context types to enforce environment constraints - Improved type safety and validation for environment variables across platform implementations
… and add empty interface for user environment - Updated test files to use void expressions instead of type assertions for better type safety - Added empty interface UserEnv to allow user augmentation without errors - Ensured consistent typing practices across environment validation and platform resource tests - Minor code style adjustments for clarity and maintainability
…better type safety - Changed Context<T> to default to Record<string, never> for consistency - Updated Extra type parameter in Flow class to default to Record<string, never> - Modified Custom type parameter in flowCompatibility to default to Record<string, never> - Ensured all type aliases now use Record<string, unknown> instead of object or empty object types for improved type safety and clarity
… tests Refactors test assertions for more precise type matching and corrects mock pubsub data to improve test accuracy.
…t and core files - Changed import syntax to use 'type' for better type-only imports - Updated context and resource mocks to use 'unknown' instead of 'any' for safety - Removed redundant imports and cleaned up import statements - Adjusted test helpers to handle type assertions more accurately - Minor formatting and consistency improvements throughout test and core modules
… type safety - Commented out unused imports in supabase-test-utils.ts to clean up code - Modified test files to replace 'any' types with 'unknown' for better type safety - Commented out deprecated or unused handlers and variables to improve test clarity - Adjusted handler signatures to use more precise context types - Minor formatting and consistency improvements across test files
- Introduced a new supabase.ts file to re-export platform-specific resources - Updated various test utility functions to cast environment properties as never - Modified lock files to update dependency versions and remove redundant entries - Added new mock message and step task structures for improved test coverage - Enhanced createSupabaseMessageContext and createSupabaseStepTaskContext functions for better type safety
…ngs across modules - Updated Env and UserEnv interfaces for better extensibility and type safety - Removed redundant Env type and ValidEnv utility from dsl.ts - Corrected env property typings in test context creation functions for consistency - Fixed env assignment in createQueueWorker to ensure proper typing - Adjusted rawMessage typings in test helpers for better type inference - Overall improvements enhance type safety and consistency in environment-related code
- Added new dependency entry for @std/async@0.224.2 with integrity hash - Updated deno.lock to include the new version and its checksum - Minor version bump for std/async to ensure consistency in dependencies
…e example usage from documentation - Added a note indicating that the context system will support custom resources in future versions - Removed extensive usage examples from the documentation to streamline the content - Updated the documentation to focus on current features and future plans for context extensibility
…pendencies - Removed redundant singleton pattern for Supabase client in saveWebsite - Added explicit supabase parameter to saveWebsite for better dependency injection - Updated analyze_website flow to pass serviceSupabase to saveWebsite - Enhanced code clarity and testability by decoupling database client instantiation
… and usage examples - Expanded documentation on context object resources for both pgflow DSL and edge-worker - Added code snippets illustrating platform resource access and flow configuration - Clarified environment variables and platform-specific resource availability - Improved clarity on optional context parameter and resource types in handlers - Ensured comprehensive guidance for users integrating platform resources into flows and workers
…date documentation - Introduce optional context parameter for queue and flow handlers to access platform resources - Update usage examples demonstrating new context parameter with platform services - Maintain backward compatibility for existing handlers - Add details about core and Supabase-specific resources available in context
🦋 Changeset detectedLatest commit: b710ae9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis change introduces a comprehensive context and platform resource system for the pgflow edge-worker and DSL packages. Handler functions for queues and flows now receive a standardized, strongly-typed context object containing environment variables, shutdown signals, and platform-specific resources like SQL and Supabase clients. The platform adapter abstraction is formalized and integrated throughout worker creation, handler execution, and testing utilities. Extensive type tests, integration tests, and documentation are added to ensure type safety, resource availability, and developer clarity. Changes
Sequence Diagram(s)sequenceDiagram
participant UserCode as User Handler/Flow
participant EdgeWorker
participant PlatformAdapter
participant Context
UserCode->>EdgeWorker: Register handler or flow
EdgeWorker->>PlatformAdapter: Initialize (validate env, create resources)
EdgeWorker->>PlatformAdapter: Get env, sql, supabase, shutdownSignal
EdgeWorker->>Context: Construct context object with resources
EdgeWorker->>UserCode: Invoke handler(input, context)
UserCode->>Context: Access resources (env, sql, supabase, etc.)
UserCode-->>EdgeWorker: Handler result
Possibly related PRs
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
View your CI Pipeline Execution ↗ for commit f5596a7
☁️ Nx Cloud last updated this comment at |
|
@CodeRabbit full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (15)
CLAUDE.md (1)
19-21: Use Markdown code spans for commands and prefer the Nx-recommended invocationInline shell commands should be wrapped in backticks for readability and consistency with existing docs.
Consider adopting the officially recommended formpnpm exec nxto avoid relying on the shorthand alias.- - Always run 'nx' as 'pnpm nx' + - Always run `nx` via `pnpm exec nx`pkgs/edge-worker/src/core/sql-factory.ts (1)
8-16: Consider prepared statements configuration.The SQL client configuration is well-structured with appropriate pool sizing. However, consider whether
prepare: falseis necessary for all use cases or if this should be configurable.If prepared statements are disabled for compatibility reasons, consider adding a comment explaining why. Alternatively, you could make this configurable:
-export function createSql(env: SqlEnv): Sql { +export function createSql(env: SqlEnv, options?: { prepare?: boolean }): Sql { return postgres(env.EDGE_WORKER_DB_URL, { max: 10, // Larger pool for handler operations - prepare: false, + prepare: options?.prepare ?? false, }); }pkgs/edge-worker/src/platform/createAdapter.ts (1)
8-14: Consider environment detection strategy.The function now returns a strongly typed
PlatformAdapter<SupabaseResources>which is excellent for type safety. The comment about future environment detection is valuable for planning.Consider adding environment variable checks to detect if this is actually a Supabase environment:
export function createAdapter(): PlatformAdapter<SupabaseResources> { if (isDenoEnvironment()) { + // Check for Supabase-specific environment variables + const hasSupabaseEnv = Boolean( + Deno.env.get('SUPABASE_URL') && + (Deno.env.get('SUPABASE_ANON_KEY') || Deno.env.get('SUPABASE_SERVICE_ROLE_KEY')) + ); + + if (!hasSupabaseEnv) { + throw new Error('Supabase environment variables not found'); + } + const adapter = new SupabasePlatformAdapter(); return adapter; }pkgs/edge-worker/tests/integration/_helpers.ts (1)
1-13: Clean up unused imports to improve code quality.Static analysis detected several unused imports that should be removed to keep the code clean.
Remove these unused imports:
-import type { AnyFlow, ExtractFlowInput, Json } from '@pgflow/dsl'; +import type { AnyFlow, ExtractFlowInput } from '@pgflow/dsl'; -import type { ValidEnv, UserEnv } from '@pgflow/dsl'; -import { createSql } from '../../src/core/sql-factory.ts';pkgs/edge-worker/tests/integration/messageExecutorContext.test.ts (2)
34-35: Remove commented out code.These unused variable declarations should be removed as they add no value to the test.
const abortController = new AbortController(); -// const logger = createFakeLogger(); -// const retryConfig = { limit: 3, delay: 1 };
194-194: Add newline at end of file.Files should end with a newline character.
}) ); +pkgs/edge-worker/src/flow/createFlowWorker.ts (1)
144-156: Fix inconsistent comment spacing.The comments have inconsistent spacing that should be standardized.
// Build context directly using platform resources const context = { // Core platform resources env: platformAdapter.env, shutdownSignal: platformAdapter.shutdownSignal, - + // Step task execution context rawMessage: taskWithMessage.message, stepTask: taskWithMessage.task, - + // Platform-specific resources (generic) ...platformAdapter.platformResources };pkgs/edge-worker/src/queue/createQueueWorker.ts (1)
247-258: Fix inconsistent comment spacing.The comments have the same spacing inconsistency as in createFlowWorker.
// Build context directly using platform resources const context: MessageHandlerContext<TPayload, TResources> = { // Core platform resources env: platformAdapter.env, shutdownSignal: platformAdapter.shutdownSignal, - + // Message execution context rawMessage: record, - + // Platform-specific resources (generic) ...platformAdapter.platformResources };pkgs/edge-worker/src/test/test-helpers.ts (2)
97-101: Consider expanding the mock Supabase client implementation.The current mock is minimal and only supports a specific chain of method calls. Consider making it more flexible for different test scenarios.
export function createMockSupabaseClient(): SupabaseClient { - return { - from: () => ({ select: () => ({ eq: () => Promise.resolve({ data: [], error: null }) }) }) - } as unknown as SupabaseClient; + const mockResponse = { data: [], error: null }; + const mockQuery = { + select: jest.fn().mockReturnThis(), + insert: jest.fn().mockReturnThis(), + update: jest.fn().mockReturnThis(), + delete: jest.fn().mockReturnThis(), + eq: jest.fn().mockResolvedValue(mockResponse), + single: jest.fn().mockResolvedValue(mockResponse) + }; + + return { + from: jest.fn().mockReturnValue(mockQuery), + auth: { + getUser: jest.fn().mockResolvedValue({ data: { user: null }, error: null }) + } + } as unknown as SupabaseClient; }
113-113: Add newline at end of file.}; } +pkgs/edge-worker/src/flow/StepTaskExecutor.ts (1)
65-65: Remove unnecessary empty line.if (!stepDef) { throw new Error(`No step definition found for slug=${stepSlug}`); } - // !!! HANDLER EXECUTION !!!pkgs/dsl/src/platforms/supabase.ts (2)
10-15: Consider using standard TypeScript formatting.The interface structure is correct, but the spacing before colons deviates from standard TypeScript conventions.
export interface SupabaseResources extends Record<string, unknown> { - sql : Sql; - anonSupabase : SupabaseClient; - serviceSupabase: SupabaseClient; + sql: Sql; + anonSupabase: SupabaseClient; + serviceSupabase: SupabaseClient; }
17-25: Environment variables correctly defined, consider standard formatting.All required Supabase environment variables are properly typed.
export interface SupabaseEnv extends Env { - EDGE_WORKER_DB_URL : string; - SUPABASE_URL : string; - SUPABASE_ANON_KEY : string; - SUPABASE_SERVICE_ROLE_KEY: string; - SB_EXECUTION_ID : string; - EDGE_WORKER_LOG_LEVEL? : string; + EDGE_WORKER_DB_URL: string; + SUPABASE_URL: string; + SUPABASE_ANON_KEY: string; + SUPABASE_SERVICE_ROLE_KEY: string; + SB_EXECUTION_ID: string; + EDGE_WORKER_LOG_LEVEL?: string; }pkgs/edge-worker/src/platform/SupabasePlatformAdapter.ts (1)
236-264: Excellent environment validation with helpful error messages.The validation method thoroughly checks all required variables and provides a comprehensive error message with documentation link.
Consider adding the actual environment variable names to help with debugging:
if (missing.length > 0) { throw new Error( `Missing required environment variables: ${missing.join(', ')}\n` + + `Current environment has: ${Object.keys(env).filter(k => k.startsWith('SUPABASE_') || k.startsWith('EDGE_WORKER_') || k === 'SB_EXECUTION_ID').join(', ')}\n` + 'See docs to learn how to prepare the environment:\n' + 'https://www.pgflow.dev/how-to/prepare-db-string/' ); }pkgs/edge-worker/src/core/supabase-test-utils.ts (1)
105-116: Consider expanding the mock Supabase client for better test coverage.The current mock only supports the
from().select().eq()chain. This might be insufficient for tests that use other Supabase methods likeinsert(),update(),delete(), etc.Consider creating a more comprehensive mock that supports common Supabase operations:
function createMockSupabaseClient(): SupabaseClient { const mockResponse = { data: [], error: null }; const chainableMock = { select: jest.fn().mockReturnThis(), insert: jest.fn().mockReturnThis(), update: jest.fn().mockReturnThis(), delete: jest.fn().mockReturnThis(), eq: jest.fn().mockResolvedValue(mockResponse), single: jest.fn().mockResolvedValue(mockResponse), maybeSingle: jest.fn().mockResolvedValue(mockResponse), }; return { from: jest.fn().mockReturnValue(chainableMock), auth: { getUser: jest.fn().mockResolvedValue({ data: { user: null }, error: null }), signOut: jest.fn().mockResolvedValue({ error: null }), }, } as unknown as SupabaseClient; }This would provide better flexibility in tests and allow verification of which Supabase methods were called.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
pkgs/edge-worker/deno.lockis excluded by!**/*.lockpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (63)
.changeset/clean-zoos-smoke.md(1 hunks).changeset/little-seas-lick.md(1 hunks)CLAUDE.md(1 hunks)examples/playground/supabase/functions/_flows/analyze_website.ts(1 hunks)examples/playground/supabase/functions/_tasks/saveWebsite.ts(1 hunks)pkgs/dsl/README.md(3 hunks)pkgs/dsl/__tests__/env-validation.test.ts(1 hunks)pkgs/dsl/__tests__/supabase-preset.test.ts(1 hunks)pkgs/dsl/__tests__/types/context-inference.test-d.ts(1 hunks)pkgs/dsl/__tests__/types/supabase-preset.test-d.ts(1 hunks)pkgs/dsl/package.json(1 hunks)pkgs/dsl/src/dsl.ts(11 hunks)pkgs/dsl/src/platforms/index.ts(1 hunks)pkgs/dsl/src/platforms/supabase.ts(1 hunks)pkgs/dsl/src/supabase.ts(1 hunks)pkgs/dsl/tests/context-inference.test.ts(1 hunks)pkgs/edge-worker/README.md(2 hunks)pkgs/edge-worker/deno.test.json(1 hunks)pkgs/edge-worker/src/EdgeWorker.ts(6 hunks)pkgs/edge-worker/src/__tests__/types/flow-compatibility.test-d.ts(1 hunks)pkgs/edge-worker/src/_internal/platform.ts(1 hunks)pkgs/edge-worker/src/core/context.ts(1 hunks)pkgs/edge-worker/src/core/memoize.ts(1 hunks)pkgs/edge-worker/src/core/platform-resources.ts(1 hunks)pkgs/edge-worker/src/core/sql-factory.ts(1 hunks)pkgs/edge-worker/src/core/supabase-test-utils.ts(1 hunks)pkgs/edge-worker/src/core/supabase-utils.ts(1 hunks)pkgs/edge-worker/src/core/test-context-utils.ts(1 hunks)pkgs/edge-worker/src/examples/supabase-flow-example.ts(1 hunks)pkgs/edge-worker/src/examples/type-check-example.ts(1 hunks)pkgs/edge-worker/src/flow/StepTaskExecutor.ts(5 hunks)pkgs/edge-worker/src/flow/StepTaskPoller.ts(4 hunks)pkgs/edge-worker/src/flow/createFlowWorker.ts(5 hunks)pkgs/edge-worker/src/flow/handler-types.ts(1 hunks)pkgs/edge-worker/src/index.ts(1 hunks)pkgs/edge-worker/src/platform/SupabasePlatformAdapter.ts(5 hunks)pkgs/edge-worker/src/platform/createAdapter.ts(1 hunks)pkgs/edge-worker/src/platform/index.ts(1 hunks)pkgs/edge-worker/src/platform/types.ts(3 hunks)pkgs/edge-worker/src/queue/MessageExecutor.ts(3 hunks)pkgs/edge-worker/src/queue/createQueueWorker.ts(5 hunks)pkgs/edge-worker/src/queue/types.ts(2 hunks)pkgs/edge-worker/src/test/test-helpers.ts(1 hunks)pkgs/edge-worker/src/types/currentPlatform.ts(1 hunks)pkgs/edge-worker/src/types/flowCompatibility.ts(1 hunks)pkgs/edge-worker/src/types/index.ts(1 hunks)pkgs/edge-worker/tests/fakes.ts(1 hunks)pkgs/edge-worker/tests/integration/_helpers.ts(3 hunks)pkgs/edge-worker/tests/integration/creating_queue.test.ts(2 hunks)pkgs/edge-worker/tests/integration/exponential_backoff.test.ts(2 hunks)pkgs/edge-worker/tests/integration/fixed_retry.test.ts(2 hunks)pkgs/edge-worker/tests/integration/flow/contextResourcesFlow.test.ts(1 hunks)pkgs/edge-worker/tests/integration/flow/startDelayFlow.test.ts(1 hunks)pkgs/edge-worker/tests/integration/legacy_retry_config.test.ts(2 hunks)pkgs/edge-worker/tests/integration/maxConcurrent.test.ts(2 hunks)pkgs/edge-worker/tests/integration/messageExecutorContext.test.ts(1 hunks)pkgs/edge-worker/tests/integration/retries.test.ts(2 hunks)pkgs/edge-worker/tests/integration/starting_worker.test.ts(2 hunks)pkgs/edge-worker/tests/integration/stepTaskExecutorContext.test.ts(1 hunks)pkgs/edge-worker/tests/unit/contextUtils.test.ts(1 hunks)pkgs/edge-worker/tests/unit/memoize.test.ts(1 hunks)pkgs/edge-worker/tests/unit/supabaseUtils.test.ts(1 hunks)pkgs/website/src/content/docs/concepts/context.mdx(1 hunks)
🧰 Additional context used
🧠 Learnings (62)
📓 Common learnings
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : The name of the project should only ever be used as lowercase: pgflow. Never use: pgFlow, PgFlow, Pgflow, PGFlow. The only exception is in class names, where 'Pgflow' can be used (PascalCase).
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/website/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:40.719Z
Learning: When contributing to documentation, emphasize a Postgres-first mindset, maintain three-layer clarity (DSL, SQL Core, Edge Worker), use progressive disclosure, demonstrate real-world usage in code examples, and cross-reference related content.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/pkgs/core/schemas/**/*.sql : Use SECURITY DEFINER for pgflow functions that need to access internal tables
CLAUDE.md (12)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-02T15:52:49.919Z
Learning: Follow the Nx monorepo conventions and best practices as described in @.claude/nx_mcp.md
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-02T15:52:49.919Z
Learning: Adhere to codebase structure and organization guidelines as described in @.claude/codebase.md
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-02T15:52:49.919Z
Learning: Respect character and style guidelines for code and documentation as described in @.claude/character_guidelines.md
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-02T15:52:49.919Z
Learning: Follow testing guidelines as described in @.claude/testing_guidelines.md
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-02T15:52:49.919Z
Learning: Follow package management and organization guidelines as described in @.claude/packages.md
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-02T15:52:49.919Z
Learning: Adhere to the project's naming conventions as outlined in @.claude/naming_convention.md
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-02T15:52:49.919Z
Learning: Follow code style conventions as described in @.claude/code_style.md
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-02T15:52:49.919Z
Learning: Apply advanced AI usage guidelines as described in @.claude/advanced_ai.md
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-02T15:52:49.919Z
Learning: Follow Diátaxis documentation framework principles as described in @.claude/diataxis.md
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/cli/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:25.442Z
Learning: Always prioritize the CLI command design patterns outlined in CLAUDE.md when implementing technical details from the API reference.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-02T15:52:49.919Z
Learning: Follow MCP crawler guidelines as described in @.claude/mcp_crawler.md
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-02T15:52:49.919Z
Learning: Use the prescribed build and test commands as described in @.claude/build_test_commands.md
pkgs/edge-worker/src/platform/index.ts (4)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
pkgs/edge-worker/src/_internal/platform.ts (6)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
pkgs/edge-worker/tests/integration/creating_queue.test.ts (6)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
pkgs/dsl/src/supabase.ts (3)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Use Supabase for backend with Edge Functions.
pkgs/edge-worker/tests/integration/retries.test.ts (7)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
pkgs/edge-worker/tests/integration/exponential_backoff.test.ts (7)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
pkgs/edge-worker/tests/integration/starting_worker.test.ts (7)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
pkgs/dsl/src/platforms/index.ts (5)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Applies to examples/playground/**/*.{ts,tsx} : Use strict mode with proper type annotations in TypeScript.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Applies to examples/playground/**/*.{ts,tsx,js,jsx} : Use `@/` alias prefix for project imports (e.g., `@/components/ui/button`).
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
pkgs/edge-worker/tests/integration/flow/startDelayFlow.test.ts (3)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
pkgs/edge-worker/src/index.ts (7)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
pkgs/edge-worker/src/core/sql-factory.ts (5)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Keep Edge Worker lightweight - heavy logic should go in the SQL Core (Layer 2).
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Use Supabase for backend with Edge Functions.
pkgs/edge-worker/tests/fakes.ts (6)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
pkgs/edge-worker/tests/unit/supabaseUtils.test.ts (8)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
pkgs/edge-worker/tests/integration/legacy_retry_config.test.ts (7)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
pkgs/edge-worker/tests/integration/maxConcurrent.test.ts (7)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
pkgs/edge-worker/src/flow/handler-types.ts (5)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Use Supabase for backend with Edge Functions.
pkgs/edge-worker/src/core/memoize.ts (3)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
pkgs/edge-worker/tests/integration/fixed_retry.test.ts (7)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
pkgs/edge-worker/src/platform/createAdapter.ts (3)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
.changeset/clean-zoos-smoke.md (5)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : The name of the project should only ever be used as lowercase: pgflow. Never use: pgFlow, PgFlow, Pgflow, PGFlow. The only exception is in class names, where 'Pgflow' can be used (PascalCase).
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Remember that Edge Worker is stateless and can restart at any time.
pkgs/edge-worker/src/queue/types.ts (3)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
pkgs/dsl/__tests__/supabase-preset.test.ts (7)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/supabase/config.toml : The supabase/config.toml file must include '[api] schemas = ["public", "graphql_public", "pgflow"]' to allow integration tests to access the pgflow schema
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Applies to examples/playground/**/*.{ts,tsx} : Use strict mode with proper type annotations in TypeScript.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
pkgs/edge-worker/src/examples/type-check-example.ts (12)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Applies to examples/playground/**/*.{ts,tsx} : Use strict mode with proper type annotations in TypeScript.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : The name of the project should only ever be used as lowercase: pgflow. Never use: pgFlow, PgFlow, Pgflow, PGFlow. The only exception is in class names, where 'Pgflow' can be used (PascalCase).
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Applies to examples/playground/**/*.{tsx} : Use proper error boundaries and form validation for error handling.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Use Supabase for backend with Edge Functions.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Keep Edge Worker lightweight - heavy logic should go in the SQL Core (Layer 2).
pkgs/edge-worker/src/flow/StepTaskPoller.ts (3)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
pkgs/edge-worker/tests/unit/memoize.test.ts (7)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
pkgs/dsl/__tests__/types/context-inference.test-d.ts (7)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Applies to examples/playground/**/*.{ts,tsx} : Use strict mode with proper type annotations in TypeScript.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
.changeset/little-seas-lick.md (2)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Use Supabase for backend with Edge Functions.
pkgs/edge-worker/src/core/platform-resources.ts (3)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
pkgs/edge-worker/deno.test.json (11)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/supabase/config.toml : The supabase/config.toml file must include '[api] schemas = ["public", "graphql_public", "pgflow"]' to allow integration tests to access the pgflow schema
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Use Supabase for backend with Edge Functions.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : The name of the project should only ever be used as lowercase: pgflow. Never use: pgFlow, PgFlow, Pgflow, PGFlow. The only exception is in class names, where 'Pgflow' can be used (PascalCase).
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Applies to examples/playground/**/*.{ts,tsx} : Use strict mode with proper type annotations in TypeScript.
pkgs/edge-worker/src/examples/supabase-flow-example.ts (8)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Use Supabase for backend with Edge Functions.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : The name of the project should only ever be used as lowercase: pgflow. Never use: pgFlow, PgFlow, Pgflow, PGFlow. The only exception is in class names, where 'Pgflow' can be used (PascalCase).
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Keep Edge Worker lightweight - heavy logic should go in the SQL Core (Layer 2).
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Remember that Edge Worker is stateless and can restart at any time.
pkgs/edge-worker/src/core/supabase-utils.ts (5)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Use Supabase for backend with Edge Functions.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
pkgs/dsl/package.json (5)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/supabase/config.toml : The supabase/config.toml file must include '[api] schemas = ["public", "graphql_public", "pgflow"]' to allow integration tests to access the pgflow schema
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Use Supabase for backend with Edge Functions.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
pkgs/edge-worker/tests/integration/stepTaskExecutorContext.test.ts (7)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
pkgs/edge-worker/src/types/index.ts (8)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Applies to examples/playground/**/*.{ts,tsx} : Use strict mode with proper type annotations in TypeScript.
pkgs/edge-worker/src/__tests__/types/flow-compatibility.test-d.ts (11)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Applies to examples/playground/**/*.{ts,tsx} : Use strict mode with proper type annotations in TypeScript.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : The name of the project should only ever be used as lowercase: pgflow. Never use: pgFlow, PgFlow, Pgflow, PGFlow. The only exception is in class names, where 'Pgflow' can be used (PascalCase).
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/supabase/config.toml : The supabase/config.toml file must include '[api] schemas = ["public", "graphql_public", "pgflow"]' to allow integration tests to access the pgflow schema
pkgs/edge-worker/src/platform/types.ts (3)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
examples/playground/supabase/functions/_tasks/saveWebsite.ts (1)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Use Supabase for backend with Edge Functions.
pkgs/edge-worker/tests/unit/contextUtils.test.ts (7)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
pkgs/edge-worker/tests/integration/messageExecutorContext.test.ts (7)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
pkgs/dsl/tests/context-inference.test.ts (6)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Applies to examples/playground/**/*.{ts,tsx} : Use strict mode with proper type annotations in TypeScript.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
pkgs/dsl/__tests__/types/supabase-preset.test-d.ts (9)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Applies to examples/playground/**/*.{ts,tsx} : Use strict mode with proper type annotations in TypeScript.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/supabase/config.toml : The supabase/config.toml file must include '[api] schemas = ["public", "graphql_public", "pgflow"]' to allow integration tests to access the pgflow schema
pkgs/edge-worker/README.md (8)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/website/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:40.719Z
Learning: When contributing to documentation, emphasize a Postgres-first mindset, maintain three-layer clarity (DSL, SQL Core, Edge Worker), use progressive disclosure, demonstrate real-world usage in code examples, and cross-reference related content.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : The name of the project should only ever be used as lowercase: pgflow. Never use: pgFlow, PgFlow, Pgflow, PGFlow. The only exception is in class names, where 'Pgflow' can be used (PascalCase).
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Keep Edge Worker lightweight - heavy logic should go in the SQL Core (Layer 2).
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Remember that Edge Worker is stateless and can restart at any time.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Use Supabase for backend with Edge Functions.
pkgs/edge-worker/tests/integration/flow/contextResourcesFlow.test.ts (6)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
pkgs/edge-worker/src/core/test-context-utils.ts (7)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
pkgs/edge-worker/src/queue/MessageExecutor.ts (1)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
pkgs/dsl/__tests__/env-validation.test.ts (7)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Applies to examples/playground/**/*.{ts,tsx} : Use strict mode with proper type annotations in TypeScript.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Applies to examples/playground/**/*.{tsx} : Use proper error boundaries and form validation for error handling.
pkgs/edge-worker/src/types/flowCompatibility.ts (4)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : The name of the project should only ever be used as lowercase: pgflow. Never use: pgFlow, PgFlow, Pgflow, PGFlow. The only exception is in class names, where 'Pgflow' can be used (PascalCase).
pkgs/edge-worker/src/types/currentPlatform.ts (8)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : The name of the project should only ever be used as lowercase: pgflow. Never use: pgFlow, PgFlow, Pgflow, PGFlow. The only exception is in class names, where 'Pgflow' can be used (PascalCase).
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Applies to examples/playground/**/*.{ts,tsx} : Use strict mode with proper type annotations in TypeScript.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
pkgs/dsl/README.md (8)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/website/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:40.719Z
Learning: When contributing to documentation, emphasize a Postgres-first mindset, maintain three-layer clarity (DSL, SQL Core, Edge Worker), use progressive disclosure, demonstrate real-world usage in code examples, and cross-reference related content.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/cli/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:25.442Z
Learning: Applies to pkgs/cli/cli/**/*.{js,ts} : Minimize output in CLI commands for pgflow: only show information directly valuable to the user, avoid redundant or duplicate messages, keep feedback concise and informative, and do not use spinners or excessive progress indicators.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/cli/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:25.442Z
Learning: Applies to pkgs/cli/cli/**/*.{js,ts} : CLI commands should check state/resources without user interaction, print a success message and exit cleanly if no changes are needed, and for changes: show what will be changed (using `note()`), get confirmation (unless auto-confirmed), make changes, and report success or error, avoiding spinners and progress indicators.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : The name of the project should only ever be used as lowercase: pgflow. Never use: pgFlow, PgFlow, Pgflow, PGFlow. The only exception is in class names, where 'Pgflow' can be used (PascalCase).
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-02T15:52:49.919Z
Learning: Follow Diátaxis documentation framework principles as described in @.claude/diataxis.md
pkgs/edge-worker/src/flow/createFlowWorker.ts (4)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : The name of the project should only ever be used as lowercase: pgflow. Never use: pgFlow, PgFlow, Pgflow, PGFlow. The only exception is in class names, where 'Pgflow' can be used (PascalCase).
pkgs/edge-worker/src/queue/createQueueWorker.ts (3)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
pkgs/edge-worker/src/test/test-helpers.ts (9)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Use Supabase for backend with Edge Functions.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/supabase/config.toml : The supabase/config.toml file must include '[api] schemas = ["public", "graphql_public", "pgflow"]' to allow integration tests to access the pgflow schema
pkgs/edge-worker/src/flow/StepTaskExecutor.ts (2)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
pkgs/edge-worker/tests/integration/_helpers.ts (12)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : The name of the project should only ever be used as lowercase: pgflow. Never use: pgFlow, PgFlow, Pgflow, PGFlow. The only exception is in class names, where 'Pgflow' can be used (PascalCase).
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/supabase/config.toml : The supabase/config.toml file must include '[api] schemas = ["public", "graphql_public", "pgflow"]' to allow integration tests to access the pgflow schema
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/pkgs/core/schemas/**/*.sql : Use SECURITY DEFINER for pgflow functions that need to access internal tables
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Use Supabase for backend with Edge Functions.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/pkgs/core/schemas/**/*.sql : Grant only minimal required permissions to the API user (anon role) for pgflow schema, functions, and tables
pkgs/edge-worker/src/platform/SupabasePlatformAdapter.ts (6)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Use Supabase for backend with Edge Functions.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Remember that Edge Worker is stateless and can restart at any time.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Applies to examples/playground/**/*.{tsx} : Use proper error boundaries and form validation for error handling.
pkgs/edge-worker/src/EdgeWorker.ts (8)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : The name of the project should only ever be used as lowercase: pgflow. Never use: pgFlow, PgFlow, Pgflow, PGFlow. The only exception is in class names, where 'Pgflow' can be used (PascalCase).
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Keep Edge Worker lightweight - heavy logic should go in the SQL Core (Layer 2).
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Remember that Edge Worker is stateless and can restart at any time.
pkgs/dsl/src/platforms/supabase.ts (7)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Use Supabase for backend with Edge Functions.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Applies to examples/playground/**/*.{ts,tsx} : Use strict mode with proper type annotations in TypeScript.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : The name of the project should only ever be used as lowercase: pgflow. Never use: pgFlow, PgFlow, Pgflow, PGFlow. The only exception is in class names, where 'Pgflow' can be used (PascalCase).
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/supabase/config.toml : The supabase/config.toml file must include '[api] schemas = ["public", "graphql_public", "pgflow"]' to allow integration tests to access the pgflow schema
pkgs/edge-worker/src/core/context.ts (6)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
pkgs/edge-worker/src/core/supabase-test-utils.ts (8)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/integration/**/*.{ts,tsx} : Integration tests should be placed in 'tests/integration/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/unit/**/*.{ts,tsx} : Unit tests should be placed in 'tests/unit/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/src/**/*.{ts,tsx} : Make changes to TypeScript files in the 'src/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/tests/e2e/**/*.{ts,tsx} : E2E tests should be placed in 'tests/e2e/' directory.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : When adding configuration options, provide sensible defaults.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{test,spec}.{ts,tsx} : Write comprehensive tests for all client functionality
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: examples/playground/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:04.790Z
Learning: Use Supabase for backend with Edge Functions.
pkgs/dsl/src/dsl.ts (2)
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/edge-worker/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:54:04.123Z
Learning: Applies to pkgs/edge-worker/**/*.{ts,tsx} : Follow TypeScript strict mode with proper type annotations.
Learnt from: CR
PR: pgflow-dev/pgflow#0
File: pkgs/client/CLAUDE.md:0-0
Timestamp: 2025-07-02T15:53:40.127Z
Learning: Applies to pkgs/client/packages/client/**/*.{ts,tsx} : Follow TypeScript best practices with proper type annotations
🧬 Code Graph Analysis (25)
pkgs/edge-worker/tests/integration/creating_queue.test.ts (2)
pkgs/edge-worker/tests/fakes.ts (1)
createFakeLogger(12-12)pkgs/edge-worker/tests/integration/_helpers.ts (1)
createTestPlatformAdapter(32-49)
pkgs/edge-worker/tests/integration/retries.test.ts (2)
pkgs/edge-worker/tests/fakes.ts (1)
createFakeLogger(12-12)pkgs/edge-worker/tests/integration/_helpers.ts (1)
createTestPlatformAdapter(32-49)
pkgs/edge-worker/tests/integration/starting_worker.test.ts (2)
pkgs/edge-worker/tests/fakes.ts (1)
createFakeLogger(12-12)pkgs/edge-worker/tests/integration/_helpers.ts (1)
createTestPlatformAdapter(32-49)
pkgs/edge-worker/tests/fakes.ts (1)
pkgs/edge-worker/src/platform/types.ts (1)
CreateLoggerFn(16-16)
pkgs/edge-worker/tests/integration/legacy_retry_config.test.ts (1)
pkgs/edge-worker/tests/integration/_helpers.ts (1)
createTestPlatformAdapter(32-49)
pkgs/edge-worker/src/flow/handler-types.ts (2)
pkgs/dsl/src/dsl.ts (2)
Json(8-14)AnyFlow(73-73)pkgs/edge-worker/src/core/context.ts (1)
SupabaseStepTaskContext(76-77)
pkgs/edge-worker/tests/integration/fixed_retry.test.ts (2)
pkgs/edge-worker/tests/fakes.ts (1)
createFakeLogger(12-12)pkgs/edge-worker/tests/integration/_helpers.ts (1)
createTestPlatformAdapter(32-49)
pkgs/edge-worker/src/platform/createAdapter.ts (3)
pkgs/edge-worker/src/platform/types.ts (1)
PlatformAdapter(27-59)pkgs/dsl/src/platforms/supabase.ts (1)
SupabaseResources(11-15)pkgs/edge-worker/src/platform/SupabasePlatformAdapter.ts (1)
SupabasePlatformAdapter(37-265)
pkgs/edge-worker/src/queue/types.ts (2)
pkgs/core/src/types.ts (1)
Json(10-16)pkgs/edge-worker/src/core/context.ts (1)
MessageHandlerContext(60-63)
pkgs/dsl/__tests__/supabase-preset.test.ts (2)
pkgs/dsl/src/platforms/supabase.ts (1)
Flow(46-55)pkgs/dsl/src/dsl.ts (1)
Flow(245-410)
pkgs/edge-worker/src/examples/type-check-example.ts (2)
pkgs/dsl/src/dsl.ts (1)
Flow(245-410)pkgs/edge-worker/src/EdgeWorker.ts (1)
EdgeWorker(52-239)
pkgs/edge-worker/tests/unit/memoize.test.ts (1)
pkgs/edge-worker/src/core/memoize.ts (1)
memoize(5-16)
pkgs/edge-worker/tests/integration/stepTaskExecutorContext.test.ts (2)
pkgs/dsl/src/platforms/supabase.ts (2)
SupabaseEnv(18-25)Flow(46-55)pkgs/edge-worker/src/core/supabase-test-utils.ts (1)
createFlowWorkerContext(62-103)
examples/playground/supabase/functions/_tasks/saveWebsite.ts (1)
examples/playground/supabase/functions/database-types.d.ts (1)
Database(9-542)
pkgs/edge-worker/tests/unit/contextUtils.test.ts (3)
pkgs/edge-worker/src/queue/types.ts (1)
PgmqMessageRecord(9-15)pkgs/edge-worker/src/test/test-helpers.ts (3)
createSupabaseMessageContext(18-51)createSupabaseStepTaskContext(57-92)createMockSupabaseResources(106-113)pkgs/edge-worker/src/core/test-context-utils.ts (1)
createTestMessageContext(37-37)
pkgs/edge-worker/tests/integration/messageExecutorContext.test.ts (4)
pkgs/dsl/src/platforms/supabase.ts (1)
SupabaseEnv(18-25)pkgs/edge-worker/tests/fakes.ts (1)
createFakeLogger(12-12)pkgs/edge-worker/src/queue/types.ts (1)
PgmqMessageRecord(9-15)pkgs/edge-worker/src/core/supabase-test-utils.ts (1)
createQueueWorkerContext(19-55)
pkgs/dsl/tests/context-inference.test.ts (2)
pkgs/client/src/lib/FlowRun.ts (1)
input(90-92)pkgs/dsl/src/dsl.ts (1)
ExtractFlowContext(147-154)
pkgs/edge-worker/src/core/test-context-utils.ts (3)
pkgs/dsl/src/dsl.ts (3)
Json(8-14)AnyFlow(73-73)AllStepInputs(96-98)pkgs/edge-worker/src/queue/types.ts (1)
PgmqMessageRecord(9-15)pkgs/edge-worker/src/core/context.ts (2)
MessageContext(33-36)StepTaskContext(39-42)
pkgs/edge-worker/src/queue/MessageExecutor.ts (5)
pkgs/core/src/database-types.ts (1)
Json(1-7)pkgs/edge-worker/src/core/context.ts (1)
MessageHandlerContext(60-63)pkgs/edge-worker/src/platform/types.ts (1)
Logger(6-11)pkgs/edge-worker/src/queue/Queue.ts (1)
Queue(6-116)pkgs/edge-worker/src/queue/types.ts (2)
MessageHandlerFn(22-25)PgmqMessageRecord(9-15)
pkgs/edge-worker/src/types/flowCompatibility.ts (2)
pkgs/dsl/src/dsl.ts (2)
AnyFlow(73-73)ExtractFlowContext(147-154)pkgs/edge-worker/src/types/currentPlatform.ts (1)
AvailableResources(20-20)
pkgs/edge-worker/src/types/currentPlatform.ts (2)
pkgs/dsl/src/platforms/supabase.ts (1)
SupabaseResources(11-15)pkgs/dsl/src/dsl.ts (1)
BaseContext(213-216)
pkgs/edge-worker/src/queue/createQueueWorker.ts (4)
pkgs/edge-worker/src/queue/types.ts (1)
MessageHandlerFn(22-25)pkgs/edge-worker/src/core/context.ts (1)
MessageHandlerContext(60-63)pkgs/edge-worker/src/platform/types.ts (2)
Logger(6-11)PlatformAdapter(27-59)pkgs/edge-worker/src/queue/MessageExecutor.ts (2)
record(39-41)MessageExecutor(23-122)
pkgs/edge-worker/tests/integration/_helpers.ts (5)
pkgs/dsl/src/platforms/supabase.ts (2)
SupabaseEnv(18-25)SupabaseResources(11-15)pkgs/edge-worker/tests/sql.ts (1)
postgres(46-46)pkgs/edge-worker/src/platform/types.ts (1)
PlatformAdapter(27-59)pkgs/edge-worker/src/core/supabase-utils.ts (2)
createAnonSupabaseClient(13-20)createServiceSupabaseClient(26-33)pkgs/edge-worker/src/flow/createFlowWorker.ts (2)
FlowWorkerConfig(18-71)createFlowWorker(83-187)
pkgs/dsl/src/platforms/supabase.ts (3)
pkgs/dsl/src/dsl.ts (12)
Env(31-33)BaseContext(213-216)ValidEnv(36-36)UserEnv(40-40)Json(8-14)AnyFlow(73-73)Flow(245-410)AnyInput(47-47)AnySteps(52-52)EmptySteps(51-51)AnyDeps(57-57)EmptyDeps(55-55)pkgs/dsl/src/platforms/index.ts (1)
BaseContext(2-2)pkgs/edge-worker/src/core/context.ts (2)
SupabaseMessageContext(73-74)SupabaseStepTaskContext(76-77)
pkgs/edge-worker/src/core/context.ts (5)
pkgs/dsl/src/dsl.ts (4)
BaseContext(213-216)Json(8-14)AnyFlow(73-73)AllStepInputs(96-98)pkgs/dsl/src/platforms/index.ts (1)
BaseContext(2-2)pkgs/edge-worker/src/index.ts (2)
Json(19-19)StepTaskRecord(13-13)pkgs/edge-worker/src/queue/types.ts (1)
PgmqMessageRecord(9-15)pkgs/dsl/src/platforms/supabase.ts (3)
SupabaseMessageContext(34-37)SupabaseResources(11-15)SupabaseStepTaskContext(39-43)
🪛 LanguageTool
pkgs/website/src/content/docs/concepts/context.mdx
[grammar] ~112-~112: Ensure spelling is correct
Context: ...* Always The original message from the pgmq queue, containing metadata like message...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 GitHub Check: build-and-test
pkgs/edge-worker/tests/integration/_helpers.ts
[failure] 11-11:
�[0m�[1mcreateSql is never used
[failure] 11-11:
�[0m�[1mAll import identifiers are used in types
[failure] 10-10:
�[0m�[1mUserEnv is never used
[failure] 10-10:
�[0m�[1mValidEnv is never used
[failure] 1-1:
�[0m�[1mJson is never used
pkgs/edge-worker/src/core/supabase-test-utils.ts
[failure] 12-12:
�[0m�[1mUserEnv is never used
[failure] 12-12:
�[0m�[1mValidEnv is never used
[failure] 11-11:
�[0m�[1mSupabasePlatformContext is never used
[failure] 8-8:
�[0m�[1mSupabaseStepTaskContext is never used
[failure] 7-7:
�[0m�[1mSupabaseMessageContext is never used
🪛 Biome (1.9.4)
pkgs/edge-worker/src/EdgeWorker.ts
[error] 94-94: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.
(lint/complexity/noThisInStatic)
[error] 99-99: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.
(lint/complexity/noThisInStatic)
[error] 161-161: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.
(lint/complexity/noThisInStatic)
[error] 162-162: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.
(lint/complexity/noThisInStatic)
[error] 165-165: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.
(lint/complexity/noThisInStatic)
[error] 166-166: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.
(lint/complexity/noThisInStatic)
[error] 214-214: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.
(lint/complexity/noThisInStatic)
[error] 217-217: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.
(lint/complexity/noThisInStatic)
[error] 218-218: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.
(lint/complexity/noThisInStatic)
🪛 GitHub Actions: CI
pkgs/edge-worker/src/core/supabase-test-utils.ts
[error] 7-7: ESLint: 'SupabaseMessageContext' is defined but never used. (no-unused-vars)
🔇 Additional comments (154)
pkgs/edge-worker/src/platform/index.ts (1)
3-3: LGTM: Platform adapter export updated correctly.The export change from
DenoAdaptertoSupabasePlatformAdapteraligns with the PR's goal of introducing a Supabase-specific platform adapter that provides richer context and resource management.pkgs/edge-worker/src/_internal/platform.ts (1)
3-3: LGTM: Internal platform adapter export updated consistently.The export change maintains consistency with the platform adapter refactoring, ensuring internal modules reference the updated
SupabasePlatformAdapter.pkgs/edge-worker/tests/integration/starting_worker.test.ts (2)
4-4: LGTM: Platform adapter helper imported correctly.The import of
createTestPlatformAdapterfrom the local helpers module enables the test to provide proper platform context for the queue worker.
16-18: LGTM: Platform adapter properly integrated into worker creation.The test correctly passes the platform adapter as the fourth parameter to
createQueueWorker, ensuring the worker has access to platform resources like SQL clients and Supabase clients during testing.pkgs/edge-worker/tests/integration/legacy_retry_config.test.ts (2)
3-3: LGTM: Test platform adapter imported correctly.The import aligns with the pattern used across integration tests to provide platform context for worker creation.
70-72: LGTM: Platform adapter integration preserves test functionality.The legacy retry configuration test correctly integrates the platform adapter while maintaining its core purpose of verifying backward compatibility for deprecated retry settings.
pkgs/edge-worker/src/index.ts (1)
27-28: LGTM: Context type export enables type-safe usage.The export of the
Contexttype is essential for enabling consumers to properly type their handlers when using the optional context parameter. This supports the PR's goal of providing type-safe access to platform resources.pkgs/dsl/src/supabase.ts (1)
1-2: LGTM! Clean public API entry point.The re-export pattern is appropriate for exposing the Supabase platform integration as a public API. The
.jsextension in the import path is correct for ES module compatibility.pkgs/edge-worker/tests/integration/creating_queue.test.ts (2)
7-7: LGTM! Proper import of test helper.The import of
createTestPlatformAdapteraligns with the new platform adapter pattern being introduced across the codebase.
19-20: LGTM! Correct platform adapter integration.The addition of
createFakeLoggerandcreateTestPlatformAdapter(sql)parameters correctly implements the newcreateQueueWorkersignature that requires a platform adapter for providing environment variables, shutdown signals, and platform-specific resources.pkgs/edge-worker/tests/integration/flow/startDelayFlow.test.ts (1)
38-38: LGTM! Good type safety improvement.The explicit type casting of
input.immediatetonumberbefore the arithmetic operation improves type safety and prevents potential runtime errors. This is a good defensive programming practice.pkgs/edge-worker/tests/integration/retries.test.ts (2)
3-3: LGTM! Consistent platform adapter integration.The import of
createTestPlatformAdapterfollows the same pattern as other integration tests, maintaining consistency across the test suite.
43-44: LGTM! Correct worker creation parameters.The addition of
createFakeLoggerandcreateTestPlatformAdapter(sql)parameters correctly implements the updatedcreateQueueWorkersignature, ensuring the test has access to the platform adapter's resources and lifecycle hooks.pkgs/edge-worker/tests/integration/fixed_retry.test.ts (2)
3-3: LGTM! Consistent test helper integration.The import of
createTestPlatformAdaptermaintains consistency with the platform adapter pattern implemented across all integration tests.
65-66: LGTM! Proper platform adapter implementation.The addition of
createFakeLoggerandcreateTestPlatformAdapter(sql)parameters correctly updates the test to use the newcreateQueueWorkersignature, ensuring the worker has access to platform-specific resources and context.pkgs/edge-worker/src/types/index.ts (1)
1-2: Clean barrel export implementation.The re-export pattern is well-structured and follows ESM conventions with proper .js extensions. This provides a centralized access point for type definitions.
pkgs/edge-worker/tests/integration/maxConcurrent.test.ts (2)
3-3: Proper integration with platform adapter architecture.The import of
createTestPlatformAdapteraligns with the new context system requirements.
30-31: Correct platform adapter integration.The addition of
createTestPlatformAdapter(sql)maintains the test's functionality while supporting the new context-aware architecture.pkgs/edge-worker/tests/fakes.ts (1)
12-12: Correct interface implementation.The function signature now properly matches the
CreateLoggerFntype, and the underscore prefix correctly indicates the unused parameter in the fake implementation.pkgs/dsl/src/platforms/index.ts (1)
1-4: Well-structured platform types foundation.The re-export of core context types provides a clean API for platform implementations, and the future-oriented comment demonstrates thoughtful design planning.
pkgs/edge-worker/src/core/sql-factory.ts (1)
4-6: Clean interface design.The
SqlEnvinterface provides a clear contract for the required environment variables.pkgs/edge-worker/tests/integration/exponential_backoff.test.ts (2)
3-3: LGTM! Import addition supports platform adapter integration.The import of
createTestPlatformAdapteraligns with the PR's objective of adding context objects to handlers through platform adapters.
68-69: LGTM! Platform adapter parameter addition maintains test functionality.The addition of
createTestPlatformAdapter(sql)as a parameter tocreateQueueWorkercorrectly integrates with the new platform adapter pattern while preserving the test's exponential backoff verification logic.pkgs/edge-worker/src/core/memoize.ts (1)
1-16: LGTM! Clean and correct memoization implementation.The memoization utility follows a solid closure pattern with proper TypeScript typing. The implementation correctly caches the first function call result and returns it on subsequent calls without re-execution.
examples/playground/supabase/functions/_flows/analyze_website.ts (1)
33-46: LGTM! Context parameter integration demonstrates new pattern effectively.The step handler correctly accepts the context parameter and extracts
serviceSupabaseto pass to thesaveWebsitefunction. This demonstrates the new pattern of accessing platform resources through context instead of creating connections within handlers.pkgs/edge-worker/deno.test.json (1)
16-18: LGTM! Import additions support Supabase platform integration.The new imports correctly enable access to Supabase-specific DSL presets and the official Supabase client library. The version constraint
^2.39.0for the Supabase client follows semantic versioning best practices.pkgs/edge-worker/src/flow/handler-types.ts (1)
1-9: LGTM! Well-structured type definition with proper constraints.The
SupabaseStepTaskHandlerFntype is well-designed with appropriate generic constraints:
Jsonconstraints ensure serializable input/outputAnyFlowconstraint maintains flow compatibility- Support for both sync and async return types provides flexibility
- Context parameter enables access to Supabase platform resources
The type definition follows TypeScript best practices and aligns with the PR's objective of providing strongly typed context to handlers.
.changeset/clean-zoos-smoke.md (1)
1-10: Well-documented breaking change.The changeset clearly explains the rationale for removing the PlatformAdapter from the public API and appropriately warns about the breaking change. The documentation is accurate and aligns with the PR's goal of encapsulating internal implementation details.
pkgs/edge-worker/tests/unit/memoize.test.ts (4)
4-24: Comprehensive test coverage for memoization behavior.The test effectively verifies that the memoized function calls the original function only once and returns the cached result on subsequent calls. The use of
callCountto track invocations is a solid approach.
26-40: Good validation of object reference consistency.This test ensures that the memoized function returns the exact same object reference, which is crucial for performance optimization and maintaining object identity.
42-54: Proper handling of falsy values.The test correctly verifies that
nullandundefinedvalues are properly cached and returned, which is important for edge cases where the memoized function might return falsy values.
56-73: Independence verification between memoized functions.This test ensures that different memoized functions maintain separate caches, which is essential for the correct behavior of the memoization utility.
pkgs/edge-worker/src/platform/createAdapter.ts (1)
2-3: Good transition to Supabase-specific adapter.The import changes align with the PR's goal of providing typed platform resources through the context object.
pkgs/edge-worker/tests/unit/supabaseUtils.test.ts (5)
7-12: Well-structured test setup with mock environment.The mock environment variables provide a clean foundation for testing without requiring actual Supabase credentials.
14-35: Comprehensive testing of client creation and instance behavior.The tests verify both successful client creation and the important behavior that new instances are created each time (no memoization), which is crucial for understanding the resource lifecycle.
37-58: Good coverage of service client creation.The tests mirror the anonymous client tests, ensuring consistent behavior across both client types.
60-66: Important isolation verification.This test ensures that anonymous and service clients are distinct instances, which is crucial for security and proper resource management.
68-76: Good edge case coverage.Testing URL formats with trailing slashes is a practical edge case that could occur in real deployments.
pkgs/edge-worker/src/queue/types.ts (2)
2-2: Good import addition for context support.The import of
MessageHandlerContextenables the type system to provide proper context typing for queue handlers.
17-25: Excellent type-safe implementation of context parameter.The updated
MessageHandlerFntype properly adds the context parameter with appropriate generic constraints. The type definition ensures that:
- The context parameter is properly typed and constrained
- The payload type is consistent between message and context
- Type safety is maintained through proper generic usage
This aligns perfectly with the PR's goal of adding platform resource access through the context object.
pkgs/edge-worker/src/types/currentPlatform.ts (1)
1-20: Well-designed platform abstraction with clear MVP scope.The type definitions are clean and the documentation clearly explains the current MVP limitations and future extensibility plans. The separation between
CurrentPlatformResourcesandAvailableResourcesprovides a good foundation for the platform abstraction.pkgs/edge-worker/src/types/flowCompatibility.ts (1)
1-17: Excellent type-safe compatibility checking.The conditional type logic correctly ensures that flows can only be used if their context requirements are satisfied by the platform's available resources. The generic
Customparameter is well-positioned for future extensibility, and the documentation clearly explains the current MVP scope.pkgs/edge-worker/src/core/platform-resources.ts (1)
1-27: Well-designed platform abstraction interface.The
PlatformResourcesinterface provides a clean abstraction for platform-specific resources. ThesqlFactoryapproach is particularly well-designed, allowing flexible connection management based on max connections. The documentation is comprehensive and the future additions are appropriately noted.pkgs/dsl/package.json (2)
18-25: Appropriate package exports for platform support.The new exports for
./platformsand./supabaseare correctly structured and align with the new platform-specific modules introduced in the DSL package.
32-33: Action Required: Verify & Bump Dependencies for SecurityThe latest npm releases for your new dependencies are higher than the versions currently specified. In addition, the security audit couldn’t run without a lockfile. Please:
pkgs/dsl/package.json (lines 32–33)
- postgres: your
"^3.4.5"constraint covers the latest v3.4.7 (npm). Consider updating to"^3.4.7".- @supabase/supabase-js: your
"^2.47.10"covers the latest v2.50.5. Consider updating to"^2.50.5".Security audit: generate a lockfile and re-run the audit locally:
npm install --package-lock-only npm audit --audit-level=moderateAddress any reported vulnerabilities before merging.
pkgs/dsl/__tests__/supabase-preset.test.ts (2)
1-28: Excellent type safety verification test.The first test effectively verifies that the Supabase preset Flow provides full type safety and autocomplete for all platform resources without requiring explicit type annotations. The approach of accessing each resource property ensures the types are correctly inferred.
30-52: Good coverage of custom resource extensibility.The second test properly verifies that custom resources can be added on top of platform resources while maintaining type safety. The
CustomResourcesinterface provides a realistic example of how users might extend the context.pkgs/edge-worker/src/flow/StepTaskPoller.ts (3)
1-6: LGTM! Clean imports and type updatesThe updated imports properly support the new context system with
StepTaskWithMessageand related types.
39-39: Good return type update for context enhancementThe updated return type
StepTaskWithMessage<TFlow>[]properly supports the enhanced context system by pairing tasks with their messages.
89-111: Excellent task-message pairing implementationThe implementation correctly:
- Uses a Map for efficient O(1) message lookups
- Properly handles missing messages with error logging
- Maintains type safety with proper filtering
- Follows the functional programming pattern with map/filter
The error handling for missing messages is appropriate and will help with debugging.
pkgs/edge-worker/src/platform/types.ts (2)
25-27: Good generic interface designThe generic
TResourcesparameter with a sensible default ofRecord<string, never>allows platform adapters to specify their resource types while maintaining type safety.
42-57: Well-designed context resource propertiesThe new getter properties effectively expose the core context resources:
connectionString- Better as a getter than a methodenv- Properly typed environment variablesshutdownSignal- Standard AbortSignal for graceful shutdownplatformResources- Typed platform-specific resourcesThe interface design supports the new context object requirements cleanly.
pkgs/edge-worker/src/examples/supabase-flow-example.ts (4)
1-6: Clear example setupGood import structure and comments that explain the purpose of the example.
8-13: Excellent demonstration of SQL context usageThe example effectively shows:
- Template literal SQL with proper typing
- Context parameter usage (
ctx)- Real-world database query pattern
The comment about "Full autocomplete!" is a nice touch highlighting the TypeScript benefits.
14-25: Good Supabase service client exampleDemonstrates proper usage of the service role client with error handling. The example shows realistic admin notification functionality.
26-37: Comprehensive context feature demonstrationThis step effectively demonstrates:
- Anonymous Supabase client usage for public operations
- Environment variable access
- Multiple context resources in one handler
Great educational value for developers.
pkgs/edge-worker/src/core/supabase-utils.ts (3)
3-7: Well-designed environment interfaceThe
SupabaseClientEnvinterface with optional keys allows for flexible composition with intersection types in the function signatures.
9-20: Excellent anonymous client implementationThe function properly:
- Uses intersection types to ensure required environment variables
- Configures the client appropriately for edge environments
- Disables session persistence and auto-refresh (good for serverless)
- Provides clear documentation
22-33: Consistent service client implementationThe service role client follows the same pattern as the anonymous client with appropriate configuration for edge environments.
pkgs/dsl/README.md (4)
76-89: Excellent introduction to context objectThe documentation clearly introduces the context concept with a practical example that immediately shows the value proposition.
91-117: Comprehensive core context documentationThe documentation effectively covers:
- All core context resources with proper typing
- Clear interface definitions
- Practical examples showing real-world usage
- Good balance of detail without overwhelming the reader
The type interfaces are particularly helpful for developers.
118-149: Excellent platform-specific resource documentationThe Supabase section demonstrates:
- Clear import instructions for the preset
- Comprehensive example showing multiple resource types
- Real-world usage patterns
- Good TypeScript typing examples
The example effectively shows the power of the context system.
150-154: Important backward compatibility noteThe note about optional context parameter is crucial for adoption and maintains backward compatibility. The cross-reference to edge-worker documentation is helpful.
pkgs/edge-worker/src/examples/type-check-example.ts (4)
1-5: LGTM! Clean imports and type declarations.The imports are properly structured and include the necessary types for the context system demonstration.
6-16: Excellent demonstration of valid context usage.The example correctly shows how to use platform-provided resources (
sqlandserviceSupabase) in flow step handlers. The type annotations are explicit and match the expected context interface.
17-18: Good demonstration of successful type validation.The comment clearly indicates this should compile without errors, which demonstrates that the flow is compatible with the platform.
20-29: Effective use of @ts-expect-error for negative testing.The invalid flow example correctly demonstrates that the type system prevents usage of unsupported resources like
redis. The@ts-expect-errorannotation is appropriate here.examples/playground/supabase/functions/_tasks/saveWebsite.ts (2)
1-1: LGTM! Clean import structure.The type-only import is properly structured for the SupabaseClient interface.
4-9: LGTM! Well-defined interface.The WebsiteData interface correctly matches the expected database schema fields.
pkgs/dsl/__tests__/types/context-inference.test-d.ts (8)
1-17: LGTM! Comprehensive test setup.The imports are clean and the mock interfaces provide good test coverage for different resource types (SQL, Redis, Supabase).
18-36: Excellent test for minimal context.This test correctly validates that flows have BaseContext by default and don't include additional resources unless explicitly specified.
37-51: Good test for single context inference.The test correctly validates that context type annotation in handlers is properly inferred and merged with BaseContext.
53-76: Comprehensive test for context accumulation.This test effectively demonstrates how context types accumulate across multiple steps, ensuring all resources are available in the final context type.
78-99: Excellent test for explicit context parameters.The test validates that explicit context type parameters work correctly with the Flow generic type system.
101-121: Good test for mixed explicit and inferred context.This test ensures that both explicit context types and inferred context types from handlers are properly merged.
123-137: Important test for base context preservation.This test validates that BaseContext properties are always available, even when handlers only specify custom context fields.
139-160: Comprehensive test for step chaining with context.This test effectively validates that existing step input/output typing continues to work correctly alongside the new context system.
.changeset/little-seas-lick.md (4)
1-5: LGTM! Proper changeset structure.The changeset correctly identifies both affected packages with patch-level changes.
6-21: Excellent feature description with clear examples.The description clearly explains the new context parameter and provides practical code examples for both queue and flow handlers.
22-34: Comprehensive resource documentation.The documentation clearly categorizes core resources (always available) and platform-specific resources (Supabase), making it easy for developers to understand what's available.
35-42: Good guidance for Supabase preset usage.The documentation provides clear instructions on importing from the Supabase preset and emphasizes backward compatibility.
pkgs/edge-worker/tests/unit/contextUtils.test.ts (7)
1-10: LGTM! Clean test imports.The imports are properly structured and include all necessary types and utilities for testing.
11-56: Good test setup with comprehensive mocks.The mock objects provide good test isolation and cover all the necessary data structures for testing context creation.
57-74: Excellent test for Supabase message context creation.The test thoroughly validates that all expected properties are correctly assigned in the context, including core resources and Supabase clients.
76-97: Good test for flexible test context creation.This test validates that the test utilities allow for custom resource injection while maintaining core context properties.
99-118: Comprehensive test for step task context.The test properly validates that step task contexts include all necessary properties including the stepTask field.
120-130: Good test for raw message accessibility.This test ensures that raw message data is properly accessible through the context.
132-143: Excellent test for mock resource structure.The test validates that mock Supabase resources have the expected structure and methods for testing purposes.
pkgs/edge-worker/src/__tests__/types/flow-compatibility.test-d.ts (4)
14-25: Well-structured type compatibility test.The test correctly verifies that flows using only platform-provided resources (SQL and Supabase clients) are compatible with EdgeWorker. The use of explicit
Context<{ sql: Sql }>type annotations ensures type safety and documents the resource requirements clearly.
27-37: Good demonstration of base context compatibility.This test effectively shows that flows requiring only base context properties (env, shutdownSignal) work seamlessly with EdgeWorker. The implicit context typing demonstrates that platform resources are optional while base context is always available.
39-47: Essential type safety verification.This test is crucial for ensuring type safety by preventing flows that require non-platform resources from being started with EdgeWorker. The
@ts-expect-errorannotation correctly expects a TypeScript compilation error when attempting to start a flow that requires resources not provided by the platform.
49-63: Excellent demonstration of flexible resource usage.This test effectively shows that flows can use multiple platform resources across different steps while maintaining type safety. The ability to mix
sqlandserviceSupabaseresources demonstrates the flexibility of the context system for complex workflows.pkgs/dsl/tests/context-inference.test.ts (3)
17-33: Solid baseline test for minimal context.This test effectively establishes the baseline behavior for flows without explicit context requirements. The use of
@ts-expect-erroron line 26 correctly verifies that accessing non-existent properties fails at compile time, ensuring type safety.
47-70: Excellent test for context accumulation.This test is particularly valuable as it verifies that the context inference system correctly accumulates requirements across multiple steps. The progression from
sqltoredisto bothsqlandsupabasedemonstrates that the system properly merges context requirements while maintaining type safety.
126-140: Comprehensive type-level verification.These type-level assertions using
AssertEqualare excellent for ensuring theExtractFlowContextutility type works correctly across all tested scenarios. The compile-time verification provides strong guarantees about the type inference system's correctness.pkgs/edge-worker/src/queue/MessageExecutor.ts (3)
23-36: Well-designed context integration.The addition of the generic
TContextparameter with proper constraint toMessageHandlerContext<TPayload>maintains type safety while enabling flexible context typing. The constructor changes properly encapsulate the context object, providing a clean API for message execution with platform resources.
38-41: Smart convenience getter for backward compatibility.The
recordgetter provides a clean abstraction that maintains backward compatibility while leveraging the new context system. This allows existing code to continue accessing the message record without being aware of the underlying context structure.
57-59: Clean integration of context passing.The updated handler invocation correctly passes both the message payload and context as parameters. The clear comment on line 58 documents this new behavior, making it easy for developers to understand the handler signature expectations.
pkgs/dsl/__tests__/env-validation.test.ts (3)
13-27: Thorough environment variable typing verification.This test effectively verifies that the Supabase platform provides strongly typed environment variables. The distinction between required (
EDGE_WORKER_DB_URL) and optional (EDGE_WORKER_LOG_LEVEL) variables is correctly tested, while maintaining access to arbitrary environment variables as optional strings.
29-53: Excellent demonstration of custom resource integration.This test effectively shows that custom resources can be seamlessly integrated with platform resources. The verification that platform resources (
sql,anonSupabase,serviceSupabase) remain available alongside custom resources demonstrates the flexibility of the context system while maintaining type safety.
78-108: Comprehensive UserEnv augmentation validation.The module augmentation test effectively demonstrates how users can extend the environment typing system. The verification that user-defined variables (
DATABASE_URL,API_KEY) are properly typed while maintaining platform variables shows the robustness of the typing system. This is a valuable feature for customizing the platform to specific application needs.pkgs/edge-worker/tests/integration/stepTaskExecutorContext.test.ts (4)
30-95: Comprehensive context integration test.This test effectively verifies that step handlers receive all expected context properties and that they function correctly. The SQL execution test on lines 46-47 demonstrates that the context provides working database connectivity, while the assertions verify that all context properties (
sql,shutdownSignal,rawMessage) are properly available.
97-138: Critical backward compatibility verification.This test is essential for ensuring that existing single-argument handlers continue to work after the context introduction. The verification that legacy handlers receive correct input and produce expected results demonstrates that the context system maintains backward compatibility without breaking existing workflows.
199-259: Solid Supabase client availability verification.This test effectively verifies that Supabase clients are properly available in the context when the required environment variables are provided. The verification of both
anonSupabaseandserviceSupabaseclients ensures that the platform integration works correctly for different authentication scenarios.
261-348: Excellent complex flow context verification.This test provides comprehensive verification that the context system works correctly in complex, multi-step flows. The testing of SQL execution in step 1 and environment variable access in step 2 demonstrates that context is consistently available and functional across all steps, ensuring reliable operation in real-world scenarios.
pkgs/edge-worker/README.md (3)
40-51: Excellent documentation update demonstrating context usage.The updated message processor example effectively shows how the context parameter provides access to platform resources like the SQL client. The example is realistic and demonstrates proper usage patterns.
62-86: Well-structured flow example showcasing Supabase resources.The flow step processor example clearly demonstrates using the Supabase preset and accessing different context resources (
shutdownSignal,serviceSupabase). The progressive complexity from simple SQL usage to Supabase client operations is well-designed.
89-185: Comprehensive and well-organized context resources documentation.The new "Context Resources" section provides excellent coverage of both core and platform-specific resources. The documentation follows progressive disclosure principles and includes practical usage examples. The type information and availability indicators are particularly helpful for developers.
pkgs/edge-worker/tests/integration/_helpers.ts (2)
32-49: Excellent test platform adapter implementation.The
createTestPlatformAdapterfunction provides a comprehensive mock implementation that properly implements thePlatformAdapterinterface with all required Supabase resources. The default test environment variables are realistic and the structure matches the production adapter.
51-82: Proper integration of platform adapter in test helper.The updated
startWorkerfunction correctly uses the new platform adapter parameter, maintaining the test helper's functionality while supporting the new architecture.pkgs/edge-worker/src/core/test-context-utils.ts (3)
11-21: Well-designed message context utility with proper type safety.The
createMessageTestContextfunction provides a clean way to create test contexts with proper TypeScript generics and type constraints. The destructuring and reconstruction approach correctly handles the generic resource types.
23-34: Excellent step task context utility implementation.The
createStepTaskTestContextfunction follows the same pattern as the message context utility, providing consistent API design. The generic constraints properly handle flow types and resource extensions.
36-38: Good backward compatibility approach.The legacy aliases ensure existing test code continues to work while providing a migration path to the new naming convention. This demonstrates thoughtful consideration for existing codebases.
pkgs/edge-worker/tests/integration/flow/contextResourcesFlow.test.ts (2)
8-60: Comprehensive and well-structured context validation flow.The
ContextResourcesFlowprovides excellent coverage of all context resources with proper assertions for both existence and type checking. The functional SQL test adds confidence that resources are not just present but actually working. The flow structure is clean and focused on validation.
62-113: Robust integration test with proper error handling.The test properly sets up the database, manages worker lifecycle, and includes appropriate timeouts and error handling. The verification approach of checking run completion status is effective for validating that all context assertions passed.
pkgs/website/src/content/docs/concepts/context.mdx (2)
1-197: Excellent comprehensive documentation for the context object.The documentation provides thorough coverage of the context object concept with clear explanations, practical examples, and proper TypeScript typing. The structure follows progressive disclosure principles with core concepts first, followed by detailed resource descriptions.
The content aligns well with the retrieved learnings about emphasizing a Postgres-first mindset and maintaining three-layer clarity. The examples demonstrate real-world usage patterns effectively.
112-112: Confirmed correct “pgmq” spelling
“pgmq” is the official name of the PostgreSQL message-queue extension used by pgflow and is spelled correctly.Locations to note:
- pkgs/website/src/content/docs/concepts/context.mdx: line 112
No changes required.
pkgs/edge-worker/tests/integration/messageExecutorContext.test.ts (1)
18-193: Well-structured integration tests for context propagation.The test suite provides comprehensive coverage of the new context feature:
- Validates all context properties are correctly passed to handlers
- Ensures backward compatibility with single-parameter handlers
- Verifies rawMessage preservation in context
- Confirms Supabase client availability based on environment variables
The tests effectively validate the core functionality of the context system.
pkgs/edge-worker/src/flow/createFlowWorker.ts (1)
83-165: Platform adapter integration looks good.The refactoring to accept a platform adapter and construct context from it is well-implemented:
- Generic type parameter
TResourcesprovides type safety- Context construction is comprehensive and includes all necessary resources
- Spread operator usage for platform resources is clean
- Shutdown signal is correctly sourced from the platform adapter
pkgs/edge-worker/src/queue/createQueueWorker.ts (1)
178-268: Consistent platform adapter integration.The queue worker changes mirror the flow worker implementation perfectly:
- Same generic type parameter pattern
- Identical context construction approach
- Proper type annotations for MessageHandlerContext
- Consistent use of platform adapter resources
This consistency across worker types is excellent for maintainability.
pkgs/edge-worker/src/flow/StepTaskExecutor.ts (1)
18-101: Clean refactoring to support context parameter.The StepTaskExecutor refactoring is well-executed:
- Generic context type parameter provides flexibility
- Convenience getters (
stepTaskandrawMessage) improve code readability- Handler invocation correctly passes both input and context
- All internal references properly updated to use the getters
- Maintains the same error handling behavior
The implementation aligns perfectly with the PR's objective of adding context to handlers.
pkgs/dsl/__tests__/types/supabase-preset.test-d.ts (9)
1-22: LGTM! Well-structured test setup.The imports are properly organized and the mock resource types provide good examples for testing context composition scenarios.
23-44: LGTM! Comprehensive test for default platform resources.The test properly verifies that all Supabase platform resources are available by default and that the flow context correctly resolves to
SupabasePlatformContext.
46-75: LGTM! Thorough environment variable type testing.Excellent coverage of both required and optional environment variables, ensuring type safety while maintaining flexibility for custom variables.
77-116: LGTM! Validates custom resource accumulation pattern.The test effectively demonstrates how custom resources can be progressively added through handler annotations while maintaining access to all platform resources.
118-149: LGTM! Clear demonstration of explicit context typing.The test effectively shows how to provide an explicit context type parameter while retaining all Supabase platform resources.
151-196: LGTM! Comprehensive mixed context test.Excellent test demonstrating how explicit initial context combines with handler-inferred context, showing the full power of the context accumulation system.
198-212: LGTM! Important structural type verification.These tests ensure the exported types maintain their expected structure, which is crucial for API stability.
214-251: LGTM! Validates step input inference with context.The test ensures that step dependencies and input inference work correctly alongside the context accumulation system.
253-300: Verify the negative type assertion behavior.The test logic is sound, but
expectTypeOf(context).not.toHaveProperty('step2Resource')on line 262 might not work as expected in vitest's type testing framework. This could result in a false positive test.Consider verifying this works correctly by temporarily adding
step2Resourceto the context type and ensuring the test fails. Alternatively, you could use a more explicit type check:// @ts-expect-error - step2Resource should not exist in step1's context context.step2Resource;pkgs/dsl/src/platforms/supabase.ts (3)
1-8: LGTM! Clean and necessary imports.All imports are properly organized and required for the Supabase platform integration.
27-43: LGTM! Well-structured context types.The platform context correctly combines all necessary types, and the use of
anywith explanatory comments for cross-package typing is a reasonable approach.
45-55: LGTM! Elegant Flow class implementation.The pre-wired Flow class cleanly extends CoreFlow with Supabase platform context while maintaining flexibility through the ExtraCtx parameter.
pkgs/edge-worker/src/EdgeWorker.ts (5)
14-14: LGTM! Improved type safety with CompatibleFlow.The use of
CompatibleFlow<TFlow>ensures compile-time verification that flows only use resources available on the target platform.Also applies to: 73-76
92-103: LGTM! Cleaner API with void return type.The removal of the platform adapter from the return type simplifies the API, as the adapter is managed internally.
94-218: Static analysis warnings can be safely ignored.The Biome warnings about using
thisin static context are technically correct but overly pedantic. Usingthisin static methods is a common TypeScript pattern that improves maintainability. The current implementation is clear and follows established practices.
161-166: LGTM! Proper platform resource integration.The changes correctly integrate the platform adapter's resources into the queue worker configuration and creation.
197-197: LGTM! Consistent platform integration for flow workers.The flow worker implementation correctly mirrors the queue worker changes, maintaining consistency in platform resource handling.
Also applies to: 214-214, 218-218
pkgs/edge-worker/src/platform/SupabasePlatformAdapter.ts (5)
3-27: LGTM! Well-structured imports and type definitions.The Supabase-specific imports and EdgeRuntime global declaration are properly set up for the platform adapter implementation.
37-71: LGTM! Robust initialization with early validation.Excellent approach to validate environment variables and initialize all platform resources in the constructor. This ensures failures happen early with clear error messages.
85-95: LGTM! Proper resource cleanup.The stopWorker method correctly handles shutdown by triggering the abort signal and explicitly closing the SQL connection.
104-148: LGTM! Clean resource access API.The getter methods provide a well-designed, read-only interface for accessing all platform resources.
150-234: LGTM! Clever use of Supabase Edge Runtime features.The lifecycle management implementation effectively uses EdgeRuntime.waitUntil to maximize function lifetime and ensures zero downtime by spawning new instances before shutdown.
pkgs/edge-worker/src/core/context.ts (5)
1-17: LGTM! Clean type architecture foundation.The PlatformContext type provides a flexible generic foundation for platform-specific contexts.
19-42: LGTM! Well-structured execution context types.The separation between platform resources and execution data provides a clean, composable type architecture.
44-52: LGTM! Useful utility type.The StepTaskWithMessage interface provides a convenient way to bundle correlated message and task data.
54-77: LGTM! Thoughtful backward compatibility.The legacy type aliases ensure existing code continues to work while providing a clear migration path to the new structured types.
1-77: Excellent type architecture and organization.The layered approach with clear separation of concerns creates a maintainable and extensible type system. The progression from platform to execution to utilities is logical and well-documented.
pkgs/edge-worker/src/core/supabase-test-utils.ts (2)
19-55: LGTM!The
createQueueWorkerContextfunction correctly creates test contexts with proper fallback to mocks when environment variables are missing.
62-103: LGTM!The
createFlowWorkerContextfunction correctly validates required parameters and creates appropriate test contexts for flow workers.pkgs/dsl/src/dsl.ts (4)
19-25: LGTM!The
AwaitedReturnutility type correctly handles both async and sync function return types.
26-41: Well-designed environment type system!The environment type system provides excellent type safety with:
- Base
Envinterface for minimal requirementsValidEnvutility for type validationUserEnvinterface enabling declaration merging for user customizationThis design pattern allows users to extend environment types while maintaining type safety.
315-408: Complex but correct context type propagation!The updated
stepmethod successfully implements context type accumulation:
- Handlers now receive context as the second parameter
- Context types properly accumulate as steps are added
- Type safety is maintained throughout the flow
The type assertions are justified by the comments explaining TypeScript's limitations in tracking these complex generic relationships.
73-73: ApproveAnyFlowwith explicitanyparameters – intentional and tested
Type tests (e.g. inextract-flow-input.test-d.ts) confirm thatAnyFlowyieldsanyfor utility types likeExtractFlowInput<typeof anyFlow>, matching the intended trade-off between inference convenience and type strictness. No further changes needed.
|
This PR solves #146 and adds few more resources to context: env, supabase clients and sql client. |
- Removed redundant or unused type imports to streamline code - Updated waitUntil declaration to use unknown for better type safety - Changed context variables to unknown for consistency and clarity - Minor formatting adjustments for consistency and readability - No functional changes, focusing on code cleanup and type correctness
…supabase client initialization - Validate presence of SUPABASE_URL, SUPABASE_ANON_KEY, and SUPABASE_SERVICE_ROLE_KEY in test helper functions - Throw errors if required environment variables are missing - Corrected the creation of supabase clients to use validated variables - Improved robustness of test setup code to prevent runtime errors due to missing env vars
e0d7de5 to
0e19cd2
Compare
…context typings Refactors import statements to use .ts extensions for consistency and correctness. Enhances test code by typing received context as SupabasePlatformContext. Adds missing type annotations for context variables in integration tests. Ensures compatibility with TypeScript module resolution and improves code clarity.
- Removed unused imports from platform/types.ts in _helpers.ts - Simplified import statements in stepTaskExecutorContext.test.ts by removing unused type imports - Minor cleanup to improve code clarity and maintainability in test setup files
- Added @supabase/supabase-js to package dependencies and lock files - Updated package.json to include the new dependency - Corrected import statements in createQueueWorker.ts to use .js extensions - Fixed retry strategy configuration comment for clarity
🔍 Preview Deployment: Website✅ Deployment successful! 🔗 Preview URL: https://pr-185.pgflow.pages.dev 📝 Details:
_Last updated: _ |
🔍 Preview Deployment: Playground✅ Deployment successful! 🔗 Preview URL: https://pr-185--pgflow-demo.netlify.app 📝 Details:
_Last updated: _ |
🚀 Production Deployment: Website✅ Successfully deployed to production! 🔗 Production URL: https://pgflow.dev 📝 Details:
Deployed at: 2025-07-17T00:09:50+02:00 |
🚀 Production Deployment: Playground✅ Successfully deployed to production! 🔗 Production URL: https://playground.pgflow.dev 📝 Details:
Deployed at: 2025-07-17T00:09:50+02:00 |
Summary
This PR introduces a context object as the second parameter to all handlers (both queue and flow handlers), providing centralized access to platform resources without requiring handlers to create their own connections.
Fixes #146
Changes
Core Resources (Always Available)
context.env- Environment variablescontext.shutdownSignal- AbortSignal for graceful shutdowncontext.rawMessage- Original pgmq message with metadatacontext.stepTask- Current step task details (flow handlers only)Supabase Platform Resources
context.sql- PostgreSQL client (postgres.js)context.anonSupabase- Supabase client with anonymous keycontext.serviceSupabase- Supabase client with service role keyUsage Examples
Queue Handler
Flow Handler with Supabase Preset
Documentation
Testing
Summary by CodeRabbit
New Features
contextparameter for resource access, with backward compatibility for single-parameter handlers.Documentation
Bug Fixes
Tests
Refactor
Chores