Skip to content

Commit d57e373

Browse files
committed
docs(spec): align headless mode references on REPLACE
Round-5 plan reviewer flagged inconsistency: spec said MERGE in §Architecture but REPLACE in §Pre-existing latent bugs. The plan correctly resolved on REPLACE (matches BackupRestoreManager.kt:597 merge=false legacy semantics for Termux automation). Spec now self-agrees. — opus 4.7
1 parent ec96db0 commit d57e373

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/superpowers/specs/2026-04-28-backup-import-preview-design.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class BackupRestoreManager(context: Context) {
9393
}
9494
```
9595

96-
`importConfig` and `importDictionaries` keep their exact public signature — internally they delegate to `buildPlan` then `applyPlan(plan, emptySet(), MERGE, prefs)`. The headless Intent path at `BackupRestoreActivity.kt:99-115` keeps working with **no UI change**.
96+
`importConfig` and `importDictionaries` keep their exact public signature — internally they delegate to `buildPlan` then `applyPlan(plan, emptySet(), REPLACE, prefs)`. REPLACE preserves the legacy `merge=false` short-swipe semantics that headless Termux automation callers documented (BackupRestoreManager.kt:597); flipping the default to MERGE is intentionally out of scope for this change. The SAF preview UI defaults the radio to MERGE — see §UI flow > Settings preview dialog. The headless Intent path at `BackupRestoreActivity.kt:99-115` keeps working with **no UI change**.
9797

9898
### Pure-vs-IO testability split
9999

@@ -357,7 +357,7 @@ If `buildPlan` returns a plan with `changes.isEmpty() && parseSkippedKeys.isEmpt
357357
- export result dialog shows count
358358

359359
`BackupRestoreManagerHeadlessTest` (MockK — better seam than Compose UI for this assertion):
360-
- Headless Intent path: invoking `importConfig(uri, prefs)` directly produces the same `ImportResult` shape as `applySettingsImportPlan(plan, emptySet(), MERGE, prefs)` — i.e., legacy public API delegates to build+apply with no exclusions and no UI hooks. Regression guard for Termux automation.
360+
- Headless Intent path: invoking `importConfig(uri, prefs)` directly produces the same `ImportResult` shape as `applySettingsImportPlan(plan, emptySet(), REPLACE, prefs)` — i.e., legacy public API delegates to build+apply with no exclusions and no UI hooks, preserving the legacy `merge=false` destructive short-swipe semantics. Regression guard for Termux automation.
361361

362362
## Files
363363

0 commit comments

Comments
 (0)