eFEC Invariants¶
Source boundary: schema vs. events¶
- Schema creates trust roots.
pg-governed-events/sql/schema.sqlmay bootstrap the system/corporate registries, actors, and thebootstrapworkflow needed to accept signed workflow-deployment events. - Events deploy workflows. Business, demo, customer, screening, case, and product workflows must be deployed through signed
process_eventevents. They must not be embedded directly in schema bootstrap JSON. - Seed scripts use the engine. Seed scripts must call
process_eventfor every non-genesis mutation, including workflow deployment and customer/demo process creation. - No raw workflow/process mutation in seeds. Seed scripts must not directly
UPDATE processes,INSERT INTO processes,jsonb_setregistry workflows, or mutatedata.workflowsoutside the engine chokepoint.
Verification¶
Run the source-only invariant guard before schema or seed changes merge:
bash
cd test && npm run verify:invariants
This command does not connect to Postgres, does not reset data, and does not execute seed/runtime code. It scans source files for boundary violations and fails with actionable path:line :: invariant :: pattern output.