LibreChat/packages
Dustin Healy ad47919ecd fix: address review findings — race safety, validation DRY, type accuracy, test coverage
- Add post-write admin count verification in removeRoleMember to prevent
  zero-admin race condition (TOCTOU → rollback if count hits 0)
- Make IRole.description optional; backfill in initializeRoles for
  pre-existing roles that lack the field (.lean() bypasses defaults)
- Extract parsePagination, validateNameParam, validateRoleName, and
  validateDescription helpers to eliminate duplicated validation
- Add validateNameParam guard to all 7 handlers reading req.params.name
- Catch 11000 in updateRoleByName and surface as 409 via RoleConflictError
- Add idempotent skip in addRoleMember when user already has target role
- Verify updateRolePermissions test asserts response body
- Add data-layer tests: listRoles sort/pagination/projection, countRoles,
  and createRoleByName 11000 duplicate key race
2026-03-26 17:45:16 -07:00
..
api fix: address review findings — race safety, validation DRY, type accuracy, test coverage 2026-03-26 17:45:16 -07:00
client 📁 refactor: Prompts UI (#11570) 2026-03-22 16:56:22 -04:00
data-provider 🎛️ feat: DB-Backed Per-Principal Config System (#12354) 2026-03-25 19:39:29 -04:00
data-schemas fix: address review findings — race safety, validation DRY, type accuracy, test coverage 2026-03-26 17:45:16 -07:00