You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by ja...@apache.org on 2026/08/23 10:38:16 UTC
(maka) branch codex/main-audit-continuation-20260823 created (now 0233105be)
This is an automated email from the ASF dual-hosted git repository.
jackwener pushed a change to branch codex/main-audit-continuation-20260823
in repository https://gitbox.apache.org/repos/asf/maka.git
at 0233105be fix(win): invalidate stale rollback backup authority
This branch includes the following new commits:
new 0233105be fix(win): invalidate stale rollback backup authority
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
(maka) 01/01: fix(win): invalidate stale rollback backup authority
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jackwener pushed a commit to branch codex/main-audit-continuation-20260823
in repository https://gitbox.apache.org/repos/asf/maka.git
commit 0233105be5f4558b66427764636a06e958fc5f5a
Author: jackwener <ja...@gmail.com>
AuthorDate: Sun Aug 23 18:38:01 2026 +0800
fix(win): invalidate stale rollback backup authority
---
apps/desktop/build/installer.nsh | 9 +++++++--
scripts/product-release.test.mjs | 18 ++++++++++++++++++
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/apps/desktop/build/installer.nsh b/apps/desktop/build/installer.nsh
index 95dc6d4a0..7ddbc2de4 100644
--- a/apps/desktop/build/installer.nsh
+++ b/apps/desktop/build/installer.nsh
@@ -614,8 +614,13 @@ FunctionEnd
!macro customInstall
# Success tail: the upgrade completed, so the backup and any aside residue
- # are redundant. Best effort -- a held handle must not fail a completed
- # install.
+ # are redundant. Invalidate the completeness marker before the best-effort
+ # tree removal: if a scanner holds an application file, RMDir may leave the
+ # old backup behind, and a later upgrade must not mistake that residue for a
+ # live recovery source from the newly installed version.
+ ClearErrors
+ Delete "$makaBackupDir\${MAKA_BACKUP_MARKER}"
+ Delete "$makaBackupDir\${MAKA_RECOVERY_README}"
ClearErrors
${If} ${FileExists} "$makaBackupDir\*.*"
RMDir /r "$makaBackupDir"
diff --git a/scripts/product-release.test.mjs b/scripts/product-release.test.mjs
index 72dcb45f7..8924a6ba8 100644
--- a/scripts/product-release.test.mjs
+++ b/scripts/product-release.test.mjs
@@ -194,6 +194,24 @@ test('Desktop packaging does not distribute the retired bundled Git runtime', ()
);
});
+test('a successful Windows upgrade invalidates backup authority before best-effort cleanup', async () => {
+ const source = await readFile(
+ join(repoRoot, 'apps', 'desktop', 'build', 'installer.nsh'),
+ 'utf8',
+ );
+ const macroStart = source.indexOf('!macro customInstall');
+ const macroEnd = source.indexOf('!macroend', macroStart);
+ assert.ok(macroStart >= 0 && macroEnd > macroStart);
+ const cleanup = source.slice(macroStart, macroEnd);
+ const markerInvalidation = cleanup.indexOf('Delete "$makaBackupDir\\${MAKA_BACKUP_MARKER}"');
+ const backupRemoval = cleanup.indexOf('RMDir /r "$makaBackupDir"');
+ const snapshotRemoval = cleanup.indexOf('DeleteRegKey SHELL_CONTEXT "${MAKA_SNAPSHOT_REG_KEY}"');
+
+ assert.ok(markerInvalidation >= 0);
+ assert.ok(backupRemoval > markerInvalidation);
+ assert.ok(snapshotRemoval > markerInvalidation);
+});
+
test('platform package verifiers keep Git checks out of current artifacts', async () => {
const windowsSource = await readFile(join(repoRoot, 'scripts', 'verify-windows-x64.mjs'), 'utf8');
assert.match(
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org