> ## 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 Merge Kane CLI Evidence Packs

> Combine several kane-cli evidence packs into a single sealed pack with kane-cli evidence merge, including the strict default policy and collision handling.

`kane-cli evidence merge` combines several packs into one. Use it when you want to hand over a set of related runs as a single file:

```bash theme={null}
kane-cli evidence merge <targets...> --run-id nightly-2026-07-11
```

Each target is an execution id or a pack path. **Order matters**: when the policy has to choose between packs, the earlier target wins.

| Flag | Description | Default |
| - | - | - |
| `--run-id <id>` | Run id for the merged pack, **required** | None |
| `-o, --out <path>` | Output path | `.testmuai/evidence/<run-id>.evidence` |
| `--rules <path>` | Custom merge-rules file (replaces the defaults entirely) | built-in defaults |
| `--on-collision <action>` | `error`, `prefer-first`, `prefer-latest`, or `discard` | `error` |
| `--title <title>` | Title for the merged run | first eligible pack's |
| `--no-finalize` | Keep the merged pack live instead of sealing it | seals by default |
| `--json` | Machine-readable merge report | off |

You cannot use `--rules` and `--on-collision` together.

Exit codes: `0` merged, `1` policy abort, `2` usage error.

## The default policy

By default, merge is strict:

* inputs must be **sealed and valid**,
* duplicate run ids are skipped,
* packs from **different projects or organisations** are refused,
* two packs with the same test id cause an **error**, unless you choose another action with `--on-collision`.

## Merge identity

Merge decides whether two runs are the same test by their identity. For ordinary runs, the default identity is made of:

* the test and commit: `external_id.test_id` and `external_id.commit_id`,
* the environment: `environment.os`, `environment.os_version`, `environment.browser`, `environment.browser_version`, `environment.device`, and `environment.app`.

Re-runs with the same identity are nested as attempts of one test. A run with a different environment becomes a separate sibling, so one test run on two devices or two builds gets two entries.

An explicit collision policy can change this grouping, and a custom `--rules` file replaces the default rules instead of extending them. Check which identity rules apply before you treat two runs as retries of the same test.

## A nightly roll-up

```bash theme={null}
kane-cli evidence merge \
  .testmuai/evidence/*.evidence \
  --run-id nightly-2026-07-11 \
  --title "Nightly regression"
```

Without `-o`, the merged pack is written to `.testmuai/evidence/<run-id>.evidence`. The path stays unique as long as you use a unique run id.

The result is one sealed pack with the tests from every pack that passed the policy. Skipped packs contribute nothing. The merge report (`--json`) lists what was skipped and why.

## Next steps

* [Validating packs](https://www.testmuai.com/docs/kane-cli-evidence-validate.md): confirm the merged pack before handing it over.
* [Viewing evidence](https://www.testmuai.com/docs/kane-cli-evidence-viewing.md): open the merged pack.

## 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.