# QA Regression Checklist

## Validations executees

- `npm run build:formation` : OK
- `npm run build:v1:playstore` : OK
- `npm run build:android:assets` : OK
- `ReadLints` sur `spectral-analyzer.js`, `index.html` et scripts de build : OK
- smoke test navigateur sur `index.html` :
  - chargement UI OK
  - boutons principaux visibles
  - preferences, aide et zoom ouvrables
- monolithe navigateur :
  - `index-monolith.html` regenere sans erreur de syntaxe inline
  - appel wasm-bindgen corrige pour ne plus utiliser la signature depreciee dans `spectral-analyzer.js`
- packaging Android/Capacitor :
  - `cap sync android` execute via `npm run build:v1:playstore`
  - `appId` et `webDir` verifies dans `capacitor.config.json`
  - permissions `RECORD_AUDIO`, `MODIFY_AUDIO_SETTINGS`, `WAKE_LOCK` presentes dans `AndroidManifest.xml`
  - generation des assets Android via `@capacitor/assets` : OK

## Scenarios QA automatises executes

- Base locale de test :
  - serveur statique local sur `http://127.0.0.1:8125`
  - source QA oscillateur pour eviter la dependance micro: `?qa_source=osc&qa_osc_hz=432`
- Runtime nominal desktop :
  - URL: `index.html?qa_source=osc&qa_osc_hz=432`
  - resultat: runtime visible `audio-worklet-wasm`
- Fallback WASM KO :
  - URL: `index.html?qa_source=osc&qa_osc_hz=432&qa_disable_wasm=1`
  - resultat: runtime visible `audio-worklet-js`
  - drapeau visible: `QA wasm=off`
- Fallback AudioWorklet KO :
  - URL: `index.html?qa_source=osc&qa_osc_hz=432&qa_disable_worklet=1`
  - resultat: runtime visible `analyser-wasm`
  - raison visible: `qa-disable-worklet`
  - drapeau visible: `QA worklet=off`
- Preference JS forcee :
  - URL: `index.html?qa_source=osc&qa_osc_hz=432&qa_runtime=prefer-js`
  - resultat: runtime visible `analyser-wasm`
  - drapeau visible: `QA runtime=prefer-js`
- Refus micro simule :
  - URL: `index.html?qa_mic=deny`
  - resultat: UI chargee, meta en attente audio, drapeau visible `QA mic=deny`
- I18N :
  - changement de langue par l'UI de `AUTO` vers `FR`
  - resultat: libelles traduits visibles (`Marqueur droit`, `Parametres`, `Periode d'essai terminee`, aide en francais)

## Reste a valider manuellement sur appareils reels

- Android WebView / Capacitor sur au moins un appareil reel
- permission micro acceptee/refusee
- bascule runtime `AudioWorklet` / `AnalyserNode`
- tests acoustiques terrain: bols, gongs, percussions, flutes, voix, bruit ambiant
- parcours commercial complet avec expiration d'essai et hook achat

## Desktop browsers

- Chrome / Edge:
  - start app
  - allow microphone
  - verify live spectrum, markers, freeze, zoom, threshold, peak hold
  - open analysis modal
  - verify waterfall, layers, exports PNG/CSV/JSON
  - load a local audio file and verify offline analysis summary
- Firefox / Safari if targeted:
  - repeat same flow
  - verify fallback when `AudioWorklet` is unavailable

## Android WebView / Capacitor

- first launch:
  - app opens without blank screen
  - microphone permission prompt appears
  - audio resumes correctly after permission grant
- runtime:
  - verify runtime label changes between `audio-worklet-*` and `analyser-*`
  - verify fallback remains usable if `AudioWorklet` is unavailable
  - verify pinch zoom and marker long-press interactions
- packaging:
  - verify `www/` assets are copied into `android/app/src/main/assets/public/`
  - verify `i18n/`, `wasm/`, `docs/`, and `icons/` exist in Android assets

## Acoustic edge cases

- weak microphone level / distant source
- noisy room / broadband noise
- sustained bowls / gongs / bells
- transient percussion
- flute / breathy wind source
- voice with unstable pitch

Expected behavior:

- gate must avoid false positives while not hiding valid resonances
- classifier may return inharmonic / percussive / not reliable states
- the app must prefer honest output over forced note naming

## Failure modes

- deny microphone permission
- remove or rename one locale file
- force missing WASM files
- force runtime preference to JS fallback
- confirm UI still loads and remains informative

## Commercial variants

- `FORMATION`:
  - no blocking paywall
  - build and version shown in preferences
- `PLAY_STORE` / `VENTE_WEB`:
  - 14-day trial state visible in preferences
  - paywall appears only when trial expires
  - purchase hook dispatches `spectral-analyzer:purchase-success`
