{
  "schema": "vedokrok.public-item.v1",
  "release_id": "MHC-RPUB-20260920-75ad787a",
  "url": "/knowledge/reconcile-what-is-missing-and-what-should-never-have-arrived",
  "id": "MHC-D-RESEARCH-0981",
  "version": "0.1.0",
  "title": "Reconcile what is missing and what should never have arrived",
  "summary": "Everything expected can be present while the result is still wrong.",
  "kind": "protocol",
  "body": "Compare the expected and actual populations in both directions. Expected minus actual reveals omissions; actual minus expected reveals unexpected additions. Use the same identity definition and cutoff in both comparisons, then inspect duplicates separately when repeated occurrences matter.",
  "limits": [
    "A target may legitimately contain records outside this run. Define scope before treating all unmatched target rows as defects."
  ],
  "topics": [
    "work-02-data-reconciliation"
  ],
  "intents": [],
  "source_ids": [
    "RS-5EBA53046715516C"
  ],
  "evidence": [
    {
      "claim": "EXCEPT returns rows in the first query but not the second, and removes duplicates unless ALL is specified.",
      "source_id": "RS-5EBA53046715516C",
      "role": "supports",
      "note": "A one-direction difference cannot also identify unexpected target rows; distinct-set comparisons can hide repeated occurrences.",
      "locator": "Section 7.4"
    }
  ],
  "use_when": [
    "A source-to-target comparison reports no missing records, but the target may contain extras."
  ],
  "avoid_when": [
    "A target may legitimately contain records outside this run. Define scope before treating all unmatched target rows as defects."
  ],
  "example": "All 80 intended partners arrived, but 12 unintended partners arrived too. A missing-only check would have declared success.",
  "check": "The reconciliation reports omissions, extras and relevant multiplicity differences, not one reassuring percentage.",
  "steps": [
    "Freeze the expected population and the matching target scope.",
    "Produce separate lists of missing and unexpected identities.",
    "Compare occurrence counts or duplicate-sensitive rows when identity membership alone is insufficient."
  ],
  "sources": [
    {
      "id": "RS-5EBA53046715516C",
      "title": "Combining Queries: UNION, INTERSECT, EXCEPT",
      "url": "https://www.postgresql.org/docs/current/queries-union.html"
    }
  ],
  "relations": [
    {
      "from": "MHC-D-RESEARCH-0981",
      "to": "MHC-D-RESEARCH-0984",
      "type": "useful_with",
      "url": "/knowledge/make-every-selected-record-end-in-an-explicit-status-bucket"
    }
  ],
  "collections": [
    {
      "id": "RC-1B134BE48D7DF2A0",
      "title": "Keep the meaning intact when data moves",
      "url": "/collections/keep-the-meaning-intact-when-data-moves"
    }
  ]
}
