Skip to content

Re-land staging-folder export on main (PR 26 merged into its stacked base)#29

Merged
gsokoll merged 2 commits into
mainfrom
backport/ws1-bugfixes
Jun 12, 2026
Merged

Re-land staging-folder export on main (PR 26 merged into its stacked base)#29
gsokoll merged 2 commits into
mainfrom
backport/ws1-bugfixes

Conversation

@gsokoll

@gsokoll gsokoll commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

PR #26 was approved and merged while its base still pointed at backport/ws1-bugfixes, so the staging-export changes landed on that branch instead of main (GitHub only retargets a stacked PR when its base branch is deleted, and #25 left the branch alive). This PR carries exactly that content to main; the diff is the #26 staging work plus its validation-driven fixes, nothing else. Validation evidence is on #26.

gsokoll added 2 commits June 12, 2026 14:24
…ront

Export To Files previously ran shutil.rmtree on the target folder before
writing anything. A locked folder (open Explorer window, IDE, git client,
antivirus) aborted the export at the start, and a mid-export crash left
the on-disk copy destroyed with no replacement.

The export now writes into <target>.codescribe_staging and is swapped in
only after it completes: the old target is renamed to
<target>.codescribe_backup, the staging folder is renamed to the target,
and the backup is deleted (a failure deleting the backup only prints a
warning). If a rename fails because the target is locked, the staged
files are synced into the target file by file instead; files that
disappeared from staging are not deleted. If the sync also fails,
ExportFolderLockedError reports the staging folder path where the
completed export is preserved.

Credit: reimplemented from ipfedor/codescribe commits bc6ec89, 1141d7d. Refs #24.
Stage exports and swap on success instead of rmtree up front
@gsokoll gsokoll merged commit 190f797 into main Jun 12, 2026
2 checks passed
@gsokoll gsokoll deleted the backport/ws1-bugfixes branch June 12, 2026 07:33
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.

1 participant