Repository navigation
iOS ApplicationData migration - #23705
Conversation
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23705/wasm-skia-net9/index.html |
d9b4282 to
8ac1acd
Compare
|
Claude finished @MartinZikmund's task in 3m 16s —— View job Review Complete
SummaryVerdict: fix-first — the migration sentinel key leaks into the public Issues by severity
High — migration sentinel leaks into public API (3 related inline comments) Medium — non-atomic Medium — Cross-cutting observations
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23705/wasm-skia-net9/index.html |
|
Claude finished @MartinZikmund's task in 5m 42s —— View job Review Complete
SummaryVerdict: ship — the three issues flagged in the previous round are all fixed in the latest commit ( Issues from previous review — status
New finding (1 note)The Cross-cutting observations
|
Review threads addressed — commit
|
| file:line | reviewer point | what changed |
|---|---|---|
ApplicationDataContainer.Apple.cs:95 |
__uno_migrated sentinel leaks into Keys |
Added IsInternalKey(...) and filtered it out of Keys, Values, GetEnumerator, ContainsKey, TryGetValue and the indexer getter. Values now projects from the key/value pairs (not .Values) so it stays index-aligned with Keys. Remove inherits the guard via ContainsKey, so the sentinel can no longer be deleted through the public surface. |
ApplicationDataContainer.Apple.cs:105 |
Count over-reports by 1 |
Count now counts only non-internal keys. Used the IsInternalKey filter rather than the suggested BoolForKey-subtraction, which would silently go wrong if the sentinel were ever absent. |
ApplicationDataContainer.Apple.cs:133 |
Clear() deletes the sentinel → migration re-runs on next cold start; also Synchronize() per key |
Clear() now skips internal keys and calls _userDefaults.RemoveObject directly, with a single Synchronize() after the loop instead of one per entry. |
ApplicationDataContainer.Apple.cs:22 |
_migrated is not volatile; check-then-set is not atomic |
Fixed, but not with the suggested Interlocked.CompareExchange: that lets the losing thread return while the migration is still running, so it can read a half-migrated container. Used textbook double-checked locking instead (volatile bool + lock), so a concurrent caller waits for the migration to finish. Migration body extracted into Migrate(). |
No change needed (1)
| file:line | reviewer point | why |
|---|---|---|
ApplicationDataContainer.Apple.cs:150 |
"the old code passed k.Key to Deserialize instead of k.Value — this fix is correct" |
Agreed — this thread is the bot confirming a fix already in the PR, not requesting one. No action. (The enumerator does now additionally filter the sentinel.) |
Residual note (not blocking)
Writing to the reserved key directly (localSettings.Values["__uno_migrated"] = x) would still overwrite the sentinel and cause one redundant migration pass on the next cold start. That pass is harmless — the standard defaults have already been drained — so I left writes unguarded rather than silently swallowing a caller's write.
Validation level: code inspection only. I did not build, run, or test anything locally; the CS1503 diagnosis comes from reading the failed CI build log, and the fixes are reasoned from the source. Azure Pipelines will verify on this push — the previously failing Managed Binaries Build / iOS Skia Build Samples App legs are the ones to watch.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23705/wasm-skia-net9/index.html |
7fc6e4e to
685506f
Compare
|
Claude finished @MartinZikmund's task in 5m 18s —— View job Review Complete
SummaryVerdict: ship — all three issues from round 1 and the one note from round 2 are resolved. Two new notes posted inline; neither is blocking. Issues from previous reviews — status
New findings (2 notes, non-blocking)
Cross-cutting observations
|
Settings lived in the shared standard user defaults, alongside keys owned by the OS, Apple frameworks and native libraries, so enumerating or clearing them saw — and deleted — unrelated native keys. They now live in an UnoApplicationData suite, with a one-time migration of the values Uno Platform recognizes as its own. Also restores dictionary semantics in TryGetValue: ValueForKey is KVC, so keys shadowed by NSUserDefaults members (description, count, ...) reported a hit that was never stored. Ports the implementation and documentation of #23705 onto the NativeApplicationSettings abstraction, which replaces the file it changed. Re-enables When_Nested_Container_Not_Included_In_Values on UIKit, which the leak had forced off.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23705/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-23705/docs/index.html |
|
|
685506f to
11a9728
Compare
|
Claude finished @MartinZikmund's task in 3m 9s —— View job Review Complete
SummaryVerdict: ship — no new issues found in this push. The implementation from round 2 is intact and correct. Two notes from round 3 remain unaddressed (re-posted as inline comments on the new commit). Status of prior findings
Open findings (2 notes, non-blocking)Both are re-posted as inline comments on the latest commit:
Cross-cutting observations
|
Settings lived in the shared standard user defaults, alongside keys owned by the OS, Apple frameworks and native libraries, so enumerating or clearing them saw — and deleted — unrelated native keys. They now live in an UnoApplicationData suite, with a one-time migration of the values Uno Platform recognizes as its own. Also restores dictionary semantics in TryGetValue: ValueForKey is KVC, so keys shadowed by NSUserDefaults members (description, count, ...) reported a hit that was never stored. Ports the implementation and documentation of #23705 onto the NativeApplicationSettings abstraction, which replaces the file it changed. Re-enables When_Nested_Container_Not_Included_In_Values on UIKit, which the leak had forced off.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01EtHtkSGMJJnsspQkRm1F9L
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01EtHtkSGMJJnsspQkRm1F9L
20c079c to
6f8d3fe
Compare
|
Claude finished @MartinZikmund's task in 4m 47s —— View job Review Complete
SummaryVerdict: ship — this branch has not changed since the round-8 review (Sept 24, verdict "ship"); same 16 commits, same SHAs. I re-derived the review independently rather than trusting that verdict, and reached the same conclusion: the opt-in migration design is sound and I found no correctness, concurrency, or data-loss issues. Independent verification highlights
New findings (2 notes, non-blocking, posted inline)Both are unused-
Neither is build-breaking ( (Correction note: my first inline comment on Cross-cutting observations
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23705/wasm-skia-net9/index.html |
|
The build 235805 found UI Test snapshots differences: Details
|
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-23705/docs/index.html |
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MgPTLZS8ECZUXp1peyaz1P
|
Claude finished @MartinZikmund's task in 2m 52s —— View job Review Complete
SummaryVerdict: ship. This trigger followed the latest commit ( What I verified fresh
Cross-cutting observations (non-blocking, already accepted in prior rounds)
Branch: |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-23705/docs/index.html |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23705/wasm-skia-net9/index.html |
|
The build 236003 found UI Test snapshots differences: Details
|
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MgPTLZS8ECZUXp1peyaz1P
|
Claude finished @MartinZikmund's task in 2m 49s —— View job Review Complete
SummaryVerdict: ship. The only commit since the last review round ( What I verified fresh this round
Cross-cutting observations (non-blocking, unchanged from prior rounds)
Branch: |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23705/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-23705/docs/index.html |
|
The build 236016 found UI Test snapshots differences: Details
|
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
GitHub Issue: closes #1285
PR Type:
What changed? 🚀
PR Checklist ✅
Screenshots Compare Test Runresults.