mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-17 21:43:06 +00:00
* 🔎 fix: Report Measured Skill Catalog Truncation The catalog truncation warning assumed `SKILL_CATALOG_MAX_ENTRY_CHARS` was the delivered length. It is only the first rung of the SDK's ladder: `formatSkillCatalog` applies the per-entry cap, then truncates further against its own context budget, and finally falls back to names-only. Two consequences, both silent: - A description under the 250-char cap can still be cut — no warning fired at all. Measured: 8 skills x 200 chars at a 20k context window reach the model at 85 chars each. - When the ladder does engage past the cap, the warning overstated what landed — reporting 250 where the true figure was 60. Measure the emitted catalog instead of assuming the cap held, and warn separately when descriptions are dropped entirely. `formatSkillCatalog` is no longer stubbed in the spec. The passthrough mock never truncated, which is why no test could observe this class of defect. * 🔁 fix: Measure Duplicate-Named Catalog Entries Positionally Keying delivered lengths by skill name collapsed duplicates: the catalog keeps every invocable duplicate as its own entry, so a name-keyed map held only the last one's length and reported it for all of them. A 400-char and a 100-char description sharing a name warned "truncated to 100 of 400" when the first entry actually reached the model at 250. Match positionally instead. Entry order is the order passed to the formatter, and the names-only fallback drops from the tail, so a skill the catalog never reached keeps its 0 and reads as dropped. * 🧵 fix: Detect Catalog Truncation By Containment, Not Line Parsing Nothing strips newlines from a skill description — validateSkillDescription checks type, length and trim-emptiness only — so a catalog entry is not one physical line, and parsing it as one misreports three ways: - a multiline description the catalog kept intact was measured from its first line alone and flagged as truncated - a description starting with a newline measured 0 and read as dropped - a continuation line imitating the next entry's marker desynchronized every measurement after it (a 400-char entry measured 8) Entry boundaries are not recoverable from the emitted text, because a description may contain the exact byte sequence that starts the next entry. So stop parsing it. A description the catalog kept appears verbatim, and containment detects truncation from any rung of the ladder without needing boundaries at all — including the duplicate-name case, which the positional pass already handled and which this preserves. Drops the delivered-length figure from the warning. That number is what kept being wrong, and the actionable signal for an author is that their description is being cut, not by precisely how much. * 🎯 fix: Scope Catalog Containment To The Matching Entry Matching the description alone missed a drop whenever that text occurred anywhere else in the catalog. The sharp case is the names-only fallback: a one-word description like "research" collides with a skill *named* research, so containment held and the warning was skipped for a description that had been dropped entirely. Match the whole `- name: description` rendering instead. That is still containment — no entry parsing, so multiline descriptions, duplicate names and continuation lines imitating the next marker all stay correct — but a collision now has to reproduce the entry's full rendering rather than just its text. Skips empty descriptions, which render without the `: ` separator and have nothing to truncate. * 🔬 fix: Measure Catalog Truncation On A Length-Equivalent Probe Matching the rendered entry still had a hole: when a multiline description is cut immediately before text like "\n- next-skill: next description" and the following entry is exactly that, the catalog holds the full rendering across two entries and the check passes for a description that was truncated. That is the fourth variant of one problem — the real catalog cannot be parsed or matched, because descriptions are arbitrary text that can imitate any structure the check relies on. So measure somewhere unambiguous. Every decision in the truncation ladder reads description `.length` and never description content, so formatting a probe whose descriptions are same-length filler reproduces the real cuts exactly, and the probe is parseable by construction: filler carries no newline and no entry marker, and skill names are validated to `^[a-z0-9][a-z0-9-]*$`. This closes the class rather than the instance, and restores the delivered length to the warning — verified against all six adversarial cases raised in review, correct on 6/6. |
||
|---|---|---|
| .. | ||
| acl | ||
| actions | ||
| admin | ||
| agents | ||
| apiKeys | ||
| app | ||
| artifacts | ||
| assistants | ||
| auth | ||
| cache | ||
| cdn | ||
| cluster | ||
| code | ||
| conversations | ||
| crypto | ||
| db | ||
| endpoints | ||
| favorites | ||
| files | ||
| flow | ||
| html | ||
| images | ||
| insights | ||
| langfuse | ||
| mcp | ||
| memory | ||
| middleware | ||
| modelSpecs | ||
| oauth | ||
| plugins | ||
| projects | ||
| prompts | ||
| protection | ||
| rum | ||
| schedules | ||
| security | ||
| shared-links | ||
| skills | ||
| storage | ||
| stream | ||
| telemetry | ||
| tools | ||
| types | ||
| user | ||
| utils | ||
| web | ||
| credentials.spec.ts | ||
| credentials.ts | ||
| imports.spec.ts | ||
| imports.ts | ||
| index.ts | ||
| telemetry.ts | ||