{
  "planId": "MIG-PLAN-2026-001",
  "templateVersion": "1.0.0",
  "planVersion": 3,
  "status": "ready_for_approval",
  "createdAt": "2026-07-20T09:00:00Z",
  "updatedAt": "2026-08-01T12:00:00Z",
  "ownerId": "PERSON-MIGRATION-OWNER",
  "decisionOwnerId": "PERSON-DECISION-OWNER",
  "boundary": {
    "purpose": "Move approved fictional customer and order records between bounded systems with reviewable transformations and reconciliation.",
    "includedDatasetIds": ["DATASET-CUSTOMERS", "DATASET-ORDERS"],
    "excludedWork": [
      "Website content, domain, redirect, analytics, and SEO relocation",
      "Ongoing synchronization, replication, or change data capture",
      "Provider credential setup and a native migration-service claim"
    ],
    "websiteRelocationIncluded": false,
    "ongoingSynchronizationIncluded": false,
    "nativeMigrationServiceClaimed": false
  },
  "people": [
    {
      "id": "PERSON-MIGRATION-OWNER",
      "name": "Mira Chen",
      "role": "migration owner",
      "contactRef": "mira.chen@example.test"
    },
    {
      "id": "PERSON-DECISION-OWNER",
      "name": "Jon Bell",
      "role": "go-no-go and rollback decision owner",
      "contactRef": "jon.bell@example.test"
    },
    {
      "id": "PERSON-DATA-OWNER",
      "name": "Asha Reed",
      "role": "data owner",
      "contactRef": "asha.reed@example.test"
    },
    {
      "id": "PERSON-PRIVACY-OWNER",
      "name": "Sam Ortiz",
      "role": "privacy and retention owner",
      "contactRef": "sam.ortiz@example.test"
    },
    {
      "id": "PERSON-FINANCE-OWNER",
      "name": "Noor Patel",
      "role": "balance reconciliation owner",
      "contactRef": "noor.patel@example.test"
    }
  ],
  "systems": [
    {
      "id": "SYSTEM-LEGACY",
      "name": "Fictional legacy records",
      "role": "source",
      "environment": "fictional_test",
      "endpointRef": "legacy-db.example.test",
      "ownerId": "PERSON-DATA-OWNER"
    },
    {
      "id": "SYSTEM-TARGET",
      "name": "Fictional target records",
      "role": "target",
      "environment": "fictional_test",
      "endpointRef": "target-db.example.test",
      "ownerId": "PERSON-DATA-OWNER"
    }
  ],
  "datasets": [
    {
      "id": "DATASET-CUSTOMERS",
      "name": "Customer accounts",
      "sourceSystemId": "SYSTEM-LEGACY",
      "targetSystemId": "SYSTEM-TARGET",
      "ownerId": "PERSON-DATA-OWNER",
      "mappingIds": [
        "MAP-CUSTOMER-ID",
        "MAP-CUSTOMER-NAME",
        "MAP-CUSTOMER-EMAIL",
        "MAP-CUSTOMER-STATUS",
        "MAP-CUSTOMER-BALANCE"
      ],
      "sourceCount": 1250,
      "excludedCount": 20,
      "expectedTargetCount": 1230,
      "actualTargetCount": 1230,
      "countDelta": 0,
      "countTolerance": 0,
      "countStatus": "pass",
      "checksumAlgorithm": "sha256",
      "sourceChecksum": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
      "targetChecksum": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
      "balances": [
        {
          "id": "BAL-CUSTOMER-OPENING",
          "metric": "opening_balance_cents",
          "unit": "integer cents",
          "before": 48275000,
          "excluded": 100000,
          "adjustment": 0,
          "expectedAfter": 48175000,
          "actualAfter": 48175000,
          "delta": 0,
          "tolerance": 0,
          "status": "pass",
          "ownerId": "PERSON-FINANCE-OWNER"
        }
      ]
    },
    {
      "id": "DATASET-ORDERS",
      "name": "Order records",
      "sourceSystemId": "SYSTEM-LEGACY",
      "targetSystemId": "SYSTEM-TARGET",
      "ownerId": "PERSON-DATA-OWNER",
      "mappingIds": [
        "MAP-ORDER-ID",
        "MAP-ORDER-CUSTOMER",
        "MAP-ORDER-TOTAL",
        "MAP-ORDER-CREATED",
        "MAP-ORDER-STATE"
      ],
      "sourceCount": 5000,
      "excludedCount": 125,
      "expectedTargetCount": 4875,
      "actualTargetCount": 4875,
      "countDelta": 0,
      "countTolerance": 0,
      "countStatus": "pass",
      "checksumAlgorithm": "sha256",
      "sourceChecksum": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
      "targetChecksum": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
      "balances": [
        {
          "id": "BAL-ORDER-TOTAL",
          "metric": "order_total_cents",
          "unit": "integer cents",
          "before": 329500000,
          "excluded": 1250000,
          "adjustment": 0,
          "expectedAfter": 328250000,
          "actualAfter": 328250000,
          "delta": 0,
          "tolerance": 0,
          "status": "pass",
          "ownerId": "PERSON-FINANCE-OWNER"
        }
      ]
    }
  ],
  "mappings": [
    {
      "id": "MAP-CUSTOMER-ID",
      "datasetId": "DATASET-CUSTOMERS",
      "sourceField": "legacy_customer_id",
      "targetField": "customer_id",
      "transformation": {
        "kind": "direct",
        "expression": "copy canonical string",
        "version": 1,
        "ownerId": "PERSON-MIGRATION-OWNER"
      },
      "privacy": {
        "classification": "internal",
        "purpose": "record identity",
        "retentionAction": "retain",
        "retentionUntil": "2028-12-31",
        "accessOwnerId": "PERSON-PRIVACY-OWNER"
      },
      "tests": [
        { "caseId": "CASE-CID-1", "input": "CUST-1001", "expected": "CUST-1001", "status": "pass" },
        { "caseId": "CASE-CID-2", "input": "", "expected": "reject", "status": "pass" }
      ]
    },
    {
      "id": "MAP-CUSTOMER-NAME",
      "datasetId": "DATASET-CUSTOMERS",
      "sourceField": "full_name",
      "targetField": "display_name",
      "transformation": {
        "kind": "normalize",
        "expression": "trim and collapse whitespace",
        "version": 2,
        "ownerId": "PERSON-DATA-OWNER"
      },
      "privacy": {
        "classification": "personal",
        "purpose": "customer account display",
        "retentionAction": "retain",
        "retentionUntil": "2027-12-31",
        "accessOwnerId": "PERSON-PRIVACY-OWNER"
      },
      "tests": [
        {
          "caseId": "CASE-CNAME-1",
          "input": "  Alex  Stone ",
          "expected": "Alex Stone",
          "status": "pass"
        },
        { "caseId": "CASE-CNAME-2", "input": "", "expected": "reject", "status": "pass" }
      ]
    },
    {
      "id": "MAP-CUSTOMER-EMAIL",
      "datasetId": "DATASET-CUSTOMERS",
      "sourceField": "email",
      "targetField": "email_normalized",
      "transformation": {
        "kind": "normalize",
        "expression": "trim and lowercase",
        "version": 3,
        "ownerId": "PERSON-DATA-OWNER"
      },
      "privacy": {
        "classification": "personal",
        "purpose": "account contact",
        "retentionAction": "review_then_delete",
        "retentionUntil": "2027-06-30",
        "accessOwnerId": "PERSON-PRIVACY-OWNER"
      },
      "tests": [
        {
          "caseId": "CASE-CEMAIL-1",
          "input": " ALEX@EXAMPLE.TEST ",
          "expected": "alex@example.test",
          "status": "pass"
        },
        {
          "caseId": "CASE-CEMAIL-2",
          "input": "not-an-email",
          "expected": "reject",
          "status": "pass"
        }
      ]
    },
    {
      "id": "MAP-CUSTOMER-STATUS",
      "datasetId": "DATASET-CUSTOMERS",
      "sourceField": "status",
      "targetField": "lifecycle_status",
      "transformation": {
        "kind": "lookup",
        "expression": "active to active; archived to archived",
        "version": 1,
        "ownerId": "PERSON-DATA-OWNER"
      },
      "privacy": {
        "classification": "internal",
        "purpose": "account lifecycle",
        "retentionAction": "retain",
        "retentionUntil": "2028-12-31",
        "accessOwnerId": "PERSON-PRIVACY-OWNER"
      },
      "tests": [
        { "caseId": "CASE-CSTATUS-1", "input": "active", "expected": "active", "status": "pass" },
        { "caseId": "CASE-CSTATUS-2", "input": "unknown", "expected": "reject", "status": "pass" }
      ]
    },
    {
      "id": "MAP-CUSTOMER-BALANCE",
      "datasetId": "DATASET-CUSTOMERS",
      "sourceField": "legacy_balance_cents",
      "targetField": "opening_balance_cents",
      "transformation": {
        "kind": "direct",
        "expression": "copy integer cents",
        "version": 1,
        "ownerId": "PERSON-FINANCE-OWNER"
      },
      "privacy": {
        "classification": "confidential",
        "purpose": "opening balance reconciliation",
        "retentionAction": "retain",
        "retentionUntil": "2029-12-31",
        "accessOwnerId": "PERSON-FINANCE-OWNER"
      },
      "tests": [
        { "caseId": "CASE-CBAL-1", "input": "1525", "expected": "1525", "status": "pass" },
        { "caseId": "CASE-CBAL-2", "input": "15.25", "expected": "reject", "status": "pass" }
      ]
    },
    {
      "id": "MAP-ORDER-ID",
      "datasetId": "DATASET-ORDERS",
      "sourceField": "legacy_order_id",
      "targetField": "order_id",
      "transformation": {
        "kind": "direct",
        "expression": "copy canonical string",
        "version": 1,
        "ownerId": "PERSON-MIGRATION-OWNER"
      },
      "privacy": {
        "classification": "internal",
        "purpose": "record identity",
        "retentionAction": "retain",
        "retentionUntil": "2029-12-31",
        "accessOwnerId": "PERSON-PRIVACY-OWNER"
      },
      "tests": [
        { "caseId": "CASE-OID-1", "input": "ORD-8100", "expected": "ORD-8100", "status": "pass" },
        { "caseId": "CASE-OID-2", "input": "", "expected": "reject", "status": "pass" }
      ]
    },
    {
      "id": "MAP-ORDER-CUSTOMER",
      "datasetId": "DATASET-ORDERS",
      "sourceField": "legacy_customer_id",
      "targetField": "customer_id",
      "transformation": {
        "kind": "reference",
        "expression": "map through MAP-CUSTOMER-ID",
        "version": 1,
        "ownerId": "PERSON-DATA-OWNER"
      },
      "privacy": {
        "classification": "internal",
        "purpose": "customer relationship",
        "retentionAction": "retain",
        "retentionUntil": "2029-12-31",
        "accessOwnerId": "PERSON-PRIVACY-OWNER"
      },
      "tests": [
        {
          "caseId": "CASE-OCUST-1",
          "input": "CUST-1001",
          "expected": "CUST-1001",
          "status": "pass"
        },
        {
          "caseId": "CASE-OCUST-2",
          "input": "CUST-MISSING",
          "expected": "reject",
          "status": "pass"
        }
      ]
    },
    {
      "id": "MAP-ORDER-TOTAL",
      "datasetId": "DATASET-ORDERS",
      "sourceField": "total_cents",
      "targetField": "order_total_cents",
      "transformation": {
        "kind": "direct",
        "expression": "copy integer cents",
        "version": 1,
        "ownerId": "PERSON-FINANCE-OWNER"
      },
      "privacy": {
        "classification": "confidential",
        "purpose": "order balance reconciliation",
        "retentionAction": "retain",
        "retentionUntil": "2029-12-31",
        "accessOwnerId": "PERSON-FINANCE-OWNER"
      },
      "tests": [
        { "caseId": "CASE-OTOTAL-1", "input": "12900", "expected": "12900", "status": "pass" },
        { "caseId": "CASE-OTOTAL-2", "input": "129.00", "expected": "reject", "status": "pass" }
      ]
    },
    {
      "id": "MAP-ORDER-CREATED",
      "datasetId": "DATASET-ORDERS",
      "sourceField": "created_local",
      "targetField": "created_at_utc",
      "transformation": {
        "kind": "datetime",
        "expression": "parse America/New_York then convert to UTC",
        "version": 2,
        "ownerId": "PERSON-DATA-OWNER"
      },
      "privacy": {
        "classification": "internal",
        "purpose": "order chronology",
        "retentionAction": "retain",
        "retentionUntil": "2029-12-31",
        "accessOwnerId": "PERSON-PRIVACY-OWNER"
      },
      "tests": [
        {
          "caseId": "CASE-ODATE-1",
          "input": "2026-01-15 10:30:00",
          "expected": "2026-01-15T15:30:00Z",
          "status": "pass"
        },
        {
          "caseId": "CASE-ODATE-2",
          "input": "2026-03-08 02:30:00",
          "expected": "reject nonexistent local time",
          "status": "pass"
        }
      ]
    },
    {
      "id": "MAP-ORDER-STATE",
      "datasetId": "DATASET-ORDERS",
      "sourceField": "state",
      "targetField": "order_state",
      "transformation": {
        "kind": "lookup",
        "expression": "paid to settled; void to excluded",
        "version": 2,
        "ownerId": "PERSON-DATA-OWNER"
      },
      "privacy": {
        "classification": "internal",
        "purpose": "order lifecycle",
        "retentionAction": "retain",
        "retentionUntil": "2029-12-31",
        "accessOwnerId": "PERSON-PRIVACY-OWNER"
      },
      "tests": [
        { "caseId": "CASE-OSTATE-1", "input": "paid", "expected": "settled", "status": "pass" },
        { "caseId": "CASE-OSTATE-2", "input": "void", "expected": "excluded", "status": "pass" }
      ]
    }
  ],
  "retentionRecords": [
    {
      "id": "RET-CUSTOMER-CONTACT",
      "datasetId": "DATASET-CUSTOMERS",
      "fieldMappingIds": ["MAP-CUSTOMER-NAME", "MAP-CUSTOMER-EMAIL"],
      "classification": "personal",
      "purpose": "customer account display and contact",
      "sourceRetentionUntil": "2027-06-30",
      "targetRetentionUntil": "2027-06-30",
      "sourceDisposition": "delete after approved reconciliation hold",
      "targetDisposition": "review then delete when purpose ends",
      "accessOwnerId": "PERSON-PRIVACY-OWNER",
      "reviewAt": "2026-12-15"
    },
    {
      "id": "RET-CUSTOMER-BALANCE",
      "datasetId": "DATASET-CUSTOMERS",
      "fieldMappingIds": ["MAP-CUSTOMER-BALANCE"],
      "classification": "confidential",
      "purpose": "opening balance reconciliation",
      "sourceRetentionUntil": "2029-12-31",
      "targetRetentionUntil": "2029-12-31",
      "sourceDisposition": "archive under approved financial policy",
      "targetDisposition": "retain under approved financial policy",
      "accessOwnerId": "PERSON-FINANCE-OWNER",
      "reviewAt": "2026-12-15"
    },
    {
      "id": "RET-BALANCES",
      "datasetId": "DATASET-ORDERS",
      "fieldMappingIds": ["MAP-ORDER-TOTAL"],
      "classification": "confidential",
      "purpose": "order balance reconciliation",
      "sourceRetentionUntil": "2029-12-31",
      "targetRetentionUntil": "2029-12-31",
      "sourceDisposition": "archive under approved financial policy",
      "targetDisposition": "retain under approved financial policy",
      "accessOwnerId": "PERSON-FINANCE-OWNER",
      "reviewAt": "2026-12-15"
    }
  ],
  "trialRuns": [
    {
      "id": "RUN-TRIAL-001",
      "startedAt": "2026-07-25T09:00:00Z",
      "completedAt": "2026-07-25T10:15:00Z",
      "datasetIds": ["DATASET-CUSTOMERS", "DATASET-ORDERS"],
      "sourceSnapshotRef": "snapshot://fictional-test/2026-07-25-a",
      "status": "failed",
      "failureIds": ["FAIL-001"],
      "evidenceRef": "evidence://trial/001",
      "reviewerId": "PERSON-MIGRATION-OWNER"
    },
    {
      "id": "RUN-TRIAL-002",
      "startedAt": "2026-07-29T09:00:00Z",
      "completedAt": "2026-07-29T10:20:00Z",
      "datasetIds": ["DATASET-CUSTOMERS", "DATASET-ORDERS"],
      "sourceSnapshotRef": "snapshot://fictional-test/2026-07-29-b",
      "status": "passed",
      "failureIds": [],
      "evidenceRef": "evidence://trial/002",
      "reviewerId": "PERSON-MIGRATION-OWNER"
    }
  ],
  "exceptions": [
    {
      "id": "EXC-CUSTOMER-TEST",
      "datasetId": "DATASET-CUSTOMERS",
      "recordCount": 20,
      "balanceImpact": 100000,
      "reason": "Fictional test accounts excluded under the approved minimum-purpose rule.",
      "ownerId": "PERSON-DATA-OWNER",
      "approvedBy": "PERSON-DECISION-OWNER",
      "status": "approved"
    },
    {
      "id": "EXC-ORDER-VOID",
      "datasetId": "DATASET-ORDERS",
      "recordCount": 125,
      "balanceImpact": 1250000,
      "reason": "Fictional void orders excluded from the target opening ledger.",
      "ownerId": "PERSON-FINANCE-OWNER",
      "approvedBy": "PERSON-DECISION-OWNER",
      "status": "approved"
    }
  ],
  "failures": [
    {
      "id": "FAIL-001",
      "runId": "RUN-TRIAL-001",
      "datasetId": "DATASET-ORDERS",
      "detectedAt": "2026-07-25T09:40:00Z",
      "severity": "high",
      "type": "transformation_mismatch",
      "description": "A nonexistent local time was accepted instead of being quarantined.",
      "evidenceRef": "evidence://failure/001",
      "ownerId": "PERSON-DATA-OWNER",
      "status": "resolved",
      "resolvedAt": "2026-07-28T16:00:00Z",
      "resolution": "Transformation version 2 rejects nonexistent local times; trial run 002 passed the retest.",
      "relatedMappingIds": ["MAP-ORDER-CREATED"]
    }
  ],
  "cutover": {
    "approach": "offline_bounded",
    "windowStart": "2026-08-08T01:00:00Z",
    "windowEnd": "2026-08-08T04:00:00Z",
    "decisionOwnerId": "PERSON-DECISION-OWNER",
    "steps": [
      {
        "id": "CUT-01",
        "sequence": 1,
        "action": "Freeze approved source writes and record the final source position.",
        "ownerId": "PERSON-DATA-OWNER",
        "dependsOn": [],
        "expectedEvidence": "evidence://cutover/write-freeze",
        "status": "pending"
      },
      {
        "id": "CUT-02",
        "sequence": 2,
        "action": "Create and verify the final bounded source snapshot.",
        "ownerId": "PERSON-MIGRATION-OWNER",
        "dependsOn": ["CUT-01"],
        "expectedEvidence": "evidence://cutover/final-snapshot",
        "status": "pending"
      },
      {
        "id": "CUT-03",
        "sequence": 3,
        "action": "Run the approved export, transformations, and target import.",
        "ownerId": "PERSON-MIGRATION-OWNER",
        "dependsOn": ["CUT-02"],
        "expectedEvidence": "evidence://cutover/import-log",
        "status": "pending"
      },
      {
        "id": "CUT-04",
        "sequence": 4,
        "action": "Reconcile counts, checksums, before and after balances, and relationships.",
        "ownerId": "PERSON-FINANCE-OWNER",
        "dependsOn": ["CUT-03"],
        "expectedEvidence": "evidence://cutover/reconciliation",
        "status": "pending"
      },
      {
        "id": "CUT-05",
        "sequence": 5,
        "action": "Run bounded functional, access, privacy, failure, and restore checks.",
        "ownerId": "PERSON-PRIVACY-OWNER",
        "dependsOn": ["CUT-04"],
        "expectedEvidence": "evidence://cutover/readiness",
        "status": "pending"
      },
      {
        "id": "CUT-06",
        "sequence": 6,
        "action": "Record the named human go, hold, or rollback decision.",
        "ownerId": "PERSON-DECISION-OWNER",
        "dependsOn": ["CUT-05"],
        "expectedEvidence": "evidence://cutover/decision",
        "status": "pending"
      },
      {
        "id": "CUT-07",
        "sequence": 7,
        "action": "Change the approved application connection only after a go decision.",
        "ownerId": "PERSON-MIGRATION-OWNER",
        "dependsOn": ["CUT-06"],
        "expectedEvidence": "evidence://cutover/connection",
        "status": "pending"
      },
      {
        "id": "CUT-08",
        "sequence": 8,
        "action": "Observe errors, record deltas, access, and business balances before source retirement.",
        "ownerId": "PERSON-DATA-OWNER",
        "dependsOn": ["CUT-07"],
        "expectedEvidence": "evidence://cutover/observation",
        "status": "pending"
      }
    ],
    "goNoGo": {
      "decision": "pending",
      "decidedAt": "",
      "ownerId": "PERSON-DECISION-OWNER",
      "evidenceRef": ""
    },
    "successCriteria": [
      "All dataset count deltas and balance deltas remain within zero tolerance.",
      "No unresolved critical or high failure exists.",
      "Access, privacy, functional, relationship, and restore evidence is reviewed by named owners."
    ]
  },
  "rollback": {
    "status": "not_invoked",
    "decisionOwnerId": "PERSON-DECISION-OWNER",
    "recoveryPointRef": "snapshot://fictional-test/final-approved-source",
    "changedDataStrategy": "Stop target writes, export approved post-cutover deltas to a quarantine record, restore the source recovery point, review each delta before any replay, and never dual-write without a separate design and test plan.",
    "triggers": [
      {
        "id": "ROLL-TRIGGER-COUNT",
        "metric": "any dataset count or balance delta",
        "threshold": "greater than zero after one bounded recheck",
        "ownerId": "PERSON-FINANCE-OWNER"
      },
      {
        "id": "ROLL-TRIGGER-ACCESS",
        "metric": "unauthorized access or missing required record relationship",
        "threshold": "one confirmed event",
        "ownerId": "PERSON-PRIVACY-OWNER"
      }
    ],
    "steps": [
      {
        "id": "ROLL-01",
        "sequence": 1,
        "action": "Decision owner records rollback and stops target writes.",
        "ownerId": "PERSON-DECISION-OWNER",
        "dependsOn": [],
        "expectedEvidence": "evidence://rollback/decision"
      },
      {
        "id": "ROLL-02",
        "sequence": 2,
        "action": "Export post-cutover target deltas to a bounded quarantine record.",
        "ownerId": "PERSON-MIGRATION-OWNER",
        "dependsOn": ["ROLL-01"],
        "expectedEvidence": "evidence://rollback/delta-export"
      },
      {
        "id": "ROLL-03",
        "sequence": 3,
        "action": "Restore and verify the approved source recovery point.",
        "ownerId": "PERSON-MIGRATION-OWNER",
        "dependsOn": ["ROLL-02"],
        "expectedEvidence": "evidence://rollback/source-restore"
      },
      {
        "id": "ROLL-04",
        "sequence": 4,
        "action": "Reconnect the application to the verified source and run bounded smoke checks.",
        "ownerId": "PERSON-DATA-OWNER",
        "dependsOn": ["ROLL-03"],
        "expectedEvidence": "evidence://rollback/source-smoke"
      },
      {
        "id": "ROLL-05",
        "sequence": 5,
        "action": "Reconcile quarantined deltas and open follow-up decisions without automatic replay.",
        "ownerId": "PERSON-DECISION-OWNER",
        "dependsOn": ["ROLL-04"],
        "expectedEvidence": "evidence://rollback/delta-review"
      }
    ]
  }
}
