bib: attach_file records unresolved storage_path — P37 worktree left a dead .worktrees/ path on the CY2027 Addendum B attachment #628
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while executing #625's verification:
pfs.nprm._discover_addendum_b('sup:2027_PFS_NPRM')returns/home/kert/stack/.worktrees/p37/data/storage/BIEQHVTM/…xlsx, which no longer exists — P37 ran in a worktree (main was owned by #618), the worktree'sdata/pointed at the real data directory, andStore.attach_filestoredstr(dest)without resolving symlinks (src/bib/store.py:526). The file itself is safe at the canonicaldata/storage/BIEQHVTM/…; only the recorded path string is dead. Same failure family as #619 (publish_replica symlink resolution).Audit: exactly 1 affected row (
SELECT key FROM attachments WHERE storage_path LIKE '%.worktrees%'→ BIEQHVTM).Fix:
attach_filestoresstr(dest.resolve())so future worktree runs record the canonical path (regression test with a symlinked storage dir).Blocks the #626 sync only insofar as
bib.syncpushes attachments by storage_path — repair before syncing.