The finance developer workbenchSearch the reference Development · 0.1.4 · unpublished

artifact / wire operation

Compare two analysis artifacts

totalfinance.artifact.compare

Compare a baseline and a candidate artifact of the same type leaf by leaf: value differences with absolute and relative deltas, added and removed paths, whether inputs and producers match, and — when a tolerance is supplied — whether every numeric leaf is within it. The result is compareAnalysisArtifacts(...) verbatim.

Pack / profilesartifact / backtesting, full, portfolio, scenarios
Default discoveryOpt-in
Required capabilitiesNone
Effects / authorizationnone / none
Cost / cancellationmedium / Do not assume inline interruption
Handle-eligible inputsbaseline, candidate
Idempotencynot-applicable
Input schema
{
  "type": "object",
  "properties": {
    "baseline": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "totalfinance.analysis-artifact",
          "type": "string"
        },
        "schemaVersion": {
          "type": "integer"
        },
        "id": {
          "type": "string"
        },
        "artifactType": {
          "type": "string"
        },
        "producedBy": {
          "type": "object",
          "properties": {
            "operation": {
              "type": "string"
            },
            "libraryVersion": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "operation"
          ]
        },
        "conventionsVersion": {
          "type": "string"
        },
        "inputs": {
          "type": "object",
          "properties": {
            "inputsHash": {
              "type": "string"
            },
            "snapshotHash": {
              "type": "string"
            },
            "parameters": {}
          },
          "additionalProperties": false,
          "required": [
            "inputsHash"
          ]
        },
        "createdFrom": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "result": {
          "type": "object",
          "additionalProperties": {}
        },
        "tables": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "provenance": {
          "type": "object",
          "properties": {
            "provider": {
              "type": "string"
            },
            "dataset": {
              "type": "string"
            },
            "asOf": {
              "type": "number"
            },
            "receivedAt": {
              "type": "number"
            },
            "sourceVersion": {
              "type": "string"
            },
            "requestId": {
              "type": "string"
            },
            "warnings": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "schemaVersion",
        "id",
        "artifactType",
        "producedBy",
        "conventionsVersion",
        "inputs",
        "result"
      ],
      "description": "A Gate B analysis artifact (totalfinance.analysis-artifact); hashes are re-verified by the read door"
    },
    "candidate": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "totalfinance.analysis-artifact",
          "type": "string"
        },
        "schemaVersion": {
          "type": "integer"
        },
        "id": {
          "type": "string"
        },
        "artifactType": {
          "type": "string"
        },
        "producedBy": {
          "type": "object",
          "properties": {
            "operation": {
              "type": "string"
            },
            "libraryVersion": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "operation"
          ]
        },
        "conventionsVersion": {
          "type": "string"
        },
        "inputs": {
          "type": "object",
          "properties": {
            "inputsHash": {
              "type": "string"
            },
            "snapshotHash": {
              "type": "string"
            },
            "parameters": {}
          },
          "additionalProperties": false,
          "required": [
            "inputsHash"
          ]
        },
        "createdFrom": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "result": {
          "type": "object",
          "additionalProperties": {}
        },
        "tables": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "provenance": {
          "type": "object",
          "properties": {
            "provider": {
              "type": "string"
            },
            "dataset": {
              "type": "string"
            },
            "asOf": {
              "type": "number"
            },
            "receivedAt": {
              "type": "number"
            },
            "sourceVersion": {
              "type": "string"
            },
            "requestId": {
              "type": "string"
            },
            "warnings": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "schemaVersion",
        "id",
        "artifactType",
        "producedBy",
        "conventionsVersion",
        "inputs",
        "result"
      ],
      "description": "A Gate B analysis artifact (totalfinance.analysis-artifact); hashes are re-verified by the read door"
    },
    "tolerance": {
      "type": "object",
      "properties": {
        "absolute": {
          "type": "number",
          "minimum": 0
        },
        "relative": {
          "type": "number",
          "minimum": 0
        }
      },
      "additionalProperties": false,
      "required": [
        "absolute",
        "relative"
      ],
      "description": "Two-sided: a leaf is within it when |Δ| ≤ absolute + relative·|baseline|"
    },
    "limits": {
      "type": "object",
      "properties": {
        "maximumDifferences": {
          "type": "integer",
          "exclusiveMinimum": 0
        },
        "maximumLeaves": {
          "type": "integer",
          "exclusiveMinimum": 0
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false,
  "required": [
    "baseline",
    "candidate"
  ]
}
Output schema
{
  "type": "object",
  "properties": {
    "artifactType": {
      "type": "string"
    },
    "identical": {
      "type": "boolean"
    },
    "artifactIds": {
      "type": "object"
    },
    "inputs": {
      "type": "object"
    },
    "producedBy": {
      "type": "object"
    },
    "result": {
      "type": "object"
    },
    "warningCounts": {
      "type": "object"
    },
    "withinTolerance": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "assumptions": {
      "type": "object",
      "description": "Applied conventions"
    },
    "diagnostics": {
      "type": "object",
      "description": "Engine, method, warnings"
    }
  },
  "required": [
    "artifactType",
    "identical",
    "artifactIds",
    "inputs",
    "producedBy",
    "result",
    "warningCounts",
    "withinTolerance",
    "assumptions",
    "diagnostics"
  ]
}

All operations · Setup, handles, jobs & permissions