# TDR-0002: Test Artifact Formats and CI Integration

Status: Accepted  
Date: 2025-12-23  
Applies to: E27 backend testing and GitHub CI

## Context

E27 tests must integrate with GitHub Actions while also producing
artifacts suitable for deep protocol troubleshooting.

Human-readable logs alone are insufficient for CI automation, and
machine-readable formats alone are difficult to inspect during
protocol debugging.

A clear policy for test artifact formats is required.

## Decision

- **JSON Lines (JSONL)** is the canonical test artifact format.
- Each test emits exactly **one JSON object per line**.
- JSONL artifacts are uploaded in CI as build artifacts.
- JUnit XML output may be generated for GitHub UI reporting, but is
  not a substitute for JSONL artifacts.

## Rationale

JSONL:
- supports parallel test execution
- allows incremental writes
- is easy to diff, parse, and post-process
- is robust against partial failures

Separating machine-readable artifacts (JSONL) from presentation formats
avoids CI fragility.

## Consequences

Positive:
- Stable CI integration
- Easy regression analysis
- Tooling-friendly artifacts

Tradeoffs:
- Requires lightweight helper code to emit records

Explicitly not doing:
- Using YAML as the primary or canonical CI artifact
- Embedding large protocol dumps directly in CI logs

## References

- TDR-0001: E27 Test Evidence Capture Contract
- GitHub Actions artifact guidelines
