reference-implementation-architecture — pilot-storage-backend-interface delta
Shared orchestration code SHALL invoke a storage operation that has been migrated to the StorageBackend interface through a single typed interface method, with no isPostgresStorageBackend() branch in the orchestration path. Each backend SHALL provide one adapter that satisfies the interface method, keeping dialect-specific query logic (placeholder syntax, deleted boolean representation, JSON normalization) inside the adapter rather than in shared code. A migrated operation SHALL be exercised by a dual-backend conformance harness that runs the production code path against both the SQLite adapter and a real Postgres adapter and asserts identical observable results, so that divergence between the two backends becomes a test failure rather than a silent production difference.
reference-implementation-architecture