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.
183 lines
6.0 KiB
Markdown
183 lines
6.0 KiB
Markdown
# Work Summary — 2025-12-22
|
|
|
|
## Overview
|
|
|
|
Completed P2.1 (iOS schema versioning) and P2.2 (iOS combined edge case tests), designed P2.3 (Android combined tests), fixed parity matrix inaccuracies, and established new baseline tag.
|
|
|
|
---
|
|
|
|
## Major Accomplishments
|
|
|
|
### ✅ P2.1: iOS Schema Versioning Strategy (Complete)
|
|
|
|
**Implementation:**
|
|
- Added `SCHEMA_VERSION` constant (value: 1) to `PersistenceController`
|
|
- Implemented `checkSchemaVersion()` method that logs version on store load
|
|
- Version stored in `NSPersistentStore` metadata (non-intrusive approach)
|
|
- Version mismatches logged as warnings (not blocked) — CoreData auto-migration remains authoritative
|
|
|
|
**Documentation:**
|
|
- Added schema versioning strategy section to `ios/Plugin/README.md`
|
|
- Clarified: "Schema version is a logical contract, not a forced migration trigger"
|
|
- Documented migration contract and Android parity
|
|
|
|
**Files Modified:**
|
|
- `ios/Plugin/DailyNotificationModel.swift` (47 lines added)
|
|
- `ios/Plugin/README.md` (87 lines added)
|
|
|
|
**Verification:**
|
|
- CI passes (`./ci/run.sh`)
|
|
- Version logging verified
|
|
- Parity matrix updated
|
|
|
|
---
|
|
|
|
### ✅ P2.2: Combined Edge Case Tests (Complete)
|
|
|
|
**Implementation:**
|
|
- Added 3 combined resilience test scenarios to `DailyNotificationRecoveryTests.swift`:
|
|
1. `test_combined_dst_boundary_duplicate_delivery_cold_start()` — DST + duplicate + cold start
|
|
2. `test_combined_rollover_duplicate_delivery_cold_start()` — Rollover + duplicate + cold start
|
|
3. `test_combined_schema_version_cold_start_recovery()` — Schema version + cold start
|
|
|
|
**Test Features:**
|
|
- All tests labeled with `@resilience @combined-scenarios` comments
|
|
- Tests verify idempotency and correctness under combined stressors
|
|
- Tests are deterministic and runnable via `xcodebuild` on macOS
|
|
|
|
**Files Modified:**
|
|
- `ios/Tests/DailyNotificationRecoveryTests.swift` (329 lines added)
|
|
|
|
**Verification:**
|
|
- Tests runnable via xcodebuild (skipped on Linux CI, expected)
|
|
- Test results logged in `docs/progress/03-TEST-RUNS.md`
|
|
- Parity matrix updated with direct test references
|
|
|
|
---
|
|
|
|
### 📋 P2.3: Android Combined Tests Design (Design Complete)
|
|
|
|
**Design Documents Created:**
|
|
- `docs/progress/P2.3-DESIGN.md` — Complete design with scope, invariants, acceptance criteria
|
|
- `docs/progress/P2.3-IMPLEMENTATION-CHECKLIST.md` — Step-by-step implementation guide
|
|
|
|
**Design Highlights:**
|
|
- 3 work items: P2.3.1 (test infrastructure), P2.3.2 (test helpers), P2.3.3 (combined scenarios)
|
|
- CI-compatible approach (JUnit + Robolectric or pure unit tests)
|
|
- Mirrors iOS P2.2 intent (not necessarily identical mechanics)
|
|
- All 6 invariants documented with P2.3 constraints
|
|
|
|
**Status:**
|
|
- Design complete and ready for review
|
|
- Implementation checklist ready for execution
|
|
- Estimated effort: 12-20 hours
|
|
|
|
---
|
|
|
|
### 🔧 Parity Matrix Fixes
|
|
|
|
**Issue Fixed:**
|
|
- "Invalid data handling" row incorrectly showed iOS as "⚠️ Input validation only"
|
|
- Reality: iOS has recovery tests (`test_recovery_ignores_invalid_records_and_continues()`, `test_recovery_handles_null_fields()`)
|
|
|
|
**Fix Applied:**
|
|
- Updated to "✅ Recovery tested" for both platforms
|
|
- Added direct test references (file path + test names)
|
|
- Matches pattern established in P2.2 (direct proof references)
|
|
|
|
**Files Modified:**
|
|
- `docs/progress/04-PARITY-MATRIX.md`
|
|
|
|
---
|
|
|
|
### 📊 Documentation Updates
|
|
|
|
**Progress Documentation:**
|
|
- `docs/progress/00-STATUS.md` — Updated baseline tag, phase status, next actions
|
|
- `docs/progress/01-CHANGELOG-WORK.md` — Added P2.1 and P2.2 completion entries
|
|
- `docs/progress/03-TEST-RUNS.md` — Added P2.1 and P2.2 test run entries
|
|
- `docs/progress/04-PARITY-MATRIX.md` — Fixed invalid data handling, added combined tests row
|
|
- `docs/progress/P2-DESIGN.md` — Updated P2.3 scope, marked P2.1/P2.2 complete
|
|
- `docs/SYSTEM_INVARIANTS.md` — Updated baseline tag references
|
|
|
|
**New Documentation:**
|
|
- `docs/progress/P2.3-DESIGN.md` — P2.3 design document
|
|
- `docs/progress/P2.3-IMPLEMENTATION-CHECKLIST.md` — P2.3 implementation guide
|
|
|
|
---
|
|
|
|
### 🏷️ Baseline Tag
|
|
|
|
**Tag Created:**
|
|
- `v1.0.11-p2-complete`
|
|
- Message: "P2.x: iOS schema version observability + combined resilience tests"
|
|
- Tag pushed to remote
|
|
|
|
**Tag Represents:**
|
|
- P2.1: Schema versioning strategy (iOS explicit version tracking)
|
|
- P2.2: Combined edge case tests (3 resilience scenarios)
|
|
- All invariants preserved
|
|
- CI passing
|
|
- Ready for P2.3 implementation
|
|
|
|
---
|
|
|
|
## Statistics
|
|
|
|
**Code Changes:**
|
|
- iOS implementation: 376 lines added (schema versioning + tests)
|
|
- Documentation: ~500 lines added/updated across progress docs
|
|
|
|
**Files Changed:**
|
|
- Modified: 10 files
|
|
- Created: 4 new design/plan documents
|
|
- Total: 14 files touched
|
|
|
|
**Test Coverage:**
|
|
- 3 new combined edge case test scenarios
|
|
- All tests labeled and documented
|
|
- Direct references in parity matrix
|
|
|
|
---
|
|
|
|
## Invariants Preserved
|
|
|
|
✅ **All 6 invariants preserved:**
|
|
1. Packaging invariants (P0) — No forbidden files, exports correct
|
|
2. Core module purity (P1.4) — No platform imports in core
|
|
3. CI authority (P0) — `./ci/run.sh` remains authoritative
|
|
4. Export correctness (P0) — All exports match artifacts
|
|
5. Documentation structure (P1.5) — Index-first rule followed
|
|
6. Baseline tag integrity — Tag represents known-good state
|
|
|
|
---
|
|
|
|
## Next Steps
|
|
|
|
**Immediate:**
|
|
1. Review P2.3 design (`docs/progress/P2.3-DESIGN.md`)
|
|
2. Approve test framework choice (Robolectric vs pure unit tests)
|
|
3. Begin P2.3.1 — Enable Android test infrastructure
|
|
|
|
**Future:**
|
|
- P2.3: Android combined edge case tests (implementation)
|
|
- P2.4: iOS CI automation (macOS runners) — optional
|
|
- P1.5b: Remove iOS/App test harness from published tree — optional
|
|
|
|
---
|
|
|
|
## Quality Metrics
|
|
|
|
**CI Status:** ✅ All checks pass (`./ci/run.sh`)
|
|
**Type Safety:** ✅ TypeScript compilation passes
|
|
**Test Coverage:** ✅ 3 new combined scenarios added
|
|
**Documentation:** ✅ All progress docs updated
|
|
**Parity:** ✅ Matrix accurate with direct test references
|
|
|
|
---
|
|
|
|
**Baseline:** `v1.0.11-p2-complete`
|
|
**Status:** P2.1 and P2.2 complete, P2.3 design ready
|
|
**Ready for:** P2.3 implementation
|
|
|