# Verification — 2026-10-16

User approved implementation with "ya apply tugas ini" after the complete task summary, including F1–F3, D1 and P1–P3.

## Delivered

- Personal inbox endpoints, notification service/controller/validators/routes and OpenAPI.
- Transactional pending checkout, urgent WO and low-stock publishers; due/overdue scheduled check command.
- Notifications page and top-header consumer with three newest entries, total unread badge, explicit acknowledgement, personal delete/undo and filtered CSV.
- User-scoped React Query keys, AbortSignal forwarding, cache cancellation/removal on account change, visible-session polling and mutation invalidation.
- Nullable unique eventKey in prisma/models, root schema multi-file documentation and ERD. Prisma config already loads the entire prisma directory, so models are not duplicated into schema.prisma.

## Executed checks

- Prisma validate and generate succeeded.
- migrate dev --create-only could not run noninteractively. Generated SQL with Prisma migrate diff, inspected the additive column/index, and applied using migrate deploy. The development database reports all11 migrations applied.
- Isolated notification runner replayed all migrations in a disposable database; model comparison reports no difference. Runner deletes only its verified random temporary database.
- 14 API/contract tests passed: role-based fanout, anonymous pending checkout, urgent pilot/quarantine WO, repeated priority changes, threshold edits and stock reversals, unique-key concurrency, rollback, ownership, explicit reads, delete/restore, timezone boundaries, calibration exclusion, PM/overdue, daily stock recurrence, CSV escaping and export limit.
- 4 Chrome browser tests passed: three latest previews/unread badge, read-all and delete/undo persistence across reload, isolated empty account, and actual checkout/stock/quarantine/overdue events visible in the consumer. Chrome required execution outside the restricted sandbox.
- 3 frontend service tests passed: query parameters/account keys, explicit mutations, cancellation, malformed response handling and CSV transport.
- API build/typecheck and compiled Swagger contract passed. Frontend production build passed with the existing large-chunk warning.
- General API suite passed: 74 tests, with 87 environment-gated tests skipped. The Notifications database/browser tests were executed separately as reported above.
- Strict OpenSpec validation and git diff whitespace check passed.

## Operation

Configure the deployment scheduler to invoke `npm run notifications:check` from apps/api every minute. Scheduler installation is intentionally outside the change; only its command and deployment instructions are supplied. Domain-triggered notifications do not depend on that scheduler. PM orders must continue to be generated by the existing maintenance scheduler. Settings/preferences and email remain outside scope. Calibration history is retained but excluded by kind or linked WO type.

The new tests leave application data intact. No historical urgent/approval backfill or real database reminder generation was run as part of verification. No OpenSpec archive was performed.
