Skip to content

(6/8) fix(files): check upload space on the target mount and harden trash exclude append - #142

Merged
dizys merged 3 commits into
dizys:mainfrom
0libote:fix/files-upload-trash
Nov 14, 2026
Merged

dizys merged 3 commits into
dizys:mainfrom
0libote:fix/files-upload-trash

Conversation

@0libote

@0libote 0libote commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Upload start() measured free space only on the destination, so an upload aimed into a nearly-full mounted subdir passed the pre-check, poisoned the shared process-global reserve, and then failed late per chunk after partially filling the mount. start() now checks each item's resolved parent filesystem, the same one per-chunk writes measure. Uploads onto mounts stay supported. Separately, workspace Trash appended to .git/info/exclude check-then-act through a symlink; it now reads and appends through a single O_NOFOLLOW descriptor with an isFile() check on the open fd, mirroring text.mjs.

Validation: uploads and trash suites pass (15/15 on current main, including the new mount-constrained and exclude-link regression tests); the new upload test fails on the old code, confirming it catches the bug. Related files, git, and text suites pass; node --check clean.

…xclude append

Upload start() measured only the destination filesystem while staging
files land in parents that may sit on another mount, over-promising the
shared reserve and failing late per chunk. Check each item's resolved
parent, the same filesystem per-chunk writes measure.

Workspace-Trash appended to .git/info/exclude check-then-act through a
symlink. Read and append through one O_NOFOLLOW descriptor and verify
isFile() on the open fd, mirroring text.mjs openRegular.
@0libote

0libote commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Sixth (6 of 8), after #148, #145, #146, #144, #143. Checked, no conflicts.

@0libote 0libote changed the title fix(files): check upload space on the target mount and harden trash exclude append (6/8) fix(files): check upload space on the target mount and harden trash exclude append Nov 14, 2026
@dizys
dizys merged commit 9cf62f0 into dizys:main Nov 14, 2026
14 checks passed
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.

2 participants