mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Drop skill descriptions before omitting catalog entries (#34738)
## What changed When even the minimum skill catalog exceeds its metadata budget, render each included entry without its description. This allows more skill names and locators to fit before the remaining entries are omitted. ## Testing Add coverage for extreme budget pressure and verify both the extension and production-turn catalogs omit descriptions while staying within budget. GitOrigin-RevId: 72cec10e9587beabbd3d8c6d53b931deb76824e6
This commit is contained in:
1 parent
fd51e50540
commit
bd9a28a839
3 files changed
+67
-2
No files matched your search
@@ -219,8 +219,8 @@ fn render_skill_lines(
|
||||
let mut used = 0usize;
|
||||
let mut omitted = 0usize;
|
||||
for line in skill_lines {
|
||||
let rendered = line.render_full();
|
||||
let next_used = used.saturating_add(metadata_line_cost(budget, &rendered));
|
||||
let rendered = line.render_minimum();
|
||||
let next_used = used.saturating_add(line.minimum_cost(budget));
|
||||
if next_used <= budget.limit() {
|
||||
used = next_used;
|
||||
included.push(rendered);
|
||||
|
||||
Reference in new issue
Block a user