Files
daily-notification-plugin/docs/progress/01-CHANGELOG-WORK.md
Matthew Raymer eb1fc9f220 feat(docs): complete P2.6 type safety cleanup and P2.7 system invariants
P2.6: Type Safety Cleanup
- Replaced 'any' return types in vite-plugin.ts with concrete types (UserConfig, transform return type)
- Documented TypeScript mixin 'any[]' exception in PlatformServiceMixin.ts
- Audit confirmed: zero 'any' in codebase except documented TS mixin limitation
- All external boundaries use 'unknown', all data payloads use 'Record<string, unknown>'

P2.7: System Invariants Documentation
- Created SYSTEM_INVARIANTS.md documenting all 6 enforced invariants
- Added to docs/00-INDEX.md under Policy & Contracts section
- Each invariant includes: What, Why, How, Where

Progress Docs Updates:
- Updated 00-STATUS.md: marked P2.6/P2.7 complete, added type safety invariant note
- Updated 01-CHANGELOG-WORK.md: added 2025-12-22 entries for P2.6/P2.7
- Updated 03-TEST-RUNS.md: added P2.6 type safety audit test run
- Updated P2-DESIGN.md: marked P2.6 acceptance criteria complete
- Updated SYSTEM_INVARIANTS.md: added Type Safety Notes section

Baseline Tag:
- Created v1.0.11-p0-p1.4-p1.5-p2.6-p2.7-complete

TypeScript compilation:  PASSES
Build:  PASSES
CI:  All checks pass
2025-12-22 10:56:00 +00:00

7.6 KiB

Development Changelog

Purpose: Development changelog tracking work-in-progress changes, refactors, and improvements (not the release CHANGELOG.md).
Owner: Development Team
Last Updated: 2025-12-22
Status: active

For release notes, see CHANGELOG.md.


2025-12-22

Changed

  • 2025-12-22 — P2.6 COMPLETE: Type safety cleanup — eliminated all any usages except documented TypeScript mixin limitation
    • Batch 1: Replaced any return types in src/vite-plugin.ts with concrete types (UserConfig, { code: string; map: null })
    • Audit Result: Codebase already follows type safety best practices; all external boundaries use unknown, all data payloads use Record<string, unknown>
    • Remaining Exception: src/utils/PlatformServiceMixin.ts:258any[] required for TypeScript mixin pattern (documented with inline comment)
    • Verification: rg '\bany\b' src/ returns zero matches except documented exception; TypeScript compilation passes
  • 2025-12-22 — P2.7 COMPLETE: Created docs/SYSTEM_INVARIANTS.md — single authoritative document naming and explaining all enforced invariants
  • P1.5 COMPLETE: Documentation consolidation phase finished
    • Step 1: Updated docs/00-INDEX.md to elevate contracts and progress docs as authoritative
    • Step 2: Added drift guards (Purpose, Owner, Last Updated, Status) to all progress docs
    • Step 3: Archived consolidation artifacts to docs/_archive/2025-12-16-consolidation/
    • Step 4: Archived legacy iOS checklist; added cross-references to testing, integration, and deployment docs
    • Step 5: Documented CI contracts as policy-as-code in ci/README.md; standardized archive directory to docs/_archive/
  • Fixed exports["./web"] paths in package.json (now points to actual built files: dist/esm/web.{js,d.ts})
  • Tightened package.json "files" field to exclude ios/App/ and Xcode user state files
  • Enhanced verify.sh forbidden files check to include ios/App/ pattern and additional editor/macOS junk files
  • Moved GitHub Actions workflow to docs/_reference/ (reference only, not used)
  • Established local CI as single source of truth (./ci/run.sh)
  • P1.4: Created shared core types module (src/core/)
    • Migrated observability.ts to use core/events (EVENT_CODES, EventLog)
    • Migrated definitions.ts to re-export core contracts/enums instead of duplicating
    • Migrated web.ts to use canonical types from core
  • P1.4: Enhanced verify.sh with core module purity enforcement
    • Platform import blocking: comprehensive regex detects Node builtins + Capacitor/React
    • Export validation: Node-based check for package.json.exports['./core']
    • Split checks: source validation (pre-build) + artifact validation (post-build)

