# Stress Matrix Plan

## Purpose

Replace the current provisional write-stability estimate with a controlled, repeatable measurement of how much USP configuration activity this firmware can tolerate before behavior degrades.

## Primary Question

How many sequential USP mutations can this firmware handle, under defined conditions, before one or more of the following occurs:

- set failure
- readback failure
- rollback failure
- controller timeout
- controller/service instability
- controller/runtime divergence

## Current Provisional Envelope

Based on tonight's one-off testing:

- `1` targeted write: generally workable
- around `5-6` sequential mutations: instability already visible
- by `9+` sequential mutations: frequent `504` / `503`
- large batch mutation: not operationally usable

This plan is intended to replace that estimate with a proper measured curve.

## Test Design

Run a staged matrix with fixed delays and fixed mutation categories.

### Mutation Depth

For each category, run sequences of:

- `1`
- `3`
- `5`
- `8`
- `10`
- `15`

### Timing Profiles

Run each depth with:

- `10s` spacing between writes
- `30s` spacing between writes
- `60s` spacing between writes

### Load Modes

For each category and depth, run:

- write-only
- write plus light read polling
- write plus heavier read polling

### Categories

Run categories independently, not mixed at first:

1. SSID visibility
2. SSID rename on non-primary guest SSID
3. WPS toggle
4. WMM / UAPSD / isolation booleans
5. DataElements threshold integers
6. DataElements policy booleans
7. Radio controls

## Success Metrics

Collect for every run:

- set acceptance rate
- verify success rate
- rollback success rate
- time to first failure
- time to first `504`
- time to first `503`
- controller recovery time
- router runtime divergence count

## Evidence to Capture

For each run:

- controller payloads for every set/get
- router snapshots before and after
- router snapshots after rollback
- controller health check at start and end
- router USP runtime check at start and end

## Pass / Fail Interpretation

Example thresholds:

- stable:
  - `100%` set success
  - `100%` verify success
  - `100%` rollback success
- marginal:
  - some verify or rollback misses
  - no controller instability
- unstable:
  - recurring `504` / `503`
  - controller no longer reflects runtime
  - rollback cannot restore baseline

## Recommended Order

1. dataelements policy and threshold categories
2. AP boolean toggles
3. SSID rename on guest service
4. SSID visibility
5. WPS
6. radio controls last

## Exit Criteria

Stop a run early if any of these occurs:

- main SSID unexpectedly drops
- controller health fails repeatedly
- router runtime no longer matches expected recovery
- rollback leaves visible drift

## Desired Output

At the end of the matrix, produce:

- a category-by-category capacity table
- a best-known safe operating envelope
- a list of mutation classes that should remain manual-only

## Reporting Package Required In Advance

Before the stress matrix is run, the following outputs should already be prepared and expected:

1. Executive summary
2. Detailed engineering run report
3. Pass/fail matrix
4. Raw artifact bundle

The goal is to avoid improvising the write-up after the test and to ensure the result is immediately shareable.

### Executive Summary

Audience:

- program leads
- product stakeholders
- non-technical leadership

Contents:

- purpose of the test
- current safe operating envelope
- what worked well
- what worked with limits
- what failed
- business-facing recommendation

### Detailed Engineering Run Report

Audience:

- firmware engineering
- controller engineering
- QA

Contents:

- exact plan followed
- run conditions
- matrix dimensions used
- timing and load mode
- category-by-category results
- controller-side behavior
- router-side behavior
- recovery actions
- final device state

### Pass / Fail Matrix

Audience:

- engineering and QA reviewers who want a quick scan

Contents:

- category
- mutation depth
- delay profile
- load mode
- pass/fail status
- first failure point
- recovery outcome

### Raw Artifact Bundle

Contents:

- controller payloads
- router snapshots
- HTML / Markdown / JSON reports
- supporting probe outputs

## Templates Included

Use the following prepared files as the required reporting set for the future stress matrix run:

- `executive-summary-template.md`
- `detailed-run-template.md`
- `pass-fail-matrix-template.md`
