Showing 2 changed files with 105 additions and 0 deletions
+100 -0
HealthProbe/Doc/04-project/Development-Log.md
@@ -0,0 +1,100 @@
1
+# HealthProbe Development Log
2
+
3
+**Canonical path:** `HealthProbe/Doc/04-project/Development-Log.md`  
4
+**Created:** 2026-06-06  
5
+**Purpose:** Preserve project context that affects decisions across agent sessions.
6
+
7
+This is the project memory log. Use it for facts that explain why HealthProbe is
8
+being built, why a device or dataset matters, and what historical context should
9
+not be rediscovered repeatedly from chat history.
10
+
11
+Use specialized documents for detailed technical evidence:
12
+- import timings and performance experiments: `Import-Optimization-Log.md`;
13
+- refactoring milestones: `Refactoring-Plan.md`;
14
+- current implementation status: `IMPLEMENTATION_STATUS.md`;
15
+- product scope and non-goals: `../01-product/Product-Specification.md`.
16
+
17
+## Maintenance Rules
18
+
19
+1. Add dated entries when context changes or when an old assumption is recovered.
20
+2. Keep entries factual and decision-relevant.
21
+3. Link or summarize supporting reports instead of pasting large diagnostics.
22
+4. If a fact belongs in product scope, update product docs too.
23
+5. If a fact belongs in performance analysis, update `Import-Optimization-Log.md`
24
+   too.
25
+
26
+## Device And Dataset Context
27
+
28
+### 2026-06-06 - Restored Pre-Loss Reference Device
29
+
30
+The large-database test device is a restored copy of the user's Health database
31
+from before the data-loss event noticed later on the iPhone 16. It is not the
32
+untouched original device state.
33
+
34
+Important properties:
35
+- the source backup still exists and can be restored again if needed;
36
+- the restored device has already been used for attempts to restart or force
37
+  natural iCloud Health synchronization;
38
+- results from this device should be labelled as coming from a restored
39
+  pre-loss-reference copy;
40
+- the device can be used for aggressive experiments when necessary, because it
41
+  is not the only copy of that state;
42
+- it remains a crucial reference dataset for future two-database comparison work.
43
+
44
+Why this matters:
45
+- HealthProbe exists partly because this kind of Health database state can become
46
+  inconsistent across devices and over time;
47
+- the app must distinguish Health UI visibility, HealthKit availability,
48
+  synchronization state, and HealthProbe archive state;
49
+- future multi-archive comparison should compare this restored pre-loss reference
50
+  against the current iPhone 16 archive without assuming record-by-record
51
+  cross-device identity.
52
+
53
+### 2026-06-06 - Blood Pressure Access Changed On Restored Device
54
+
55
+A complete first import from 2026-06-04 on the restored reference device included
56
+Blood Pressure Systolic and Diastolic:
57
+- both were `authorizationStatus: granted`;
58
+- both imported `5,120` samples;
59
+- both ranged from `2014-12-18T11:24:11Z` to `2026-05-29T03:06:36Z`.
60
+
61
+A later retry on 2026-06-06 from the same device reported both Blood Pressure
62
+types as unavailable because HealthKit returned `Authorization not determined`
63
+for earliest/latest queries.
64
+
65
+Interpretation:
66
+- this is evidence of a device / iOS HealthKit authorization or Health database
67
+  state change;
68
+- it is not evidence that HealthProbe cannot import Blood Pressure;
69
+- future runs should preserve these reports as before/after context.
70
+
71
+## Product Direction Context
72
+
73
+### 2026-05 to 2026-06 - Why Full Authorized Backup Matters
74
+
75
+The original 15-type capture profile is only a v1/test subset. It is not enough
76
+to validate the database or import architecture because the real target is full
77
+authorized backup of the local HealthKit-accessible database.
78
+
79
+Reason:
80
+- assumptions that hold on a small Health subset may fail on full profile volume;
81
+- Apple Health may aggregate, prune, stop syncing, or expose different data
82
+  through UI versus HealthKit;
83
+- recovery-compatible exports need complete-enough source data, not just summary
84
+  counts.
85
+
86
+Implementation consequence:
87
+- SQLite remains the source of truth;
88
+- SwiftData must not be expanded;
89
+- import, storage, and export decisions should be validated against full-profile
90
+  datasets where possible.
91
+
92
+## Open Context Questions
93
+
94
+- How should HealthProbe label a metric that is visible in Apple Health UI but
95
+  returns `Authorization not determined` or another HealthKit access failure?
96
+- When two local archives exist for different devices or restored states, what
97
+  comparison mode is useful without reviving the old record-by-record
98
+  cross-device objective?
99
+- Which diagnostic fields should be retained inside the archive so old reports
100
+  can be reconstructed without depending on copied text?
+5 -0
HealthProbe/Doc/README.md
@@ -37,6 +37,7 @@ Use the chapter map below. Send agents to the narrowest document that matches th
37 37
 | General agent ownership and handoff rules | [`00-agent-guides/AGENTS.md`](00-agent-guides/AGENTS.md) |
38 38
 | SwiftUI/UI work | [`00-agent-guides/CLAUDE.md`](00-agent-guides/CLAUDE.md) |
39 39
 | Refactoring milestones and sequencing | [`04-project/Refactoring-Plan.md`](04-project/Refactoring-Plan.md) |
40
+| Project memory, recovered context, reference devices/datasets | [`04-project/Development-Log.md`](04-project/Development-Log.md) |
40 41
 | Import performance iterations and real-device timing comparisons | [`04-project/Import-Optimization-Log.md`](04-project/Import-Optimization-Log.md) |
41 42
 | Project status and refactoring priorities | [`04-project/IMPLEMENTATION_STATUS.md`](04-project/IMPLEMENTATION_STATUS.md) |
42 43
 | SwiftData retirement inventory | [`04-project/SwiftData-Retirement-Inventory.md`](04-project/SwiftData-Retirement-Inventory.md) |
@@ -87,6 +88,10 @@ Use the chapter map below. Send agents to the narrowest document that matches th
87 88
 - [`04-project/Refactoring-Plan.md`](04-project/Refactoring-Plan.md)
88 89
   Checkable milestone plan for the database-led refactor from prototype architecture to SQLite archive v2 + Core Data cache.
89 90
 
91
+- [`04-project/Development-Log.md`](04-project/Development-Log.md)
92
+  Project memory log for recovered context, reference devices/datasets, and
93
+  decision-relevant history that should survive agent handoffs.
94
+
90 95
 - [`04-project/Import-Optimization-Log.md`](04-project/Import-Optimization-Log.md)
91 96
   Living log for first-import optimization work, measured real-device reports, bottleneck diagnosis, and next experiments.
92 97