Showing 1 changed files with 19 additions and 5 deletions
+19 -5
HealthProbe/Doc/04-project/Import-Optimization-Log.md
@@ -773,6 +773,19 @@ The likely bottleneck is per-row SQLite work:
773 773
   evidence for the large-device partial run or for commit `0d61338`. A matching
774 774
   Diagnostics text copy is still needed before drawing performance conclusions
775 775
   from the large-device partial run.
776
+- The matching Diagnostics report for that retry was captured later. Build
777
+  fingerprint was `1.0(1)-1780695759-92064`, operation result was
778
+  `partial_success`, `previousSnapshotID` was `none`, `isChainStart` was `true`,
779
+  but capture modes were `unchangedDelta=121`, `delta=4`, `initialImport=0`,
780
+  `unavailable=2`. This confirms the run was a retry using previously persisted
781
+  per-type capture state, not a clean first import rewrite of `8.4M` rows. The
782
+  performance result is still important for large-database retry/incremental
783
+  behavior: wall clock `11.2s`, fetch `6.0s`, processing `0.0s`, insert `1.0s`,
784
+  finalize `1.9s`, residual `1.5s`, with `793` delta events. The two failed
785
+  Blood Pressure metrics failed before record import because earliest/latest
786
+  queries returned HealthKit `com.apple.healthkit` error code `5`:
787
+  `Authorization not determined`. Treat this as a permission/device-state issue,
788
+  not an import engine regression.
776 789
 
777 790
 ## Open Issues / Observations
778 791
 
@@ -845,11 +858,12 @@ Prioritize experiments in this order:
845 858
    post-import responsiveness. Expected success: record archive finalize is
846 859
    zero/negligible, details still load from SQLite, and first-import memory /
847 860
    post-save behavior does not regress.
848
-11. Capture the matching Diagnostics text for the large-database retry after
849
-   first import that showed `8,411,713` records in `11.2s`. Confirm the build
850
-   identity, `CaptureModes`, and failed Blood Pressure API call status/details.
851
-   Interpret Blood Pressure failures in the context of this device's known
852
-   frozen / partially syncing Health database state.
861
+11. On the large-database device, resolve or deliberately document the two
862
+   Blood Pressure permissions. The matching report shows HealthKit
863
+   `Authorization not determined` for systolic/diastolic earliest/latest
864
+   queries, so the next app-side check is whether `Request Health Access`
865
+   re-prompts for those types or whether iOS Health settings expose them for
866
+   HealthProbe.
853 867
 12. Investigate full-profile empty anchored-query cost for zero-count types.
854 868
    Compare slow empty types across reports before changing behavior; any skip or
855 869
    lower-frequency strategy must preserve the promise that full authorized