# RAMA AG — Final QA Report (v1.0.0-rc1)

**Status labels:**
- VERIFIED: executed and checked.
- SIMULATED: isolated server, synthetic data, emulated device.
- NOT EXECUTED.
- OPEN.

## Automated tests [VERIFIED]

All runs used the code identical to the release (`4e7a50a`), in the isolated worktree. They ran sequentially, against `rama_workforce_laravel_test` or SQLite `:memory:` only, never the live database.

| Suite | Tests | Passed | Skipped | Failed | Assertions |
| --- | ---: | ---: | ---: | ---: | ---: |
| main (MariaDB test DB) | 562 | 464 | 98 | 0 | 9,815 |
| memory (SQLite) | 97 | 96 | 1 | 0 | 741 |
| upgrade (Phase 02 + v1 migrations) | 2 | 2 | 0 | 0 | 28 |

- The skipped tests are the documented ones: SQLite-only classes inside the MariaDB run, one pre-migration case, one optional preview.
- The new SMGV tests are part of the main suite:
  - `tests/Unit/SmgvTimeEngineTest` (8)
  - `tests/Feature/SmgvAccountingTest` (8)
  - `tests/Feature/SmgvCenterTest` (6)
- What the SMGV tests cover:
  - Reference-PDF relationships (January 176 h, +0.50; vacation 117.35 h / 73.35 h).
  - Cross-midnight shifts, DST, open intervals never filled in.
  - Pensum history.
  - Close / reopen / revisions; the database refuses snapshot updates.
  - Incomplete attendance blocks closing.
  - Append-only correction ledger.
  - AHV encrypted, never audited.
  - Every SMGV route returns 403 for employees; forged Livewire calls are refused.
  - The 14-page export: order B, 12 × M, J; 2 portrait + 26 landscape MediaBoxes for 2 employees; draft watermark.
  - Private, audited download.
  - Excel, ZIP, months, Basisblatt and annual exports.
  - Import round trip, with nothing imported before confirmation and duplicate uploads refused.
- Existing tests that I adapted, with the reason:
  - The trigger assertions now require the 26 originals to stay byte-identical **plus exactly** the 6 SMGV guards.
  - The DE placeholder clash (`:in`) was fixed.
  - The admin navigation keeps the original label "Mitarbeitende & Rollen".
- Frontend: `node --check` passes for all JS; the production Vite build passes.

## PDF fidelity [VERIFIED / partly OPEN]

- Rendered pages were compared visually with the client reference:
  - Basisblatt (A4 portrait).
  - Monthly sheet (A4 landscape, 31 day columns + total, every row of the reference).
  - Jahresübersicht.
- No clipping, no broken tables, no blank overflow pages: one page per section is enforced and tested.
- OPEN: the SMGV association logo is intentionally omitted (owner decision pending). Values are drafts while the rules are unverified.

## Browser and responsive checks [SIMULATED]

Isolated headless Edge against `:3401` (the release code on the test DB, synthetic accounts and data). Screenshots are in `D:\- CLAUD PROJECTS\RAMA AG\phase02b-evidence\v1\screens`.

- **Administrator, 1440×900:** login, dashboard, SMGV overview / monthly / annual / Basisblatt / closing / exports, employees, audit all return 200.
  - Horizontal overflow only from the vertical scrollbar width (1425–1440 px).
  - No console errors.
- **1920×1080 and 1280×800:** no page overflow; the spreadsheet scrolls internally.
- **Tablet 768×1024 and mobile 390×844:** no overflow. The Employee mobile dashboard renders in Black Titanium. The Employee gets 403 on `/smgv`, `/smgv/exports` and `/audit`, and no SMGV link is shown.
- **NOT EXECUTED:**
  - Real phone and real GPS (only simulated GPS was used in Phase 02B).
  - Interactive login by the owner on the live system.

## Live post-activation checks [VERIFIED]

- **Endpoints:** `/health` 200, `/up` 200, `/login` 200 with the new CSS.
- **Guests:** all protected and SMGV routes return 302 to `/login`. CSRF returns 419.
- **Configuration:** mail is `array` (outbound blocked), debug is OFF.
- **Database:** 19 migrations, 49 tables, 26 + 6 triggers, Administrator preserved, roles admin/worker only, no foreman grants.

## Security review

- Positive role checks on four layers: route middleware `admin`, fresh database check on every Livewire request, service `Actor::admin()`, and ownership checks in the existing modules.
- Downloads are private-disk only, with SHA-256 integrity checks and audit logging.
- Uploads: extension, size and `%PDF-` checks, encrypted PDFs refused, SHA-256 duplicate guard. Uploaded files are never served back.
- AHV numbers are encrypted with APP_KEY, masked in the UI and never written to logs or audit entries.
- Excel names are written as explicit strings (no formula injection).
- No new outbound integrations. Inherited and still documented: permanent administrator-set passwords; CSP `unsafe-eval` for Alpine; client-side OpenStreetMap tiles (map container only).

## Open items

1. **GAV rule validation (10 owner questions).** Until then everything in SMGV is a draft.
2. **Owner login and smoke test on `:3400`.**
3. **Real-device GPS acceptance.**
4. **Polishing of minor legacy-widget contrast** (for example segmented pills).
5. **Real RAMA logo asset.**
