# Decision Trace verification walkthrough

## The sample: an AI technician session (package version 1.2)

- Package: `sample-package/apr-APR-2026-DEMO-000002.zip`
- Trust anchor: `sample-package/behavry-trust-anchor-demo-2026-11.json` (`behavry.trust_anchor.v1`, kid `behavry-demo-ed25519-2026-11`, Ed25519)

The package is **synthetic**. It was produced on 2026-11-13 by Behavry's production package generator, and its event hashes and signatures come from the audit writer's own hashing and signing functions. Those functions ran over an in-memory store with a fresh demo key. It was **not** exported from a live tenant.

**The five decisions were scripted to show allow, hold and deny. They were not computed by evaluating a policy, and no target system was involved.** The requester is recorded as caller-asserted (`requester_verified: false`).

| Event | Tool | Target | Recorded decision | Execution status |
|---|---|---|---|---|
| evt-demo-0000 | `halo_get_ticket` | ticket T-4821 | allow | completed |
| evt-demo-0001 | `cipp_reset_password` | j.rivera@acme.example | escalate (held) | not_forwarded |
| evt-demo-0002 | `cipp_reset_password` | j.rivera@acme.example (identical call after approval) | allow | completed |
| evt-demo-0003 | `cipp_reset_password` | c.ng@acme.example (not on the ticket) | deny | not_forwarded |
| evt-demo-0004 | `cipp_reset_password` | a.lee@smith-financial.example (another tenant) | deny | not_forwarded |

"completed" is what the record says, not proof from the target: no target existed. In production, confirm the outcome in the target's own audit log.

In production, the customer obtains the trust anchor from their own tenant, not from a vendor's website. Supplying the anchor yourself is what makes the result independent.

## Run (behavry-verify 0.14.0 or later)

The events use decision hash version 9, which behavry-verify 0.13.0 and earlier cannot rebuild. Those versions report the package NOT VERIFIED, with an "upgrade behavry-verify" message.

```
$ behavry-verify --package apr-APR-2026-DEMO-000002.zip --trust-anchor behavry-trust-anchor-demo-2026-11.json
VERIFIED

✓ Signature valid               Ed25519 over the canonical manifest, key behavry-demo-ed25519-2026-11
✓ Signer fingerprint matches    sha256:e384a6966c311acf
✓ Merkle root matches           recomputed over 5 event hashes
✓ Event count verified          5 events
✓ Event signatures valid        5 of 5 events individually signed and verified
– No chain breaks               not applicable to package_version 1.2: ... covered by the Merkle root and the per-event signatures.
✓ Producer chain flags intact   5 links recorded as verified at export time
✓ File digests match            9 files match the digests in the signed manifest
✓ Event content matches hashes  5 decision event hash(es) recomputed from content
– Authorization records valid   package carries no authorization records
– Observer signatures valid     package carries no observations
exit 0
```

## Tamper checks (reproduced 2026-11-13)

Each change was made to `timeline.json` in a copy of the package:

| Change | Result |
|---|---|
| evt-demo-0003 `policy_result` `deny` → `allow` | NOT VERIFIED: file digests ✗ (timeline.json), event content ✗ (evt-demo-0003) |
| evt-demo-0003 `target` → the ticket's named user | NOT VERIFIED: same two failures |
| evt-demo-0003 `observed_verdict` `null` → `deny` | NOT VERIFIED: same two failures |

## What VERIFIED proves

- The manifest was signed by the key in the anchor you supplied.
- Every component file is byte-for-byte what the signed manifest lists.
- Each decision event's hash reproduces from its own readable fields: verdict, tool, target, arguments digest, requester, posture and execution status.
- The event hashes, their count and their signatures match.

## What it does not prove

- That an action ran, or did not run, on the target. A recorded "completed" or "deny" is the record's claim. Check the target's own audit log.
- That the requester was who they said. The record states the requester was not verified.
- That the decisions were correct, or that the policy was the right one. In this sample they were scripted.
- Completeness. Actions on paths that were not governed are not in the record.

## The older sample (package version 1.0)

`https://behavry.ai/apr-APR-2026-DEMO-000001.zip` (anchor `behavry-trust-anchor-demo.json`) predates file digests and event content.

The verifier reports it as VERIFIED, with two skipped lines stating that files and event content are **not** bound. An edited verdict in that package still verifies. Treat a skip as "not proven".

## Skipped or conditional checks

- File digests and event content are skipped for packages that predate them.
- The chain walk is not applicable from package version 1.1.
- If the package's key id is not in your anchor, the signature check is skipped and the result is NOT VERIFIED.
- The signer-fingerprint check is skipped if there is no key hint.
- The tool requires `--trust-anchor` or `--public-key`.
