fix(swift-example-app): fail closed on persistence recovery#4177
Conversation
|
🕓 Ready for review — 54 ahead in queue (commit 352fb4a) |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe change adds a persistence behavior report and updates Swift consumers. Reclaim classification recognizes typed local consumed-tombstone errors as reclaimed, while shielded clearing now preserves SwiftData rows when Rust reset cannot complete. ChangesPersistence consumer behavior
CI keychain setup
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/PERSISTENCE_CONSUMER_BEHAVIOR_CHANGES.md (1)
9-9: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueFix markdown heading level.
The heading level increments from
h1(# Persistence consumer behavior changes...) toh3(### Follow-up resolution), skippingh2. Change it toh2(##) to fix the markdownlint warning.📝 Proposed fix
-### Follow-up resolution +## Follow-up resolution🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/PERSISTENCE_CONSUMER_BEHAVIOR_CHANGES.md` at line 9, Change the “Follow-up resolution” heading from level 3 to level 2 so it follows the document’s h1 heading without skipping h2 and satisfies markdownlint.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@docs/PERSISTENCE_CONSUMER_BEHAVIOR_CHANGES.md`:
- Line 9: Change the “Follow-up resolution” heading from level 3 to level 2 so
it follows the document’s h1 heading without skipping h2 and satisfies
markdownlint.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d776de10-ab3f-4d14-a887-81af3486a0a5
📒 Files selected for processing (6)
docs/PERSISTENCE_CONSUMER_BEHAVIOR_CHANGES.mdpackages/swift-sdk/SwiftExampleApp/SwiftExampleApp/Core/Services/ShieldedService.swiftpackages/swift-sdk/SwiftExampleApp/SwiftExampleApp/Core/Views/CoreContentView.swiftpackages/swift-sdk/SwiftExampleApp/SwiftExampleApp/Views/DashPay/ReclaimInvitationSheet.swiftpackages/swift-sdk/SwiftExampleApp/SwiftExampleAppTests/ReclaimInvitationClassifierTests.swiftpackages/swift-sdk/SwiftExampleApp/SwiftExampleAppTests/ShieldedServiceClearTests.swift
Test would have caught this in CI: ✖ stale isBound assertion failed before the fix; ✔ all focused shielded-clear and reclaim-classifier tests pass after the fix.
Docs-only markdown hierarchy change; no behavior test is applicable.
|
Addressed the markdown heading-level review comment in 4a5d3e4. |
Test would have caught this in CI: ✖ set-keychain-settings on a locked temporary keychain failed; ✔ unlock-keychain before the same settings update succeeded.
|
@coderabbitai review |
✅ Action performedReview finished.
|
Documentation-only deletion; no behavior test required.
Issue being fixed or feature implemented
Follow-up to #3999. The persistence behavior review found two in-tree SwiftExampleApp consumer bugs: shielded Clear could wipe SwiftData after the Rust reset failed or could not run, and a retry backed by a retained local asset-lock tombstone was mislabeled as Claimed instead of Reclaimed.
What was done?
How Has This Been Tested?
Breaking Changes
None. This restores fail-closed consumer behavior and the intended local reclaim status semantics.
Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit