You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(folders): large-scale audit fixes across locking engine and folder orchestration
- resource-lock.ts: fix ancestor-walk short-circuit that let a locked ancestor
go unnoticed when bypassing a direct lock on the target itself (affects
assertFolderMutableUnlessUnlocking/assertResourceMutableUnlessUnlocking)
- workflow.ts: thread the inherited flag through WorkflowLockedError (was
always false)
- folders/orchestration.ts: recheck cycle-freedom inside the transaction for
kb/table folder reparents (was only checked against a stale pre-tx read);
add missing recordAudit + 409-on-duplicate-name for kb/table folder
create/update
- workflows/persistence/duplicate.ts: assertTargetFolderMutable now scopes by
resourceType='workflow' and row-locks the ancestor chain (was letting a
workflow duplicate reparent into a file/kb/table folder)
- table/service.ts: wrap renameTable's lock checks and write in a transaction
(was running with no transaction and no FOR UPDATE recheck)
- workflow-lifecycle.ts: wrap performUpdateWorkflow in a transaction with an
in-tx lock recheck (was relying solely on a non-transactional route
pre-check)
- knowledge/service.ts: recheck updateKnowledgeBase's lock inside the
transaction after acquiring the row lock
- workflows/orchestration/folder-lifecycle.ts: check the target folder's own
lock before cascading into children (was checking only after)
- workspace-files/orchestration/file-folder-lifecycle.ts: propagate the real
errorCode from performRestoreFolder instead of hardcoding not_found
- uploads/contexts/workspace/workspace-file-folder-manager.ts: fix missing
import of assertFolderMutableUnlessUnlocking (broke typecheck)
- hooks/queries/folders.ts: invalidate the correct resource-type-scoped list
on folder delete/restore instead of always invalidating workflow lists
- knowledge.tsx: folder rows now honor the active sort column/direction
- background/cleanup-soft-deletes.ts: hard-delete retention now covers
file/table/knowledge_base folders, not just workflow folders
- workspace-vfs.ts: surface archived table/knowledge_base folders under
recently-deleted/ so they can be discovered and restored
- table API routes: include folderId/locked in create and detail responses
- schema.mock.ts: add missing folderId/locked to workspaceFiles/knowledgeBase/
userTableDefinitions mocks
- add regression test coverage for the resource-lock ancestor-walk fix and
update table service tests for the new transactional renameTable call shape
0 commit comments