Skip to content

feat: disable backup feature by default#511

Merged
JusterZhu merged 2 commits into
masterfrom
feat/disable-backup-default
Jun 11, 2026
Merged

feat: disable backup feature by default#511
JusterZhu merged 2 commits into
masterfrom
feat/disable-backup-default

Conversation

@JusterZhu

Copy link
Copy Markdown
Collaborator

Summary

Closes #510

Changed the default value of BackupEnabled from true to false. Backup is now opt-in rather than opt-out, reducing unnecessary I/O and storage consumption for users who don't require rollback capability.

Changes

File Change
src/c#/GeneralUpdate.Core/Configuration/Option.cs Option.BackupEnabled default: truefalse
src/c#/GeneralUpdate.Core/FileSystem/StorageManager.cs BackupConfig.Enabled default: truefalse
src/c#/GeneralUpdate.Core/Configuration/UpdateContext.cs XML doc comment updated

Migration

Users who need backup can enable it via:

Code:

configInfo.BackupEnabled = true;

Environment variable:

BACKUP=true

Rollback via backup remains fully functional when enabled.

🤖 Generated with Claude Code

Backup is now opt-in rather than opt-out. Users who need backup
before applying updates must explicitly set BackupEnabled = true
or set the BACKUP environment variable to true.

This reduces unnecessary I/O and storage consumption for users who
don't require rollback capability. Rollback via backup remains fully
functional when enabled.

Option.BackupEnabled default: true -> false
BackupConfig.Enabled default:     true -> false

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 11, 2026 13:00
@JusterZhu JusterZhu removed the request for review from Copilot June 11, 2026 13:00
Test assertions that expected BackupEnabled default to be true now
expect false. Also renamed Options_BackupEnabled_DefaultIsTrue to
Options_BackupEnabled_DefaultIsFalse for clarity.

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 11, 2026 13:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes the default behavior of the GeneralUpdate.Core update workflow to make filesystem backup opt-in instead of opt-out, reducing unnecessary disk I/O and storage usage for users who don’t need rollback.

Changes:

  • Set Option.BackupEnabled default from true to false (environment/option default).
  • Set StorageManager.BackupConfig.Enabled default from true to false (backup config default).
  • Update XML documentation in UpdateContext to reflect the new default.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

File Description
src/c#/GeneralUpdate.Core/Configuration/Option.cs Changes the default option value for BACKUP to false, making backup opt-in via options/env.
src/c#/GeneralUpdate.Core/FileSystem/StorageManager.cs Updates BackupConfig.Enabled default and doc comment to align with opt-in backup.
src/c#/GeneralUpdate.Core/Configuration/UpdateContext.cs Updates XML docs to reflect the new default for BackupEnabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JusterZhu JusterZhu merged commit 4bc591a into master Jun 11, 2026
5 of 7 checks passed
@JusterZhu JusterZhu deleted the feat/disable-backup-default branch June 11, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: disable backup feature by default

2 participants