Commit graph

4 commits

Author SHA1 Message Date
vrubelroman
2cfd41160f test(archive): Unpack through transfer: conflicts, symlinks in the target, remote (5A.4)
An existing file is a conflict for the policy instead of a silent overwrite
(U-P1-11); a symlink in the target where the archive has a directory is a
type mismatch that is never written through (KeepBoth puts the directory
beside it); unpacking into and from a remote panel uses the same engine
(N-P1-15).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 08:52:08 +03:00
vrubelroman
b8cf3aefaa feat(archive): Create archives on any FS through WriteAtomic (5A.3)
Create refuses an archive path that is one of the sources or lies inside a
source directory, also through symlinks (U-P0-1); an existing archive is a
conflict for Resolve (Overwrite / KeepBoth "name (1).tar.gz" / Skip). The
archive is written via transfer.WriteAtomic, so cancel or failure removes
the partial file and keeps a previous archive; Close/flush errors of the
zip, tar and gzip writers fail the operation (N-P2-13). Symlinks are stored
as links; sources and target can be remote (N-P1-15, tested on the stand).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 04:17:42 +03:00
vrubelroman
2b1b9b0e95 feat(vfs/archivefs): read-only FS over an archive index; read-only conformance (5A.2)
archivefs mounts an archive by indexing it: no temp directory, virtual posix
paths, symlinks resolved inside the archive (absolute and escaping links are
broken), members opened directly (zip) or by a sequential scan (tar). All
mutations return ErrReadOnly (U-P0-2). vfstest.RunReadOnly checks any
read-only FS against a fixture tree; it runs on zip, tar and tar.gz mounts
and on vfs.ReadOnly(localfs). archive.OpenMember opens a single member.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 04:12:50 +03:00
vrubelroman
af453aa705 feat(archive): index zip/tar/tar.gz and stream members in one pass (5A.1)
BuildIndex reads the zip directory or walks a tar(.gz) once, with progress
and cancellation; no temp directory. Zip-slip names (.., absolute, drive
letters) and members below a symlink or file of the same archive are
rejected in any order; member count and total size are limited. NewSource
feeds members to transfer: directories and links from the index, file
contents in archive order from a single open; Unpack = Prepare + Execute.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 04:10:11 +03:00