Admin-first: always run orchestrated capture when adding policies to a backup set so backups reflect current Intune state. Still avoids redundant PolicyVersion growth via orchestrator snapshot-hash reuse. Adds feature tests and updates spec/plan/tasks.
19 lines
783 B
Markdown
19 lines
783 B
Markdown
# Plan: Backup Version Reuse (016)
|
|
|
|
**Branch**: `016-backup-version-reuse`
|
|
**Date**: 2026-01-02
|
|
**Input**: [spec.md](./spec.md)
|
|
|
|
## Goal
|
|
Reduce unnecessary `PolicyVersion` creation when policies are added to backup sets by reusing an existing suitable latest version where safe.
|
|
|
|
## Approach
|
|
1. Always capture from Intune when a policy is added to a backup set (admin expectation: "backup = current state").
|
|
2. Rely on `PolicyCaptureOrchestrator` snapshot-hash reuse to avoid redundant `PolicyVersion` creation when nothing changed.
|
|
3. Still respect capture options (assignments / scope tags) via orchestrator backfill behavior.
|
|
4. Add tests for both reuse and capture paths.
|
|
|
|
## Out of scope
|
|
- UI toggles/config flags unless required.
|
|
- Cross-policy dedup or historical compaction.
|