6 Commits
Author SHA1 Message Date
qmuntal 3607dcfa49 fix(cache): make tar scratch cleanup best-effort
Log scratch-directory cleanup failures without replacing a successful
archive read or the original tool error. Keep scratch ownership in
execReadCommands and cover both outcomes for extraction and listing.
2026-09-17 17:04:23 +02:00
qmuntal cd705bb67f refactor(cache): scope tar scratch directories to reads
Keep execCommands as a plain executor that honors its cwd argument. Move
scratch-directory allocation and cleanup into a shared list/extract
helper, leaving archive creation on the caller-supplied directory.
2026-09-17 16:55:25 +02:00
qmuntal fce8715913 chore(cache): minimize tar isolation diff
Restore the existing helper layout and separate test cases rather than
bundling unrelated consolidation with the bug fix. Leave archive creation
unchanged and retain only the read isolation, necessary path handling,
and regression coverage.
2026-09-17 15:53:20 +02:00
qmuntal dd137a579c refactor(cache): consolidate tar fallback handling and tests
Share the Windows BSD tar/zstd predicate and prepare archive and workspace
arguments once per command. Parameterize duplicate BSD-tar read tests and
use the real temporary-directory utilities in the concurrency fixture.

Retain the existing concurrency, path-handling, and failure coverage.
2026-09-17 15:47:36 +02:00
qmuntal 90977320aa test(cache): align tar concurrency test filename 2026-09-17 15:36:35 +02:00
qmuntal da266fa6fd fix(cache): isolate Windows BSD tar temporary files
Run Windows BSD tar/zstd extraction and listing in private temporary
directories. Concurrent operations previously overwrote cache.tar in the
process working directory and could extract the wrong archive without
reporting an error. Debug listings during cache saves have the same race.

Resolve and quote archive and workspace paths before changing the child
working directory, and remove scratch files on success and failure.
Leave GNU tar, gzip, and the cache archive format unchanged.

Add deterministic regression tests for concurrent reads, relative paths
with spaces, and cleanup after failures in either subprocess.
2026-09-17 15:27:15 +02:00