fix: finish directory writer cleanup when cancellation rejects #6780
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6780"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MrMha on 2026-10-16T11:31:38Z.
What
When a directory-output read fails, cancelling an already errored ReadableStream rejects. That rejection previously skipped output abort; a cancellation or abort failure could also replace the original conversion error. Settle both cleanup operations before rethrowing the original failure, and preserve that failure for blob-reader cleanup too. Export the existing writer for direct stream regression coverage.
Tested
macOS 27.0.1 arm64, based on
main7dcfff559f68fc4ffb52f836134d3133492a3d00. The Node archive-root suite passes, including the new read, cancellation, abort and blob-reader failure cases. This suite exercises the real ZIP dependency; the complete WASM conversion suite was not run.The new regression fails against the original behavior and passes with this fix. Whitespace and repository conventions checks pass. Full runtime/title execution and Windows/Linux execution were not performed locally.
Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T11:53:15Z.
Review: APPROVED
The cleanup path waits for both stream cancellation and output abort to settle, then rethrows the original transfer/read error; the blob-reader path preserves it the same way. The regressions cover already-errored input, cancellation and abort failures, lock release, and blob read failure. The focused Web tests, conventions, eligibility, and intake checks pass. I compared the shared test file with #6100: these tests append to its suite without changing its assertions, so the overlap composes.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T05:47:23Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
demo/web/archive.mjsImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T10:35:27Z.
Checked the cleanup change in
DirectoryWriter(stream and blob paths): the original error is rethrown, and the new tests fail against the previous behaviour. Merged.