feat(ios): complete P2.1 schema versioning and P2.2 combined edge case tests
P2.1: iOS Schema Versioning Strategy
- Added SCHEMA_VERSION constant and checkSchemaVersion() method in PersistenceController
- Version stored in NSPersistentStore metadata (observability contract, not migration gate)
- CoreData auto-migration remains authoritative; version mismatches logged, not blocked
- Documentation added to ios/Plugin/README.md with migration contract
P2.2: Combined Edge Case Tests
- Added 3 resilience test scenarios to DailyNotificationRecoveryTests.swift:
- test_combined_dst_boundary_duplicate_delivery_cold_start()
- test_combined_rollover_duplicate_delivery_cold_start()
- test_combined_schema_version_cold_start_recovery()
- All tests labeled with @resilience @combined-scenarios comments
- Tests verify idempotency and correctness under combined stressors
P2.3: Android Combined Tests Design
- Created P2.3-DESIGN.md with scope, invariants, and acceptance criteria
- Created P2.3-IMPLEMENTATION-CHECKLIST.md with step-by-step execution plan
- Design ready for implementation to achieve parity with iOS P2.2
Documentation Updates
- Fixed parity matrix: iOS invalid data handling now correctly shows "✅ Recovery tested" with test references
- Updated progress docs (00-STATUS.md, 01-CHANGELOG-WORK.md, 03-TEST-RUNS.md, 04-PARITY-MATRIX.md)
- Updated P2-DESIGN.md to reflect P2.3 scope (Android combined tests)
- Updated SYSTEM_INVARIANTS.md baseline tag references
Baseline Tag
- Created and pushed v1.0.11-p2-complete tag
- Tag represents P2.x completion (schema versioning + combined resilience tests)
All invariants preserved. CI passes. Tests runnable via xcodebuild on macOS.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
| Feature | Android | iOS | Notes |
|
||||
|---------|---------|-----|-------|
|
||||
| Persistent state | ✅ SQLite (Room) | ✅ CoreData + SQLite | Both implemented |
|
||||
| Schema versioning | ✅ Room migrations | ⚠️ Partial | iOS has CoreData auto-migration, but explicit versioning may be needed |
|
||||
| Schema versioning | ✅ Room migrations | ✅ Explicit | iOS has explicit version tracking in CoreData metadata (P2.1 complete) |
|
||||
| State survives app restart | ✅ Yes | ✅ Yes | Both implemented |
|
||||
| State survives OS kill | ✅ Yes | ✅ Yes | Both implemented |
|
||||
| State survives reboot | ✅ Yes | N/A | iOS handles notifications automatically |
|
||||
@@ -61,7 +61,7 @@
|
||||
|---------|---------|-----|-------|
|
||||
| Error codes | ✅ Structured | ✅ Structured | Both have error codes |
|
||||
| Error recovery | ✅ Yes | ✅ Yes | Both handle errors gracefully |
|
||||
| Invalid data handling | ✅ Recovery tested | ⚠️ Input validation only | **GAP** - iOS needs recovery testing |
|
||||
| Invalid data handling | ✅ Recovery tested | ✅ Recovery tested | Both have automated recovery tests: Android (TEST 4), iOS `test_recovery_ignores_invalid_records_and_continues()` and `test_recovery_handles_null_fields()` (see `ios/Tests/DailyNotificationRecoveryTests.swift`) |
|
||||
|
||||
---
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
| Integration tests | ✅ Yes | ⚠️ Partial | iOS has some tests |
|
||||
| Test automation | ✅ High | ⚠️ Medium | iOS has manual components |
|
||||
| Recovery testing | ✅ Yes | ✅ Yes | Both have automated recovery tests (DailyNotificationRecoveryTests.swift) |
|
||||
| Combined edge case tests | ⚠️ Partial | ✅ Yes | iOS has 3 combined scenarios: `test_combined_dst_boundary_duplicate_delivery_cold_start()`, `test_combined_rollover_duplicate_delivery_cold_start()`, `test_combined_schema_version_cold_start_recovery()` (see `ios/Tests/DailyNotificationRecoveryTests.swift`) |
|
||||
|
||||
---
|
||||
|
||||
@@ -87,16 +88,14 @@
|
||||
|
||||
### Important Gaps (P1)
|
||||
|
||||
1. **Schema Versioning** - iOS has CoreData auto-migration, but explicit versioning strategy may be needed
|
||||
2. **Test Automation** - iOS tests can be run via xcodebuild, but CI integration may need macOS runners
|
||||
1. **Test Automation** - iOS tests can be run via xcodebuild, but CI integration may need macOS runners
|
||||
|
||||
### Nice-to-Have (P2)
|
||||
|
||||
1. **Combined Edge Case Tests** - DST boundary + duplicate delivery + cold start combined scenario
|
||||
2. **OS Reboot Testing** - True OS reboot scenarios (iOS handles automatically, but explicit testing may be valuable)
|
||||
1. **OS Reboot Testing** - True OS reboot scenarios (iOS handles automatically, but explicit testing may be valuable)
|
||||
|
||||
---
|
||||
|
||||
**Last Updated:** 2025-12-16
|
||||
**Next Review:** After PHASE 2 completion
|
||||
**Last Updated:** 2025-12-22
|
||||
**Next Review:** After next major milestone
|
||||
|
||||
|
||||
Reference in New Issue
Block a user