# NFT-RES-04 — 35 s blackout-with-spoof full escalation ladder

**Task**: AZ-435_nft_res_04_blackout_escalation
**Name**: 35 s blackout + spoof exercises full failsafe escalation ladder (AC-NEW-8 escalation thresholds)
**Description**: Implement NFT-RES-04 — Tier-1 OR Tier-2; 35 s blackout + spoof injection; assert full escalation ladder fires (100 m → 2D fix degrade; 500 m or 30 s → 999.0 horiz_accuracy + VISUAL_BLACKOUT_FAILSAFE).
**Complexity**: 3 points
**Dependencies**: AZ-406, AZ-407, AZ-408, AZ-426 (uses same fixture, separate scenario)
**Component**: Blackbox Tests / Resilience / Security (epic AZ-262)
**Tracker**: AZ-435
**Epic**: AZ-262 (E-BBT)

## Problem

While FT-N-04 covers the 35 s window's escalation thresholds, NFT-RES-04 is the resilience-tier scenario specifically tasked with verifying the *full* escalation ladder fires in observable order — covariance crossings → fix-quality degrade → 999.0 horiz_accuracy → VISUAL_BLACKOUT_FAILSAFE STATUSTEXT — under realistic timing.

## Outcome

- pytest scenario at `e2e/tests/resilience/test_nft_res_04_blackout_escalation.py`.
- 35 s blackout + spoof from `blackout_spoof.py --window 35s`.
- Assertions:
  - 100 m covariance threshold → fix-quality degrade (2D fix or worse) within ≤500 ms of crossing.
  - 500 m covariance OR 30 s elapsed → `horiz_accuracy=999.0` AND `VISUAL_BLACKOUT_FAILSAFE` STATUSTEXT within ≤500 ms.

## Scope

### Included
- 35 s window with spoof.
- Both escalation-threshold assertions.

### Excluded
- The non-35-s sub-cases of FT-N-04 — owned by AZ-426.

## Acceptance Criteria

**AC-1: 100 m threshold → fix-quality degrade**
Given the 35 s window
When 95 % covariance crosses 100 m
Then within ≤500 ms, outbound MAVLink reports fix-quality degraded (`GPS_INPUT.fix_type ≤ 2` for AP, equivalent for iNav).

**AC-2: 500 m / 30 s threshold → 999.0 + STATUSTEXT**
When 95 % covariance crosses 500 m OR blackout exceeds 30 s
Then within ≤500 ms: outbound `horiz_accuracy=999.0` AND mavproxy captures STATUSTEXT containing `VISUAL_BLACKOUT_FAILSAFE`.

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

## System Under Test Boundary

Same boundary as FT-N-04.

## Constraints

- The escalation ladder must fire in the observable order — earlier escalations (100 m fix-degrade) must precede later ones (999.0 + FAILSAFE) in the captured streams.

## Document Dependencies

- `_docs/02_document/tests/resilience-tests.md` § NFT-RES-04
- `_docs/02_document/tests/test-data.md` § Resilience (NFT-RES-04 row)
