# USB application-session recovery software candidate

Status: complete
Type: evidence
Updated: 2026-08-01
Next Action: none; deployment and the complete successor qualification sequence passed

Project Map: work/maps/map-smi-firmware-stabilization-and-qualification.md
Workpackage: work/wp/completed/wp-restore-broad-usb-compatibility-baseline.md
Incident: work/incidents/incident-usb02-stage1b-post-open-session-failure.md

## Outcome

The narrow application-session correction is software-complete. It preserves
the restored v4.11 USBX transport configuration and 1 KiB application write
size while removing three inherited application-layer compatibility hazards:

- the deprecated volume-label query no longer gates application readiness;
- the ignored attempt to select nonexistent `firstdir` is removed;
- the application no longer flushes/closes FileX media opened and owned by
  USBX during device deactivation.

Before application use, the thread revalidates the published FileX pointer and
media identifier. If they become invalid while the storage class instance is
still valid, the instance returns to deferred handoff rather than requiring
physical reinsertion. A compact 32-byte application-session diagnostic records
state, status, pointer, media identifier, generation, and file-list status.

No drive identity, model-specific path, per-drive delay, optional SCSI command,
VBUS cycle, controller power cycle, USBX transport-size change, or FileX write-
size change was added.

## Source and software gates

- Source commit: `96b8ab4b87e438c41370b24001a5ef00bcd93492`.
- `script/check-usb-mass-storage-workflows.ps1`: PASS, including guards against
  the removed volume/default-directory/media-close lifecycle.
- `script/check-hpt-customer-export.ps1`: PASS, 34/34.
- `script/check-usb-transaction-inventory.ps1`: PASS.
- `script/test-usb-mass-storage-workflows.py`: PASS, 9/9.
- `script/check-usb-write-size-diagnostic.ps1`: PASS, 9/9.
- `script/check-code-review-mitigations.ps1`: PASS, 15/15.
- Managed Debug rebuild: PASS.
- Managed Release rebuild: PASS.
- Debug and Release packaging: PASS; stable and versioned package hashes match
  within each configuration.

Both managed builds completed with the repository's existing warning set and
no build failure.

## Exact candidate artifacts

| Artifact | Bytes | SHA-256 |
| --- | ---: | --- |
| `work/evidence/generated/usb-session-recovery-candidate-20260731/7520553_SMI_FW-Debug.elf` | 14,688,884 | `D7445725F1F607B8B03EA6515C9F442FA85E999F3BDACE6E8FC7AFAC2B236C25` |
| `work/evidence/generated/usb-session-recovery-candidate-20260731/7520553_SMI_FW-Debug.srec` | 8,640,666 | `8263A3AC4876C0B42ED4D10FB98C2FD8E85433C784A62F77B6A99967D891C12C` |
| `work/evidence/generated/usb-session-recovery-candidate-20260731/7520553_SMI_FW-Release.elf` | 11,358,056 | `FEABA960AFD9A55C4BE742C69974D9FE2369D99B20E663975AB5F320F78416FC` |
| `work/evidence/generated/usb-session-recovery-candidate-20260731/7520553_SMI_FW-Release.srec` | 8,640,666 | `0FE12FCE02C411378D1AF45EB11C1AC27694A5D69613830FD970865518C72B3F` |

The generated evidence directory is intentionally ignored. Repository-tracked
Debug/Release build-output copies were restored to their prior versions after
hash capture because Tool Shed's hard evidence limit prohibits an 81.3 MiB raw
generated diff. Rebuild from the pinned source commit if the ignored local
candidate directory is unavailable.

## Remaining gate

This is software/build evidence, not compatibility qualification. Program and
verify the exact Release S-record B first and A second, capture complete SD CID
identity after reboot, and repeat the failed insertion/session coverage. Stage
2 remains blocked until the corrected candidate passes the required baseline
and USB09 regression.
