# Phase 15 Handoff: Final Automated QA, Accessibility, Performance, Resilience, and Visual Validation ## Handoff status Phase 14 implements the controlled demo workflow and vendor-neutral integration boundary. Static checks, unit/integration tests, coverage, build, standalone HTTP smoke checks, audit, secret scan, and fail-closed production behavior pass in the available fallback environment. Production services remain intentionally blocked. Browser, axe, visual, and manual QA remain unobserved because local Chromium navigation is administratively blocked. ## Read first 1. `docs/PHASE_14_IMPLEMENTATION_REPORT_v1.0.md` 2. `docs/phase14/INTEGRATION_ARCHITECTURE_v1.0.md` 3. `docs/phase14/DEMO_FORM_CONTRACT_v1.0.md` 4. `docs/phase14/DESTINATION_REGISTRY_v1.0.csv` 5. `docs/phase14/INTEGRATION_TRACEABILITY_MATRIX_v1.0.csv` 6. `docs/phase14/DATA_FLOW_INVENTORY_v1.0.csv` 7. `docs/phase14/CONSENT_MATRIX_v1.0.csv` 8. `docs/phase14/ANALYTICS_EVENT_REGISTRY_v1.0.csv` 9. `docs/phase14/EXTERNAL_SERVICE_INVENTORY_v1.0.csv` 10. `docs/phase14/ENVIRONMENT_VARIABLE_INVENTORY_v1.0.csv` 11. `docs/phase14/FEATURE_FLAG_INVENTORY_v1.0.csv` 12. `docs/phase14/RELEASE_GATE_MATRIX_v1.0.csv` 13. `docs/IMPLEMENTATION_ISSUE_REGISTER_v1.4.csv` 14. `docs/DECISION_LOG_v14.0.md` 15. `PHASE_14_PACKAGE_MANIFEST_v1.0.json` ## Route and destination inventory Runtime routes are `/{locale}`, `/{locale}/{approved-slug}`, `/{locale}/component-lab`, `/api/demo`, `/_not-found`, and `/robots.txt`. The destination registry is authoritative. Do not convert blocked login, pricing, product-tour, legal, support, cookie-settings, or sales destinations into links without approved URLs and locale behavior. ## Form and integration architecture The immutable Phase 9 form contract and its Zod implementation are authoritative. UI code must call the API boundary, never vendor SDKs. Server orchestration selects typed adapters, applies timeout/idempotency, and returns normalized results. The local adapter discards data and is not a production destination. ## Adapter and external-service inventory Implemented adapters: local discard and blocked production. Not implemented: CRM, scheduler, email, analytics network provider, consent manager, webhook, and durable idempotency/rate-limit store. Add each behind an explicit interface only after vendor, authentication, scope, mapping, duplicate, retry, privacy, and owner decisions are approved. ## Environment and feature flags Use `.env.example` and the Phase 14 inventories. Production must fail closed when critical values are missing. `DEMO_LOCAL_TEST_MODE` is permitted only for explicit loopback production-like tests. `DEMO_TEST_SCENARIOS_ENABLED` must remain false in production. ## Data flow and consent No field may be logged, placed in URLs, analytics, browser storage, screenshots, or monitoring labels. Legal basis, privacy notice, retention, deletion, recipients, cross-border implications, marketing consent, analytics consent, and withdrawal remain blocked. Do not improvise checkbox text. ## Analytics registry Only allowlisted event names and properties may be emitted. No personal data, form values, free text, company name, email, or identifiers are permitted. The current sink has no network and is disabled by default. A provider requires a separate approved adapter and consent/loading decision. ## Security and privacy controls Preserve strict schemas, body-size and content-type limits, request marker, same-origin policy, timeout, idempotency, no-store responses, non-reflected error codes, CSP, redaction, and server-only secrets. Before production add architecture-approved distributed rate limiting, durable idempotency, operational metrics, vendor least privilege, and webhook verification where applicable. ## Success and failure inventory The authoritative states are initial, submitting, local success, validation, configuration, duplicate, timeout, integration, abuse, and unexpected failure. Never claim CRM acceptance, email delivery, or meeting booking without provider confirmation. ## Test adapters and failure simulation Use fictional `.test` emails and deterministic scenarios: success, duplicate, timeout, integration error, validation rejection, and blocked configuration. Automated tests must never contact production systems. The test-scenario header is accepted only outside production. ## Required browser matrix Run EN, FR, and AR in Chromium, Firefox, WebKit, mobile Chrome, and mobile Safari. Cover 1440, 1024, 768, 390, and 320 widths; light, dark, system; mobile drawer; form initial/focus/error/loading/success/failure; long French and Arabic; Arabic RTL; back/refresh/resubmit; slow/offline/timeout transitions. ## Accessibility matrix Run axe plus keyboard-only, screen-reader, 200/400-percent zoom, reduced motion, forced colors, touch target, focus trap/return, error announcement, success announcement, and Arabic reading-order review. Record browser, OS, assistive technology, locale, theme, viewport, steps, result, evidence, and issue. ## Visual-regression matrix Approve deterministic baselines for the Phase 14 integration states in EN/FR/AR light/dark desktop/mobile. Do not accept screenshots of the administrative browser block. Keep fictional content and stable fonts/animations. ## Performance and bundle budgets No vendor SDK is currently permitted. Any new integration must be lazy-loaded, consent-gated where required, and measured against Phase 14 bundle inventory. Record route JS, third-party requests, main-thread cost, submission latency, timeout behavior, and interaction responsiveness. Reject vendors that require disabling CSP without review. ## Release gates The release-gate matrix and P14-001 through P14-009 are authoritative. A working local happy path does not satisfy production readiness. Critical gates include approved lead destination, legal processing, consent, retention/deletion, production URLs, distributed duplicate controls, browser/accessibility validation, and pinned runtime verification. ## Files Phase 15 may modify Tests, deterministic fixtures, visual baselines, quality reports, browser configuration, non-breaking accessibility fixes, bounded performance fixes, validation scripts, issue records, decision records, and package manifest. ## Files Phase 15 must not modify without an architecture decision Phase 9 contracts, public form fields, adapter interfaces, destination meanings, consent semantics, analytics event names, production feature defaults, token/theme/localization foundations, CSP weakening, package manager/runtime pins, or vendor selection. ## Required validation commands ```bash pnpm install --frozen-lockfile pnpm validate pnpm format:check pnpm lint pnpm typecheck pnpm test:unit pnpm test:integration pnpm test:browser pnpm test:a11y pnpm test:visual pnpm test:e2e pnpm test:security pnpm test:privacy SITE_ORIGIN=https://approved.example PUBLIC_RELEASE_APPROVED=false pnpm build pnpm audit --audit-level low pnpm manifest:generate pnpm validate:package ``` Run on Node 24.17.0, pnpm 11.9.0, unblocked pinned browsers, and a production-like isolated environment. Record exit code, duration, counts, warnings, and evidence for every command. ## Rollback and resilience instructions Exercise CRM timeout, rejection, duplicate, partial acceptance, network interruption, adapter configuration failure, scheduler unavailability, analytics denial, and repeated transport. Verify bounded retries and no duplicate external record. Roll back by disabling the public demo flag and vendor-specific server flag while preserving destination and schema controls. ## Phase 15 definition of done All static, unit, integration, browser, accessibility, security, privacy, visual, performance, destination, consent, and failure-simulation gates run in the pinned environment; approved baselines and manual evidence exist; no personal data leaks; production services remain blocked unless all business/legal/vendor decisions are supplied; every remaining issue has owner, severity, evidence, and release condition; Phase 16 receives only explicit content/business approvals rather than hidden engineering assumptions.