fix repo update cache cleanup

This commit is contained in:
Franz Rolfsvaag 2026-06-17 16:49:23 +02:00
parent 454480f9a7
commit 4c1c23bd27
5 changed files with 19 additions and 6 deletions

View File

@ -125,6 +125,7 @@ This file tracks larger Lumi work that cannot safely be completed in one pass. K
## Done ## Done
- 2026-06-17: Fixed repo-based core updates deleting `data/update-cache/repo` during apply, added a verification guard, and bumped core package version to v0.1.4.
- 2026-06-17: Bumped core package version to v0.1.3. - 2026-06-17: Bumped core package version to v0.1.3.
- 2026-06-17: Completed homepage hero embed pass for Discord widgets, YouTube video playback options, external embed fallback/sandbox controls, admin validation, platform-specific fields, and Test preview behavior. - 2026-06-17: Completed homepage hero embed pass for Discord widgets, YouTube video playback options, external embed fallback/sandbox controls, admin validation, platform-specific fields, and Test preview behavior.
- 2026-06-17: Fixed core update snapshots for large ZIP-origin installs by replacing the full-install ZIP backup with a filesystem snapshot directory, avoiding the 2 GiB ZIP limit for large preserved files such as local AI models. - 2026-06-17: Fixed core update snapshots for large ZIP-origin installs by replacing the full-install ZIP backup with a filesystem snapshot directory, avoiding the 2 GiB ZIP limit for large preserved files such as local AI models.

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "lumi-bot", "name": "lumi-bot",
"version": "0.1.3", "version": "0.1.4",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "lumi-bot", "name": "lumi-bot",
"version": "0.1.3", "version": "0.1.4",
"dependencies": { "dependencies": {
"adm-zip": "^0.5.12", "adm-zip": "^0.5.12",
"better-sqlite3": "^11.5.0", "better-sqlite3": "^11.5.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "lumi-bot", "name": "lumi-bot",
"version": "0.1.3", "version": "0.1.4",
"private": true, "private": true,
"type": "commonjs", "type": "commonjs",
"scripts": { "scripts": {

View File

@ -176,6 +176,19 @@ function verifyThemeService() {
} }
} }
function verifyUpdateCachePreserved() {
const updateManagerPath = path.join(root, "src", "services", "update-manager.js");
const source = fs.readFileSync(updateManagerPath, "utf8");
const generatedPaths = source.match(/const GENERATED_RELATIVE_PATHS = new Set\(\[([\s\S]*?)\]\);/);
assert(generatedPaths, "Could not find generated path cleanup list.");
assert(
!generatedPaths[1].includes('"data/update-cache"') &&
!generatedPaths[1].includes("'data/update-cache'"),
"Core update cleanup must not delete data/update-cache because repo updates apply from data/update-cache/repo."
);
}
const viewCount = verifyViews(); const viewCount = verifyViews();
verifyThemeService(); verifyThemeService();
console.log(`WebUI verification passed: ${viewCount} EJS views and theme CRUD.`); verifyUpdateCachePreserved();
console.log(`WebUI verification passed: ${viewCount} EJS views, theme CRUD, and update-cache preservation.`);

View File

@ -48,8 +48,7 @@ const GENERATED_RELATIVE_PATHS = new Set([
".parcel-cache", ".parcel-cache",
".turbo", ".turbo",
"tmp", "tmp",
"temp", "temp"
"data/update-cache"
]); ]);
const SNAPSHOT_EXCLUDE_RELATIVE_PATHS = new Set([ const SNAPSHOT_EXCLUDE_RELATIVE_PATHS = new Set([
".git", ".git",