Skip to content

0005. Validate sync rules against the direction matrix

Date: 2026-07-10 Status: Accepted

Context

The direction matrix (ADR-0004) says what an adapter can do. Something still has to say what actually runs for a given tenant — which connection's data flows to which other connection, and for which data domain. Today this is hard-wired sync logic.

Decision

A new SyncRule (source_connection_id, target_connection_id, data_domain, is_active, optional field_mappings) is unidirectional — source → target. Bidirectional sync is expressed as two rules, not a direction field on the rule itself, so every row is unambiguous.

A rule is only valid if Conflux can read the domain from the source (source supports PullIn or PushIn for that domain in the matrix) and deliver it to the target (target supports PushOut for that domain, or the target fetches via PullOut). Invalid combinations cannot be created — the rule engine, not the plugin, decides what flows; plugins only expose capabilities and execute transfers.

Consequences

Whether per-rule field_mappings overrides ship in the first SyncRule iteration or are deferred until a concrete case needs them remains open — not resolved by this decision.