LibreChat/api/server/routes
lia-by-librechat[bot] 9acf9f0ac8
🫗 fix: Roll Back Incomplete Skill Archive Imports (#16052)
* 🫗 fix: Roll Back Incomplete Skill Archive Imports

A .zip or .skill import created the skill first and persisted its bundled
files one by one, keeping the skill and answering 201 when a file failed
validation, a size limit, storage, or its database row. The client never
read the internal `_importSummary`, so it showed "Skill created" and
navigated to a skill that silently lacked the resources SKILL.md names.

Import is now atomic: any failed bundled file rolls back the skill, its
file rows, the ACL grant, and the blobs already written to storage, and
the request answers 422 `skill_import_incomplete` with the failed paths
and reasons. The upload dialog stays open and lists them.

* fix: Localize Import Failure Reasons and Report Every Lost File

Addresses the first review round on the archive import rollback.

Failure reasons are now stable codes (`invalid_path`, `file_too_large`,
`archive_too_large`, `archive_entry_changed`, `persistence_failed`) that
the client localizes, so a non-English locale no longer sees English text
and storage or driver messages stay in the server log.

The decompression budget stops the scan mid-archive, and the entries it
never reached were missing from the response, telling the user they had
seen the whole failure set. Those paths are now reported too.

Rollback deletes stored blobs only once `deleteSkill` confirms the skill
is gone; otherwise the blobs stay and the request answers 500
`skill_import_rollback_failed`, because a surviving skill pointing at
deleted files is worse than unreferenced storage.

The failure list scrolls instead of overflowing the dialog, and a
response that resolves after the dialog was dismissed no longer
repopulates it for the next session.

* fix: Ignore Late Skill Import Successes

* fix: Make Skill Import Rollback Retryable

* fix: Propagate Incomplete Skill Cleanup

* fix: Settle Rollback Blob Cleanup

* test: Type Partial Cleanup Fixture

* fix: Preserve Settled Skill Cleanup Steps

* fix: Export Skill Cleanup Step Type

* fix: Reconcile Partially Deleted Skills

* fix: Reconcile Skill Rollback Caches

* style: format cleanup reconciliation changes

* fix: complete skill rollback cleanup

* chore: leave generated locale catalogs unchanged

* fix: preserve synced skill blob cleanup

* test: type synced blob cleanup mock

* fix: Validate Archive Paths and Bound Rollback Cleanup

---------

Co-authored-by: Lia <lia@librechat.ai>
Co-authored-by: Danny Avila <danny@librechat.ai>
2026-09-19 12:41:30 -04:00
..
__test-utils__ 🔎 feat: Filter and Sort the Sidebar Chats List (#15842) 2026-09-12 15:56:10 -04:00
__tests__ 🗼 fix: Serialize MCP OAuth Token Refresh Across Replicas (#15993) 2026-09-16 21:58:23 -04:00
admin 🧿 fix: Bind Login Flows to the Browser That Started Them (#15880) 2026-09-13 11:47:29 -04:00
agents 📖 fix: Verify Agents OpenAPI contracts and disable external reporting (#16028) 2026-09-16 15:17:56 -04:00
assistants 📿 fix: Inspect Stored File Locators Per Message (#15841) 2026-09-11 16:47:48 -04:00
files 🥡 fix: Delete Storage and Embeddings With Owned Agent Files (#16007) 2026-09-17 02:59:25 +00:00
types
accessPermissions.js 🩻 feat(insights): Scope Insights to Authorized Agents (#15549) 2026-09-04 20:16:58 -04:00
accessPermissions.sharePolicy.test.js
accessPermissions.test.js
actions.js
apiKeys.js
auth.2fa-ratelimit.test.js 🧿 fix: Bind Login Flows to the Browser That Started Them (#15880) 2026-09-13 11:47:29 -04:00
auth.cloudfront.test.js 🧿 fix: Bind Login Flows to the Browser That Started Them (#15880) 2026-09-13 11:47:29 -04:00
auth.cross-site.test.js 🧿 fix: Bind Login Flows to the Browser That Started Them (#15880) 2026-09-13 11:47:29 -04:00
auth.js 🧿 fix: Bind Login Flows to the Browser That Started Them (#15880) 2026-09-13 11:47:29 -04:00
auth.reset-password-ratelimit.test.js 🧿 fix: Bind Login Flows to the Browser That Started Them (#15880) 2026-09-13 11:47:29 -04:00
balance.js
banner.js
categories.js
code-environments.js 🚛 fix: Move Sealed Chats to New Code Environments (#15902) 2026-09-14 00:58:08 -04:00
code-environments.test.js 🚛 fix: Move Sealed Chats to New Code Environments (#15902) 2026-09-14 00:58:08 -04:00
config.js 🚛 fix: Move Sealed Chats to New Code Environments (#15902) 2026-09-14 00:58:08 -04:00
convos.js 🔎 feat: Filter and Sort the Sidebar Chats List (#15842) 2026-09-12 15:56:10 -04:00
endpoints.js 🧳 feat: Register Principal-Owned Code Environments (#15365) 2026-08-30 19:33:19 -04:00
index.js 🔌 feat: OpenAPI spec and docs for the public Agents API (#15928) 2026-09-16 13:50:05 -04:00
insights.js 🩻 feat(insights): Scope Insights to Authorized Agents (#15549) 2026-09-04 20:16:58 -04:00
keys.js
mcp.js 🗼 fix: Serialize MCP OAuth Token Refresh Across Replicas (#15993) 2026-09-16 21:58:23 -04:00
memories.js 🧠 fix: Return 400 for Invalid Memory Keys (#14618) 2026-09-06 04:34:06 +02:00
memories.test.js 🧠 fix: Return 400 for Invalid Memory Keys (#14618) 2026-09-06 04:34:06 +02:00
messages.js 🔭 feat: Conversation Trace Viewer (#15869) 2026-09-13 00:56:52 -04:00
models.js
oauth.js 🧿 fix: Bind Login Flows to the Browser That Started Them (#15880) 2026-09-13 11:47:29 -04:00
oauth.state.test.js 🧿 fix: Bind Login Flows to the Browser That Started Them (#15880) 2026-09-13 11:47:29 -04:00
oauth.test.js 🔐 fix: Redirect OAuth Browser Navigations Instead of Rendering JSON (#15440) 2026-08-31 21:13:47 -04:00
openapi.js 🔌 feat: OpenAPI spec and docs for the public Agents API (#15928) 2026-09-16 13:50:05 -04:00
presets.js 📿 fix: Inspect Stored File Locators Per Message (#15841) 2026-09-11 16:47:48 -04:00
presets.test.js
projects.js
prompts.js ⚡ perf: Avoid Parallel Full and Paged Prompt Loading on Startup (#15031) 2026-08-25 21:21:17 -04:00
prompts.test.js
roles.js
rum.js
schedules.js 🛎️ fix: Preflight MCP Readiness for Scheduled Chats (#15782) 2026-09-09 22:18:45 -04:00
search.js
settings.js 📌 feat: Unified Pinned Section With Sidebar Drag Interactions (#15057) 2026-09-11 10:41:05 -04:00
share.js 📿 fix: Inspect Stored File Locators Per Message (#15841) 2026-09-11 16:47:48 -04:00
skills.js 📜 feat: Add Skills Discovery and Authoring to the Management API (#15642) 2026-09-06 17:26:26 -04:00
skills.tenant.test.js
skills.test.js 🫗 fix: Roll Back Incomplete Skill Archive Imports (#16052) 2026-09-19 12:41:30 -04:00
static.js
tags.js
traces.js 🔭 feat: Conversation Trace Viewer (#15869) 2026-09-13 00:56:52 -04:00
user.js
user.verify-ratelimit.test.js