{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://enterprise-modernization-works.joekar.chatgpt.site/workflow-audit-schema.json","title":"Jextra local migration audit input","version":"2026-11-02.1","description":"One mapped comparison or a bundle with declared scoped relationships. Caller supplies capture consistency and historical coverage.","$defs":{"comparison":{"type":"object","required":["sourceRows","targetRows","mapping","scope"],"properties":{"sourceRows":{"type":"array","maxItems":20000,"items":{"type":"object","additionalProperties":{"type":["string","number","boolean","null"]}}},"targetRows":{"type":"array","maxItems":20000,"items":{"type":"object","additionalProperties":{"type":["string","number","boolean","null"]}}},"mapping":{"type":"object","required":["sourceEntity","targetEntity","keys","fields"],"additionalProperties":false,"properties":{"sourceEntity":{"type":"string","minLength":1,"maxLength":160},"targetEntity":{"type":"string","minLength":1,"maxLength":160},"keys":{"type":"array","minItems":1,"maxItems":8,"items":{"type":"string","minLength":1,"maxLength":160}},"fields":{"type":"array","minItems":1,"maxItems":200,"items":{"type":"object","required":["source","target","rule"],"additionalProperties":false,"properties":{"source":{"type":"string","minLength":1,"maxLength":160},"target":{"type":"string","minLength":1,"maxLength":160},"rule":{"type":"string","enum":["exact","text","decimal","boolean","timestamp"]},"tolerance":{"type":"string","description":"Non-negative absolute decimal tolerance; strings preserve precision."},"trim":{"type":"boolean"}}}},"excludedFields":{"type":"array","maxItems":200,"items":{"type":"object","required":["name","reason"],"properties":{"name":{"type":"string","minLength":1,"maxLength":160},"reason":{"type":"string","maxLength":500}}}}}},"scope":{"type":"object","required":["kind","sourceSnapshot","targetSnapshot","filter","consistency"],"properties":{"kind":{"type":"string","enum":["sample","supplied-snapshots"]},"sourceSnapshot":{"type":"string","maxLength":500},"targetSnapshot":{"type":"string","maxLength":500},"filter":{"type":"string","maxLength":1000},"consistency":{"type":"string","maxLength":1000}}}}}},"oneOf":[{"$ref":"#/$defs/comparison"},{"type":"object","required":["comparisons"],"properties":{"comparisons":{"type":"array","minItems":1,"maxItems":12,"items":{"$ref":"#/$defs/comparison"}},"relationships":{"type":"array","maxItems":24,"items":{"type":"object","required":["fromEntity","toEntity","scopeField","required"],"properties":{"fromEntity":{"type":"string","minLength":1,"maxLength":180},"toEntity":{"type":"string","minLength":1,"maxLength":180},"scopeField":{"type":"string","minLength":1,"maxLength":180},"fromField":{"type":"string","minLength":1,"maxLength":180},"toField":{"type":"string","minLength":1,"maxLength":180},"fromFields":{"type":"array","minItems":1,"maxItems":8,"items":{"type":"string","minLength":1,"maxLength":180}},"toFields":{"type":"array","minItems":1,"maxItems":8,"items":{"type":"string","minLength":1,"maxLength":180}},"required":{"type":"boolean"}},"oneOf":[{"required":["fromField","toField"]},{"required":["fromFields","toFields"]}]}}}}],"x-jextra-limits":{"totalSuppliedRows":50000,"handoffCaseDetails":200,"compositeRelationshipFields":8},"x-jextra-privacy":"Raw rows are for local execution. Remote use needs explicit record-sharing permission."}