> ## Documentation Index
> Fetch the complete documentation index at: https://www.testmuai.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Validate Kane CLI Evidence Packs

> Check a kane-cli evidence pack's integrity and completeness with kane-cli evidence validate, including the L0 and L1 profiles and CI-friendly exit codes.

Use `kane-cli evidence validate` to confirm that a pack is intact and complete:

```bash theme={null}
kane-cli evidence validate <execution-id-or-path>
```

The target can be any of these:

* an execution id, which Kane CLI looks up in the project store,
* a live pack directory,
* a sealed `.evidence` file.

| Flag | Description | Default |
| - | - | - |
| `--profile <profile>` | Validation profile, `L0` or `L1` | `L1` |
| `--json` | Machine-readable report | off |

Exit codes: `0` valid, `1` invalid, `2` not found. Combine `--json` with the exit code to gate a CI job or script on the result.

## Gating a pipeline

```bash theme={null}
kane-cli evidence validate .testmuai/evidence/<execution_id>.evidence --json > report.json || exit 1
```

## What validation checks

What gets checked depends on the run status. For a pack that is `running` or `aborted`, the validator checks structure only. For a `finalized` pack, it also runs the full seal checks.

**Structure checks, for every run status:**

* the run manifest `run.yaml` and its identity fields are present,
* each test's recorded id equals its `tests/<id>/` directory name,
* every test directory has a `result.yaml`, and where a `result.yaml` declares a definition path, the file at that path exists,
* a declared definition path stays inside the pack: no leading `/`, no `..`, and no way to point outside it,
* step ordinals (the step numbers) are unique and strictly increasing. Gaps are allowed.

**Full seal checks, for a `finalized` run only:**

* `ended` and `totals` are present, and `ended` is at or after `started`,
* `totals` matches the per-test verdicts added together, and the test count equals the sum of the verdict buckets,
* every declared definition carries a hash, and the hash matches its file,
* at `L1`, each test has a `logs/` directory whose `meta.yaml` declares at least one log, and a `steps/` directory; the pack has a global `coverage/` directory and the finalize-generated root `failure.yaml`.

If a test is marked `passed` but contains a `failed` or `broken` step, the validator reports a **warning**, never a failure. The test verdict is written by the tool that produced the pack, so the validator flags the mismatch but does not overrule it.

## Profiles

| Profile | What it requires |
| - | - |
| `L0` | The minimal core: `run.yaml`, and for each test a `result.yaml`, plus its definition file where one is declared. |
| `L1` | Everything in L0, plus the captured artifacts: declared logs, the `steps/` directories, a `coverage/` directory, and the run-level failure index. These are required only once the run is `finalized`. |

Kane CLI packs include the captured artifacts, so they validate at `L1`, which is this command's default.

> [!NOTE]
>
> A missing per-step screenshot is a **warning**, not an error. Not every framework captures a frame per step, and not every step needs a folder.

## When a pack will not open

If a pack does not open in the viewer, validate it. An unsealed pack, for example from a run that was force-killed, gets the structure checks only, so it can still report as valid. A truncated pack cannot be read at all, so validation fails before it reaches a verdict.

## Next steps

* [Merging packs](https://www.testmuai.com/docs/kane-cli-evidence-merge.md): combine several runs into one file.
* [The .evidence format](https://www.testmuai.com/docs/kane-cli-evidence-format.md): what the profiles mean.

## Terminal First Testing With Kane CLI

Natural language browser & mobile app tests right from terminal.

Book a Demo

![Kane CLI terminal](https://assets.testmu.ai/resources/images/Terminal-KaneCLI.png)

×

Schedule Your Personal Demo

<form>
  Select Product

  Schedule Demo
</form>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.