Added

  • ci/run.sh - Local CI entrypoint (wraps ./scripts/verify.sh)
  • ci/README.md - Local CI documentation
  • githooks/pre-push - Git hook to run CI before push
  • Makefile - Convenience targets (make ci runs local CI)
  • P1.4: src/core/errors.ts - ErrorCode enum, DailyNotificationError class
  • P1.4: src/core/enums.ts - PermissionState, ScheduleKind, HistoryKind, etc.
  • P1.4: src/core/contracts.ts - Schedule, ContentCache, Config, Callback, History interfaces
  • P1.4: src/core/events.ts - EventLog with schemaVersion, EVENT_CODES constants
  • P1.4: src/core/guards.ts - Runtime validators
  • P1.4: src/core/index.ts - Curated public exports
  • P1.4: package.json.exports["./core"] - Core module export path

Fixed

  • P0.5: Packaging now excludes xcuserdata/, *.xcuserstate, DerivedData/, and ios/App/ from npm package
  • P0.6: Fixed broken exports["./web"] paths that would have caused import failures
  • P1.4: Eliminated duplicate type definitions (EVENT_CODES, EventLog, Schedule, Config, etc.)

Notes

  • Package is now publish-safe with correct exports and no forbidden files
  • verify.sh now hard-fails if forbidden files are detected in npm pack --dry-run
  • P0 Phase Complete: All publish safety and CI hardening work finished
    • Packaging correctness (whitelist-based, forbidden files check)
    • Export correctness (exports["./web"] paths fixed)
    • CI correctness (local CI as single source of truth)
    • CI debuggability (failure output preserved)
    • Documentation alignment (all progress docs match reality)
  • P1.4 Phase Complete: Shared core types module implemented
    • Core module is single source of truth for shared types
    • Consumers migrated (observability, definitions, web)
    • Core purity enforced via verify.sh (platform import blocking, export validation)
    • No behavior changes - only type consolidation

2025-12-16

Changed

  • Documentation structure consolidated (139 files organized)
  • Created progress tracking system (docs/progress/)
  • Removed native Java code from src/android/ (21 files removed)
  • Fixed podspec reference in package.json (DailyNotificationPlugin.podspecCapacitorDailyNotification.podspec)
  • Fixed markdown lint script paths (doc/*.mddocs/**/*.md)
  • Updated parity matrix to reflect actual iOS persistence (CoreData + SQLite)
  • Updated .npmignore to be more defensive (added iOS-specific exclusions, *.tgz, etc.)
  • Updated verify.sh to run iOS tests when xcodebuild is available

Added

  • docs/progress/ directory with tracking documents
  • docs/00-INDEX.md - Documentation index
  • docs/CONSOLIDATION_SOURCE_MAP.md - File mapping audit trail
  • docs/CONSOLIDATION_COMPLETE.md - Consolidation summary
  • scripts/verify.sh - Single verification entrypoint (with build + pack checks + iOS tests)
  • ci/run.sh - Local CI entrypoint (wraps verify.sh)
  • ci/README.md - Local CI documentation
  • src/web.ts - Web platform implementation (throws "not supported" errors)
  • .npmignore - Belt-and-suspenders safety net for npm packaging
  • ios/Tests/TestDBFactory.swift - Test helper for creating test databases and injecting invalid data
  • ios/Tests/DailyNotificationRecoveryTests.swift - iOS recovery tests (equivalent to Android TEST 4)
    • Invalid records handling
    • Duplicate delivery deduplication
    • Rollover idempotency
    • Cold start recovery
    • Migration safety

Removed

  • src/android/*.java - 21 Java files (duplicates of code in android/src/main/java/)
    • These were old copies not used in the build process
    • Actual native code remains in android/src/main/java/

Notes

  • PHASE 1 (Repo Hygiene) Complete
  • PHASE 3 (Verification Entrypoint) Complete
  • P0 Build/Publish Safety Complete
    • Build now succeeds (npm run build works)
    • Package includes correct podspec (npm pack --dry-run verified)
    • Verify script includes build and pack checks
    • Added .npmignore as belt-and-suspenders safety net
  • Parity Matrix Correction Complete
    • iOS rollover is actually implemented (NotificationCenter pattern)
    • iOS persistence confirmed (CoreData + SQLite)
  • iOS Recovery Testing Complete
    • Added automated recovery tests equivalent to Android TEST 4
    • Tests cover invalid data, duplicate delivery, rollover idempotency, cold start, migration safety
    • Tests require macOS with Xcode to run (skipped on Linux CI)
  • TypeScript config files (timesafari-android-config.ts, timesafari-ios-config.ts) kept as they are legitimate TS files
  • verify.sh script includes checks for native code in src/ directories, build, pack validation, and iOS tests

Template for Future Entries

YYYY-MM-DD

Changed:

Added:

Removed:

Notes:


Last Updated: 2025-12-22