LibreChat/packages
Dustin Healy bab6a3edc2 🧪 test: regression coverage for getPromptGroup DocumentDB lookup
Add prompt.getPromptGroup.spec.ts covering both the functional contract
and a structural guard against the DocumentDB-incompatible aggregation
shape.

Functional cases (run against mongodb-memory-server):

  * returns the group with productionPrompt populated when no tenant
    context is active
  * returns the group with productionPrompt populated when the active
    tenant matches the joined prompt
  * clears productionPrompt when the joined prompt belongs to a
    different tenant
  * returns the group with productionPrompt populated under
    SYSTEM_TENANT_ID context (no filtering)
  * returns null when the group does not exist
  * accepts string _id values (mirrors the route-handler shape)

Structural regression:

  * spies on PromptGroup.aggregate and asserts the produced pipeline
    contains no $lookup with let or pipeline keys, so the multi-join
    form that AWS DocumentDB rejects cannot silently reappear
2026-05-21 08:06:41 -07:00
..
api 🧵 chore: Raise MCP SSE Line Default (#13224) 2026-05-21 09:06:02 -04:00
client v0.8.6-rc1 (#13094) 2026-05-12 21:40:23 -04:00
data-provider 🧯 fix: Harden Data Retention Semantics (#13049) 2026-05-19 21:58:42 -04:00
data-schemas 🧪 test: regression coverage for getPromptGroup DocumentDB lookup 2026-05-21 08:06:41 -07:00