fix(documents): syncEntityFolderName defense-in-depth + log level

Two follow-ups from code review:
1. The UPDATE in the retry loop now scopes by both id and port_id so
   it matches every other mutation in document-folders.service.ts and
   honours the CLAUDE.md defense-in-depth pattern.
2. The three entity-rename hooks now log at warn level (not error) —
   a missed folder rename is best-effort cosmetic drift, not a paging
   incident. Matches the existing convention used elsewhere in the
   codebase for non-fatal background work.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-11 11:30:19 +02:00
parent 86a6944d1c
commit 3b34b41989
4 changed files with 4 additions and 4 deletions

View File

@@ -533,7 +533,7 @@ export async function updateClient(
if (data.fullName !== undefined) {
await syncEntityFolderName(portId, 'client', id, meta.userId).catch((err) => {
logger.error({ err, clientId: id }, 'Failed to sync client folder name');
logger.warn({ err, clientId: id }, 'Failed to sync client folder name');
});
}