codeburn/src/act
AgentSeal 2eec2fdc31 fix(act): support directory moves for archive actions
The archive actions in the acting epic move whole skill/agent directories,
which the framework could not handle: snapshotFile used copyFile (EISDIR on
a directory) and the afterHash pass used readFile. Snapshots now branch on
lstat, copying directory trees with fs.cp recursive. Directories get an
empty afterHash ('' means no content hash) and drift detection skips the
hash comparison for them; the occupied-original-path check still applies and
a missing movedTo still falls back to the backup. Backup restore likewise
branches: a directory snapshot replaces the target (rm then cp recursive).

Apply-side rename cannot replace a directory destination (ENOTEMPTY), so a
move retries once after clearing the already-snapshotted destination,
rethrowing other codes before any destination damage.

Tests: archive a directory tree and restore it byte-identical, move a
directory onto an existing destination directory (destBackup taken, both
trees restored), and dir-move undo with an occupied original path refusing
without --force and overwriting with it.
2026-07-03 10:14:48 +02:00
..
apply.ts fix(act): support directory moves for archive actions 2026-07-03 10:14:48 +02:00
backup.ts fix(act): support directory moves for archive actions 2026-07-03 10:14:48 +02:00
cli.ts fix(act): harden undo, apply, and locking against review findings 2026-07-03 10:07:22 +02:00
journal.ts fix(act): harden undo, apply, and locking against review findings 2026-07-03 10:07:22 +02:00
types.ts fix(act): harden undo, apply, and locking against review findings 2026-07-03 10:07:22 +02:00
undo.ts fix(act): support directory moves for archive actions 2026-07-03 10:14:48 +02:00