mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Suppress omission notices in core-compatible skill catalogs (#34797)
## Why Core-compatible skill catalog output should match the core renderer when the metadata budget omits entries. ## What changed - Emit the bounded-catalog omission notice only for `ExtensionCompatible` rendering. - Continue tracking omitted entries in `SkillRenderReport` for both policies, even when `CoreCompatible` produces no fragment because every entry is omitted. ## Testing Cover policy-specific omission notices and the case where no minimum skill line fits within the metadata budget. GitOrigin-RevId: 79883c15a49c02ff83444ddc272030cb4ddb53c0
This commit is contained in:
1 parent
5381edb133
commit
f343d1237d
2 files changed
+36
-12
No files matched your search
@@ -63,6 +63,13 @@ impl SkillCatalogRenderPolicy {
|
||||
Self::ExtensionCompatible => {}
|
||||
}
|
||||
}
|
||||
|
||||
fn includes_omission_notice(self) -> bool {
|
||||
match self {
|
||||
Self::CoreCompatible => false,
|
||||
Self::ExtensionCompatible => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
@@ -437,7 +444,7 @@ pub(crate) fn render_available_skills(
|
||||
used.saturating_add(metadata_line_cost(budget, &rendered.line))
|
||||
});
|
||||
|
||||
if omitted > 0 {
|
||||
if omitted > 0 && policy.includes_omission_notice() {
|
||||
loop {
|
||||
let marker = omission_marker(omitted);
|
||||
if total_cost.saturating_add(metadata_line_cost(budget, &marker)) <= budget.limit() {
|
||||
|
||||
Reference in new issue
Block a user