A staging folder that fails to delete is reused by the next update
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, node.js
Research direction
Start with packages/builder-server/src/services/themeUpdateService.js, especially recoverInterruptedUpdate and the prepare failure, language-folder refusal, and post-swap cleanup paths around the referenced lines. Trace how the staging folder is removed and prepared, then inspect the relevant tests and add one that makes stage removal fail. Done means a run never prepares into a stage it did not create, and cleanup failure on the refusal path is reported.
Written by the indexing model from the issue text.
Description
If a theme update can't delete its temporary folder, the next update can pick up stale files from it.
Every removal of .theme-update-stage/ swallows its error (themeUpdateService.js ~263 in recoverInterruptedUpdate, ~436/~442 in the prepare failure and the language-folder refusal, ~491/~502 after the swap). If one fails, the next run's ensureDir reuses the folder and fs.copy merges into it, so leftover staged files (an old collection folder, a stale asset) can be swapped into the project or cause a false refusal; the refusal also returns its 409 as if the stage were gone. Pre-existing pattern; found by reading the code, not reproduced.
Suggested: at the start of a run, remove the stage without swallowing the error and refuse with the usual "could not be prepared" message if it is still there; on the refusal path, report a cleanup failure instead of the clean 409.
Done when: A run never prepares into a stage it did not create, with a test that makes the stage removal fail.
Start: themeUpdateService.js. Source: 2026-10-18 Codex review of 29289f67..6344ab5c.
- Dominant language
- JavaScript
- Stars
- 162
- Forks
- 6
- Avg merge
- 12h 55m
- Merged PRs (30d)
- 2
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tsiger/widgetizer
-
question
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
tsiger/widgetizer#194 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
tsiger/widgetizer#181 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
tsiger/widgetizer#175 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
tsiger/widgetizer#174 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
tsiger/widgetizer#173 ·
All issues in tsiger/widgetizer
Similar issues
-
WebsiteOpengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
TanbirRamim/open-source-radar#314 ·
Maintainers usually reply within 1 day
-
prio: medium
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
twentyhq/twenty#28826 · 1 comment ·
Maintainers usually reply within 1 day
-
status: needs triage
Difficulty 1/5 1-3 hours Newbie friendliness 76/100
mastra-ai/mastra#28382 · 1 comment ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SolidGeeks/strata#21 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Yomguithereal/mnemonist#247 ·