Hyeonsang Cho eb5d1e1880
fix(projects): keep referenced originals when the trash sweep walks a symlinked tree (#7732)
* fix(projects): keep referenced originals when the trash sweep walks a symlinked tree

The storage reconciliation protects each row's namespace by its resolved
path (project_document_path resolves symlinks) but walked the unresolved
documents directory. With a symlinked .deer-flow (no DEER_FLOW_HOME),
users/, users/{id}/ or projects/, no walked directory matched a protected
namespace, so the startup sweep and the lazy trash-listing sweep unlinked
live document originals older than 24 hours as orphans.

Walk each project's resolved documents directory so both sides compare
the same paths.

* docs(changelog): reference #7732 for the trash sweep symlink fix

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-10-31 19:16:50 +08:00
..