# Tutorial: RAG canary walkthrough

> **Status:** Lab-only. **No Phase C hard mode.** Defaults: off / observe.

## Goal

Enable the node-local shadow index, plant a lab canary memory record, and confirm
canary egress grades without polluting production top-k.

## Prerequisites

- Built sensor with `agentic_defense` support
- [agentic-shadow-index.md](../how-to/agentic-shadow-index.md)
- Read [agentic-defense-positioning.md](../explanation/agentic-defense-positioning.md)

## Steps

1. Confirm `agentic_defense.shadow_index.enabled: false` in
   `config/sensor.example.yaml`.
2. Enable:

   ```bash
   export CYBERHALLUCINET_AGENTIC_SHADOW_INDEX=1
   export CYBERHALLUCINET_TENANT_ID=lab-tenant-1
   ```

3. Run the sensor. Upsert / retrieval of canary records must use the shadow index
   path only (empty tenant ID is rejected).
4. Trigger a lab path that adopts a canary needle into model/tool output so the
   sensor can decode it (depth/size capped).
5. Confirm telemetry includes `evidence_grade=verified_canary_egress` (or
   pending attrs until decode succeeds).
6. Confirm production retrieval ranking does **not** read the shadow index.

## Expected result

Advisory canary evidence only. No Soft/Hard execute from the sensor.

## Safety

- Never publish production canary formats.
- Stay readable as plain Markdown.
