# NFT-LIM-04 — Thermal envelope on Jetson

**Task**: AZ-443_nft_lim_04_thermal
**Name**: Sustained thermal headroom + AC-NEW-5 PARTIAL acceptance (AC-NEW-5)
**Description**: Implement NFT-LIM-04 — Tier-2 ONLY; sustained 30 min Derkachi loop at workstation ambient; record CPU/GPU/SoC temperatures via `tegrastats`; assert no thermal throttling kicks in. Mark as PARTIAL coverage of AC-NEW-5 (the +50 °C chamber portion is a separate release-gate scenario).
**Complexity**: 2 points
**Dependencies**: AZ-406, AZ-407, AZ-444
**Component**: Blackbox Tests / Resource Limit (epic AZ-262)
**Tracker**: AZ-443
**Epic**: AZ-262 (E-BBT)

## Problem

Thermal behavior in workstation ambient is a partial coverage of AC-NEW-5 — it cannot prove the +50 °C envelope but it can flag obvious thermal regressions.

## Outcome

- pytest scenario at `e2e/tests/resource_limit/test_nft_lim_04_thermal.py`. Tier-2 ONLY.
- 30 min Derkachi loop; per-second `tegrastats` capture; assert no thermal-throttling event in `dmesg` AND p99 `cpu_temp ≤ T_throttle - 5 °C` (5 °C headroom).
- Annotate `traceability-matrix.md` AC-NEW-5 status as PARTIAL (chamber required for full).

## Scope

### Included
- 30 min loop.
- `tegrastats` + `dmesg` capture.
- PARTIAL annotation in evidence bundle.

### Excluded
- +50 °C chamber portion — owned by a separate release-gate scenario, not in this CI scope.

## Acceptance Criteria

**AC-1: tier guard**
Given `tier == tier1-docker`
Then the test SKIPs.

**AC-2: no thermal throttle**
Given the 30 min loop
Then `dmesg --since "<run_start>"` shows no entries matching `thermal_throttle` / `tegra_thermal_zone`.

**AC-3: 5 °C headroom**
Given the per-second `tegrastats` samples
Then `p99(cpu_temp) ≤ T_throttle - 5 °C` AND `p99(soc_temp) ≤ T_throttle - 5 °C`. T_throttle is the hardware-documented value (97 °C for CPU, 95 °C for SoC on Orin Nano per nVidia docs; sourced from a fixture file at runtime).

**AC-4: PARTIAL annotation**
Given the test completes
Then the evidence bundle includes a `traceability-status.json` entry `"AC-NEW-5": "PARTIAL — chamber required for full"`.

**AC-5: parameterization**
Given conftest parameterization
Then the scenario runs per `(fc_adapter, vio_strategy)`.

## System Under Test Boundary

Same as NFT-LIM-01.

## Constraints

- Tier-2 only.
- T_throttle is read from a fixture file (`tests/fixtures/jetson-thermal-thresholds.json`) so future Jetson hardware updates require only a fixture bump.

## Document Dependencies

- `_docs/02_document/tests/resource-limit-tests.md` § NFT-LIM-04
- `_docs/02_document/tests/traceability-matrix.md` § AC-NEW-5 (PARTIAL annotation)
