open-design/apps
Weston Houghton 20136c4da9
fix(skills): stream-copy fallback when skill staging hits cross-fs EPERM (#3249)
* fix(skills): fall back to a stream copy when skill staging hits EPERM

`fs.cp` copies each file with copy_file_range(2), which the kernel rejects
across some filesystem pairs — e.g. a container image layer (`/app`) copied
onto a ZFS/overlay bind mount (`/data`) — surfacing EPERM. Node doesn't fall
back to a userspace copy, so skill staging failed and degraded to absolute
paths, losing the `.od-skills` write barrier.

Retry recoverable copy errors (EPERM/EXDEV/ENOTSUP/EOPNOTSUPP) with a
dereferencing read/write copy that works across any source/dest filesystem;
non-recoverable errors still degrade as before. A test seam injects a
synthetic EPERM since the real errno only reproduces on those mounts.

* fix(skills): preserve source file mode in the EPERM stream-copy fallback

The cross-filesystem fallback copied contents with createWriteStream, which
opens the destination at the default 0644 and drops the source's exec bit.
Skills shell out to staged helper scripts (e.g.
skills/pptx-html-fidelity-audit/scripts/*.py), so on the EPERM/EXDEV path
this fallback repairs they would fail with EACCES.

chmod (masked to 0o777, so the agent-writable staging copy never inherits
setuid/setgid/sticky) + utimes each copied file from the source stat so the
fallback matches fs.cp's mode/timestamp preservation. Adds a regression test
that stages an executable fixture through the synthetic-EPERM seam and
asserts the exec bit survives.
2026-05-29 03:17:04 +00:00
..
daemon fix(skills): stream-copy fallback when skill staging hits cross-fs EPERM (#3249) 2026-05-29 03:17:04 +00:00
desktop feat(runtimes): register AMR (vela) as an ACP stdio agent (#2355) 2026-05-28 05:09:55 +00:00
landing-page fix(landing-page): community page brand mark + license + nav trim + twitter handle (#3222) 2026-05-29 01:32:27 +00:00
packaged fix(platform): support live system proxy changes (#3093) 2026-05-28 06:11:47 +00:00
telemetry-worker chore: pin dependency versions and harden CI caches (#2189) 2026-05-19 13:58:27 +08:00
web fix(analytics): bucket feedback agent/model directly on the event (#3240) 2026-05-29 03:06:06 +00:00
AGENTS.md refactor(daemon): split agent runtime definitions (#1063) 2026-05-11 15:01:55 +08:00