{
  "launcher": "0.1.42",
  "cli": "0.1.25",
  "runtime": "http://127.0.0.1:18368",
  "namespace": "file-invoices",
  "identity": "anonymous local dev/test; Console/FAP disabled",
  "passed": [
    {
      "case": "01-file-total",
      "rows": 1,
      "namespace": "file-invoices",
      "oracle": "original read-only Invoice rows or explicitly synthetic target JSON"
    },
    {
      "case": "02-file-countries",
      "rows": 20,
      "namespace": "file-invoices",
      "oracle": "original read-only Invoice rows or explicitly synthetic target JSON"
    },
    {
      "case": "03-file-customers",
      "rows": 47,
      "namespace": "file-invoices",
      "oracle": "original read-only Invoice rows or explicitly synthetic target JSON"
    },
    {
      "case": "04-file-january",
      "rows": 1,
      "namespace": "file-invoices",
      "oracle": "original read-only Invoice rows or explicitly synthetic target JSON"
    },
    {
      "case": "05-file-details",
      "rows": 83,
      "namespace": "file-invoices",
      "oracle": "original read-only Invoice rows or explicitly synthetic target JSON"
    },
    {
      "case": "06-file-leading-zero",
      "rows": 1,
      "namespace": "file-invoices",
      "oracle": "original read-only Invoice rows or explicitly synthetic target JSON"
    },
    {
      "case": "07-file-empty",
      "rows": 0,
      "namespace": "file-invoices",
      "oracle": "original read-only Invoice rows or explicitly synthetic target JSON"
    },
    {
      "case": "08-file-after-reimport",
      "rows": 1,
      "namespace": "file-invoices",
      "oracle": "original read-only Invoice rows or explicitly synthetic target JSON"
    },
    {
      "case": "09-csv-total",
      "rows": 1,
      "namespace": "file-csv",
      "oracle": "original read-only Invoice rows or explicitly synthetic target JSON"
    },
    {
      "case": "10-csv-customers",
      "rows": 47,
      "namespace": "file-csv",
      "oracle": "original read-only Invoice rows or explicitly synthetic target JSON"
    },
    {
      "case": "11-remote-targets",
      "rows": 4,
      "namespace": "file-invoices",
      "oracle": "original read-only Invoice rows or explicitly synthetic target JSON"
    },
    {
      "case": "12-local-targets",
      "rows": 4,
      "namespace": "file-invoices",
      "oracle": "original read-only Invoice rows or explicitly synthetic target JSON"
    },
    {
      "case": "14-prepared-same-source",
      "rows": 4,
      "namespace": "file-invoices",
      "oracle": "raw Invoice sums plus synthetic target JSON"
    }
  ],
  "executionCount": 13,
  "crossSourceValidation": {
    "data": {
      "diagnostics": {
        "datasourceType": "sqlite",
        "defaultDialect": "sqlite",
        "dialectSource": "namespace-datasource-type",
        "namespace": "file-invoices",
        "namespaceDatasourceId": "files-sqlite",
        "namespaceDatasourceStatus": "active",
        "resolvedDialect": "sqlite"
      },
      "mode": "validate",
      "params": [],
      "scriptKind": "compose",
      "valid": true,
      "value": {
        "plans": {
          "params": [
            "2012"
          ],
          "sql": "SELECT target_code, actual_code, target_amount, actual_amount, ROUND(actual_amount - target_amount, 2) AS amount_difference\nFROM (WITH cte_0 AS (select\tt1.customer_code \"target_code\",\tt1.target_amount \"target_amount\"\tfrom external_targets t1\t where  1=1  and \tt1.period =?  order by t1.customer_code desc),\ncte_1 AS (select\tt1.customer_code \"actual_code\",\tSUM(t1.invoice_amount) \"actual_amount\"\tfrom file_invoices t1\t\tgroup by t1.customer_code)\nSELECT cte_0.target_code, cte_0.target_amount, cte_1.actual_code, cte_1.actual_amount\nFROM cte_0\nLEFT JOIN cte_1 ON cte_0.target_code = cte_1.actual_code) AS cte_2\nORDER BY target_code ASC\nLIMIT 100"
        }
      },
      "warnings": []
    },
    "diagnostics": {
      "attributes": {
        "datasourceType": "sqlite",
        "defaultDialect": "sqlite",
        "dialectSource": "namespace-datasource-type",
        "namespace": "file-invoices",
        "namespaceDatasourceId": "files-sqlite",
        "namespaceDatasourceStatus": "active",
        "resolvedDialect": "sqlite"
      },
      "warnings": []
    },
    "engine": "java",
    "runtimeApiVersion": "foggy-runtime-api/v1",
    "success": true
  },
  "crossSourceExecution": {
    "diagnostics": {
      "attributes": {
        "datasourceType": "sqlite",
        "defaultDialect": "sqlite",
        "dialectSource": "namespace-datasource-type",
        "namespace": "file-invoices",
        "namespaceDatasourceId": "files-sqlite",
        "namespaceDatasourceStatus": "active",
        "resolvedDialect": "sqlite"
      },
      "warnings": []
    },
    "engine": "java",
    "error": {
      "code": "COMPOSE_EXECUTE_FAILED",
      "message": "Plan execution failed at execute phase: executeSql failed: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT target_code, actual_code, target_amount, actual_amount, ROUND(actual_amount - target_amount, 2) AS amount_difference\nFROM (WITH cte_0 AS (select\tt1.customer_code \"target_code\",\tt1.target_amount \"target_amount\"\tfrom external_targets t1\t where  1=1  and \tt1.period =?  order by t1.customer_code desc),\ncte_1 AS (select\tt1.customer_code \"actual_code\",\tSUM(t1.invoice_amount) \"actual_amount\"\tfrom file_invoices t1\t\tgroup by t1.customer_code)\nSELECT cte_0.target_code, cte_0.target_amount, cte_1.actual_code, cte_1.actual_amount\nFROM cte_0\nLEFT JOIN cte_1 ON cte_0.target_code = cte_1.actual_code) AS cte_2\nORDER BY target_code ASC\nLIMIT 100]; SQL state [null]; error code [1]; [SQLITE_ERROR] SQL error or missing database (no such table: file_invoices)",
      "phase": "compose.execute",
      "safeToAutoRepair": false,
      "suggestedNextAction": "Inspect diagnostics and runtime logs, then retry."
    },
    "runtimeApiVersion": "foggy-runtime-api/v1",
    "success": false
  },
  "crossSourceFinding": "Cross-source validation passed but execution failed",
  "rejectedRequestExecuted": false,
  "fileTotal": {
    "rows": 83,
    "customers": 47,
    "amount": "477.53",
    "countries": 20
  },
  "repeatImportRows": 83,
  "csvMatchesWorkbook": true,
  "originalTeachingFilesUnchanged": true,
  "inputFilesAndModelsUnchanged": true,
  "cleanSeparateCodexConversationTested": false,
  "fileAdapter": "external bundled Python/openpyxl, not native Foggy import",
  "sameSourceAlignment": "targets copied during data preparation, not native federated JOIN"
}
