M1-audit: GetRootFolderContents diverges from GetRootFolder — B-7 flag missing in sibling #92

Closed
opened 2026-11-07 08:40:56 +01:00 by amiryahaya · 1 comment
Owner

GetRootFolderContents.cs:46-48 picks ANY ParentFolderId==null folder (no IsTenantRoot filter, no order) and auto-creates without IsTenantRoot=true (52-60) — while GetRootFolder (B-7, #80) marks/promotes the canonical root.

Trigger: tenant with a personal root-level folder + canonical root → nondeterministic contents served; uploads land in a different folder than listings.

Fix: mirror GetRootFolder's query (IsTenantRoot filter + CreatedAt order) and flag the auto-create.

Part of M1 closure audit #84.

GetRootFolderContents.cs:46-48 picks ANY ParentFolderId==null folder (no IsTenantRoot filter, no order) and auto-creates without IsTenantRoot=true (52-60) — while GetRootFolder (B-7, #80) marks/promotes the canonical root. **Trigger**: tenant with a personal root-level folder + canonical root → nondeterministic contents served; uploads land in a different folder than listings. **Fix**: mirror GetRootFolder's query (IsTenantRoot filter + CreatedAt order) and flag the auto-create. Part of M1 closure audit #84.
Author
Owner

Fixed in PR #116 (squash-merged as b0945c9). GetRootFolderContents now resolves the root through the new shared TenantRootFolderResolver — the same flagged-root → promote-earliest → create-flagged logic as GetRootFolder; both endpoints structurally cannot diverge again. 3 new tests: canonical-root selection, auto-create carries IsTenantRoot=true, unflagged legacy root promoted identically by both endpoints.

Fixed in PR #116 (squash-merged as b0945c9). GetRootFolderContents now resolves the root through the new shared TenantRootFolderResolver — the same flagged-root → promote-earliest → create-flagged logic as GetRootFolder; both endpoints structurally cannot diverge again. 3 new tests: canonical-root selection, auto-create carries IsTenantRoot=true, unflagged legacy root promoted identically by both endpoints.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
primatekuntech/failsulit#92
No description provided.