> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Event Schema Registry Expansion — Integration Architecture

> Deferred until FW-41 ships client-side sub-workflow creation. When implemented, parent correlation_id must be passed to child fw_workflow_executions insert.

**Spec:** FW-16-PHASE-2-EVENT-SCHEMA-EXPANSION
**Status:** ✅ Complete
**Last Updated:** 2026-03-20

## Integration Points

| Integration                        | Source         | Target                         | Mechanism                                                                               |
| ---------------------------------- | -------------- | ------------------------------ | --------------------------------------------------------------------------------------- |
| Automation Rule Deprecation Badges | FW-16-P2 (T10) | FW-03 AutomationRulesList      | Client-side join via `useEventRegistry`                                                 |
| Migrate Automation Dialog          | FW-16-P2 (T10) | FW-03 automation rules         | `MigrateAutomationDialog` updates `trigger_config.event_config.event_name`              |
| Start Node Deprecation Banner      | FW-16-P2 (T11) | FW-06 WorkflowEditor StartNode | `StartNodeData` extended with `isDeprecated`, `replacementEvent`, `schemaVersion`       |
| Correlation ID Filter              | FW-16-P2 (T12) | FW-22 ExecutionDashboard       | `ExecutionFilters` accepts `correlationId` prop; client-side filter on `correlation_id` |
| Correlation ID Display             | FW-16-P2 (T12) | FW-22 ExecutionDetailDialog    | Badge in dialog header showing `correlation_id`                                         |
| Audit Events                       | FW-16-P2 (T14) | Platform Events Layer          | `useEventDeprecation` publishes `fw_event_deprecated` via `publishEvent()`              |
| CI Schema Check                    | FW-16-P2 (T15) | CI Pipeline                    | `scripts/check-event-schemas.ts` with `scripts/data/event-schema-baseline.json`         |

## Security

* No new RLS policies required; existing org-scoped policies cover new columns (`schema_version`, `deprecated_at`, `replacement_event`, `correlation_id`)
* `MigrateAutomationDialog` uses `.eq('organization_id', organizationId)` on all mutations
* Audit events use `publishEvent` which enforces `organization_id` in payload

## Sub-Workflow Correlation (T13)

Deferred until FW-41 ships client-side sub-workflow creation. When implemented, parent `correlation_id` must be passed to child `fw_workflow_executions` insert.
