Docs Index
source of truth manifest.md

Proof Card: Source-of-Truth Manifest

Status: production Last verified: 2026-05-28

Claim

SOURCE_OF_TRUTH_MANIFEST declares ownership for 11 canonical entities (customer, contact, vendor, invoice, payment, payout_batch, product, inventory_level, sales_order, deal, ticket) with explicit conflict-resolution policies. OwnershipResolver enforces these rules through guardedWrite(), including the FlowExecutor dispatch path before connector mutation. Non-owner writes either:

OwnershipResolver.detectLoop is wired against LineageRepository.findReciprocalChainSeeds and is invoked by guardedWrite() after ownership allow for SourceSystem callers, including the FlowExecutor unified write path. OwnershipResumeHandler also re-runs loop detection at approval-apply time for queued ownership writes.

CI gate scripts/check-source-of-truth-coverage.mjs hard-fails on manifest shape drift, registry-key mismatches, undeclared canonical entities used by flow templates, unimplemented conflict policies, merge_field_level entries without fieldOverrides, and guardedWrite({...}) contexts that supply fieldPaths without sibling fieldLevelPayload.

Source

Tests

Live vs Fixture

Known Gaps

PR 13b extension (closed gaps)

The four "lands in PR 13b" gaps listed in the PR 13 version of this card are now closed; see proof card: guarded-write Ownership Enforcement for the new wedge surface. Specifically:

The manifest itself grows from 9 → 11 canonical entities in PR 13b: adds deal and ticket (HubSpot-owned, source_wins policy) to cover the HubSpot deals/tickets direct-write callsites. The PR 13 version of this card said "9 canonical entities"; the live count is now 11.

Verification

# 1. Manifest + resolver + lineage repo unit tests (28 tests)
npm test -- tests/unit/governance/sourceOfTruth/ tests/unit/services/lineage/LineageRepository.findReciprocalChainSeeds.test.ts

# 2. FlowExecutor ownership integration (3 tests)
npm test -- tests/unit/flows/templates/FlowExecutor.ownership.test.ts

# 3. CI gate regression net (10 synthetic + 1 live-repo smoke)
bash tests/scripts/check-source-of-truth-coverage.test.sh

# 4. Live CI gate
npm run audit-source-of-truth-coverage

Expected: every command exits 0; final command prints [source-of-truth-coverage] PASS — 11 entities declared, 1 flow templates checked (numbers track manifest + registry).