# V1 Block 26 — Verification & Contract Test Suite

**Purpose**: Repository contract tests.

> **Note for Codex**: Follow tasks exactly; avoid exploratory calls when tasks specify names/files/tests.

## Chunk 26.1 — Coverage & adapter verification
Recommended level: **HIGH**

Status: Complete on 2026-06-26.

### Tasks
1. Extend repo conformance tests to compute coverage report using `dart run coverage`.
2. Fail CI if coverage < 80%.
3. Ensure desktop notification adapter passes mock contract tests.

### Acceptance criteria
1. Coverage report generated in CI artifacts; threshold met.

### Completed implementation
1. Added root dev dependency `coverage`.
2. Added executable `scripts/test.sh` running `dart analyze`, `dart test`, `dart run coverage:test_with_coverage`, and an 80% coverage threshold check.
3. Added `tool/check_coverage.dart` to parse `coverage/lcov.info`, scope coverage to package `lib/` code, exclude generated `.g.dart`, and fail below threshold.
4. Added shared notification adapter contract test helper `packages/scheduler_notifications/test/notification_adapter_contract.dart`.
5. Ran the contract against `FakeNotificationAdapter`.
6. Ran the same contract against `DesktopNotificationAdapter` using a recording backend.
7. Normalized desktop adapter cancellation ids before passing them to the backend.

### Verification
1. `dart pub get`: passed.
2. `dart format ...`: passed for touched Dart files.
3. `cd packages/scheduler_notifications && dart analyze && dart test`: passed, 4 tests.
4. `cd packages/scheduler_notifications_desktop && dart analyze && dart test`: passed, 8 tests.
5. `scripts/test.sh`: passed.
6. Coverage result: 83.31% package `lib/` line coverage, above the 80% threshold.

---
