# Oshun V1 Automation Matrix

This matrix is the minimum release gate for V1 changes. A pull request must run
the rows touched by its change type plus every critical journey it can affect.

## Change Type Gates

| Change type                      | Required checks                                                                                | Blocking scope                                             |
| -------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| Contract, adapter, policy        | Vitest unit coverage, contract drift checks, schema compatibility checks, typecheck            | Every changed contract, adapter, policy, registry binding  |
| API/BFF                          | Route unit tests, authz regression, tenant isolation, OpenAPI drift, retry/idempotency paths   | Changed route group and any shared middleware              |
| Customer web                     | Vitest, typecheck, Playwright journey, accessibility, Lighthouse budget, PWA/offline checks    | Affected journey plus shared shell/navigation              |
| Admin web                        | Vitest, typecheck, Playwright RBAC/review/moderation/privacy, accessibility, visual regression | Affected queue/workspace plus dense-data shell             |
| Mobile                           | Mobile E2E for auth, onboarding, domains, assistant, notification, offline, retry              | Affected shell/domain flow and admin urgent-queue flows    |
| Messaging channel                | Provider policy unit tests, webhook signature tests, retention/consent/DSAR tests              | Provider adapter, inbound webhook, outbound policy         |
| Persistence/migration            | Migration dry run, rollback validation, contract-persistence drift, EXPLAIN/index checks       | Changed schema and every consuming contract                |
| Background job                   | Retry, dedup, idempotency, replay, dead-letter, chaos/failure recovery, queue throughput       | Changed queue, worker, retry policy, and dead-letter path  |
| Search/recommendation/evaluation | Golden, holdout, adversarial, differential, metamorphic, performance, canary checks            | Changed ranker, evaluator, prompt, model adapter, index    |
| Security-sensitive               | SAST, dependency audit, secret scan, fuzz, SSRF/authz tests, DAST where staging is available   | Changed authorization, network, upload, dependency surface |

## Critical Journey Gates

| Journey family         | Required automation                                                                                                                                                                                            |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Customer web           | Auth, onboarding, home, domain switching, search, library, activity, Tara, Veritas, Nyx, Nisaba, Metis, assistant, profile, privacy, memory, billing, offline/PWA.                                             |
| Admin web              | Auth, RBAC, review decisions, moderation, appeals, support, privacy, persona approval, model promotion, incidents, exports, policy, research integrity, dense-data workspaces.                                 |
| Mobile                 | Auth, onboarding, home, quick actions, Tara, Arete, Veritas, Nyx, Nisaba, Metis, assistant text, assistant voice, notifications, memory, privacy, offline, retry, admin urgent queues.                         |
| Accessibility          | Shared shell, assistant, admin queues, dense data, keyboard-only, focus order, reduced motion, zoom, screen reader semantics, assistive technology smoke paths.                                                |
| Performance            | Lighthouse budgets for every customer high-value route, route bundle budgets, load/spike/soak where server behavior changes, memory and queue-throughput tests for long-running work.                          |
| Data plane             | Contract, event schema, retry, deduplication, idempotency, replay, dead-letter, migration, analytics, audit, seed, synthetic-data checks.                                                                      |
| Integrity and security | Golden, holdout, adversarial, fuzz, malicious input, mutation-strength, replay, clock-skew, canary, red-team, API authorization, resource-consumption, SSRF, SAST, DAST, dependency, secret, SBOM, provenance. |

## Matrix Depth

Browser and device coverage must include Chromium, Firefox, WebKit where the
surface has Playwright coverage; representative mobile and tablet viewports;
portrait and landscape where supported; mobile-web/PWA install/offline states;
LTR and RTL where localization is enabled; long strings; narrow, standard, and
dense desktop viewports; low bandwidth, high latency, network interruption, and
permission-state permutations for flows that depend on media, notifications,
location, files, storage, service workers, or background sync.

## CI Reporting And Retention

CI must publish machine-readable test reports plus human summaries for E2E,
accessibility, visual regression, Lighthouse, and mobile automation. Failing E2E
runs must retain trace, HAR, screenshots, videos where enabled, server logs, and
merged reports. Retention is at least 14 days for launch-critical E2E artifacts
and at least 7 days for failure-only server logs unless a workflow documents a
stricter policy.

Flaky tests may be quarantined only with an owner, expiry, linked issue, deflake
SLA, and release-blocker tag when the covered journey is launch-critical. A
missing critical automation row blocks merge or release until the workflow,
test, or documented non-applicability evidence is restored.

## V6 Manual QA

V6 manual-QA recipes live at `docs/testing/v6-manual-qa-recipes.md` and are
required after the automated V6 browser, operator, safety, performance, and
cross-progression gates pass for a production-like environment. The manual
recipes cover Pixel Streaming, Tier-2 fallback, the Steward App, Orun district
traversal, Egbe Studio, the Operator Console, Aye Threshold round trips, safety,
accessibility, localization, and degradation evidence.
