Keep On-Device Transcripts Out of Phone Backup on Your First Mobile AI PR A developer has proposed a first-hour workflow for engineers joining mobile AI repositories that treats backup exclusion as a merge gate for on-device voice transcript stores. The checklist recommends keeping SQLite transcript files in Application Support rather than Documents, setting the isExcludedFromBackup resource flag after the first write, and verifying that a restore cannot resurrect user speech after a rollback. The guidance also notes that Android Auto Backup and device-to-device migration read the app manifest rather than code comments. You sit down with a fresh clone and a first ticket that sounds harmless on Slack. The ticket asks you to persist the last voice session so offline replay still works after the process dies. Nobody mentions backup, restore, or what happens when a reviewer asks you to roll the PR back. The trap is not the schema; it is whether that file rides into iCloud or Google backup after you merge. This is a proposed first-hour workflow for a junior engineer joining a mobile AI repo, not a scored lab report. You will treat backup exclusion as a merge gate, then rehearse restore after rollback. Record the device, OS, framework, permission state, and network condition before you claim anything recovered, restarted, or silently disappeared. On-device voice and offline replay almost always grow a local store during the first PR. That store holds utterances, partial captions, and sometimes speaker labels that never belonged in a cloud sync channel. Phone backup is an OS mechanism, not your product sync, and it can copy those files while the app is backgrounded or even uninstalled later. If your first cache lands in Documents, shared storage, or a default database path, a restore can resurrect user speech after you thought the rollback was clean. You should assume AI-drafted persistence will pick the convenient directory unless you constrain it. Convenient directories are the ones backup systems already know how to upload. Your job in hour one is not to debate schema elegance. Your job is to prove the transcript file is excluded, then prove a restore cannot bring it back after revert. Fill this block in the PR description before you paste commands. Do not invent numbers; leave blanks until a device actually answers you. If you cannot name the OS backup transport, you are not ready to merge the cache. Write that limitation in the PR instead of calling the feature offline-ready. Label this as an unexecuted checklist until you run it on one physical device. Do not copy a lifecycle matrix from another PR and call it coverage. You are looking for three outcomes only: recovered, restarted empty, or silently disappeared. Anything else belongs in limitations, not in a pass comment. Keep the SQLite file in Application Support, not in Documents, then set the exclusion flag on the file URL. Documents is user data from the system's point of view, which makes it a backup candidate even when you consider it a cache. Caches can be purged under storage pressure, so it is the wrong place for replay that must survive a cold start. Application Support plus an explicit exclusion is the usual honest compromise. php import Foundation enum TranscriptStore { static func url throws - URL { let root = try FileManager.default.url for: .applicationSupportDirectory, in: .userDomainMask, appropriateFor: nil, create: true let dir = root.appendingPathComponent "voice-replay", isDirectory: true try FileManager.default.createDirectory at: dir, withIntermediateDirectories: true return dir.appendingPathComponent "transcripts.sqlite" } static func excludeFromBackup throws { var url = try url var values = URLResourceValues values.isExcludedFromBackup = true try url.setResourceValues values } } Call excludeFromBackup after the first successful write, then read the flag back. A write that never sets the resource value will look fine in the simulator until someone restores a laptop backup. Proposed check: if isExcludedFromBackup is not true , fail the debug launch, not just a log line. js func assertExcludedFromBackup url: URL throws { let values = try url.resourceValues forKeys: .isExcludedFromBackupKey precondition values.isExcludedFromBackup == true, "transcript store is backup-eligible" } Android Auto Backup and device-to-device migration read your manifest, not your code comments. A default android:allowBackup="true" with no exclusion rules will pack app databases when Google backup runs. Android 12 and later also honor dataExtractionRules for cloud backup versus device transfer, so you should ship both the older and newer XML. Put transcripts in internal storage, never in shared storage, and name the file so a reviewer can grep it. php < -- AndroidManifest.xml --