# TDR-0004: Live Hardware Testing Policy for E27

Status: Accepted  
Date: 2025-12-23  
Applies to: E27 backend live testing

## Context

E27 protocol validation requires live panel testing for:
- encryption correctness
- authorization behavior
- real-world timing and sequencing

However, live testing introduces risks:
- credential leakage
- non-reproducible failures
- dependency on hardware availability

A policy is required to constrain how live tests are written and run.

## Decision

- Live tests are permitted only for E27 (not M1).
- Live tests must:
  - support use of "safe" credentials
  - redact all secrets from logs and artifacts
  - emit replayable environment-variable snapshots when debug is enabled
- Snapshot reuse is allowed to bypass re-linking when appropriate.
- Live tests MUST produce the same structured artifacts as offline tests.

## Rationale

Live testing is essential for correctness but must be:
- controlled
- reproducible
- auditable

Capturing sufficient artifacts allows issues to be diagnosed without
repeated panel interaction.

## Consequences

Positive:
- Safe live testing practices
- Faster iteration via snapshot reuse
- Reduced risk of credential exposure

Tradeoffs:
- Additional care required when writing live tests

Explicitly not doing:
- Running live panel tests automatically in public CI
- Storing credentials in repositories or logs

## References

- TDR-0001: E27 Test Evidence Capture Contract
- TDR-0003: Dual-Format Test Reporting
