mirror of
https://github.com/openai/codex.git
synced 2026-11-29 07:35:16 +00:00
Preserve discovery order for host skill path aliases (#36327)
## Why Host skill path aliases should follow the core skill loader's root discovery order, independent of how catalog entries are sorted for rendering. ## What changed - Propagate each host skill root's discovery position into its catalog entries. - Assign `r0`, `r1`, and subsequent aliases from that position while leaving entries without an explicit root order last. ## Testing Added coverage for alias ordering in extension rendering and across consecutive production turns. GitOrigin-RevId: 9085a3843c91bf2ce78a378cf5ce4926e9c38eb8
This commit is contained in:
1 parent
aea26afaee
commit
66d63afd18
6 files changed
+231
-1
No files matched your search
@@ -179,6 +179,7 @@ pub struct SkillCatalogEntry {
|
||||
pub main_prompt: SkillResourceId,
|
||||
pub display_path: Option<String>,
|
||||
display_path_root: Option<String>,
|
||||
display_path_root_order: Option<usize>,
|
||||
prompt_scope: Option<SkillScope>,
|
||||
pub dependencies: Option<SkillDependencies>,
|
||||
pub enabled: bool,
|
||||
@@ -202,6 +203,7 @@ impl SkillCatalogEntry {
|
||||
main_prompt,
|
||||
display_path: None,
|
||||
display_path_root: None,
|
||||
display_path_root_order: None,
|
||||
prompt_scope: None,
|
||||
dependencies: None,
|
||||
enabled: true,
|
||||
@@ -225,6 +227,11 @@ impl SkillCatalogEntry {
|
||||
self
|
||||
}
|
||||
|
||||
pub(crate) fn with_display_path_root_order(mut self, display_path_root_order: usize) -> Self {
|
||||
self.display_path_root_order = Some(display_path_root_order);
|
||||
self
|
||||
}
|
||||
|
||||
pub(crate) fn with_prompt_scope(mut self, prompt_scope: SkillScope) -> Self {
|
||||
self.prompt_scope = Some(prompt_scope);
|
||||
self
|
||||
@@ -259,6 +266,10 @@ impl SkillCatalogEntry {
|
||||
self.display_path_root.as_deref()
|
||||
}
|
||||
|
||||
pub(crate) fn display_path_root_order(&self) -> Option<usize> {
|
||||
self.display_path_root_order
|
||||
}
|
||||
|
||||
pub(crate) fn prompt_scope(&self) -> Option<SkillScope> {
|
||||
self.prompt_scope
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user