mirror of
https://github.com/openai/codex.git
synced 2026-11-26 23:28:11 +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
@@ -892,7 +892,10 @@ fn build_alias_plan(
|
||||
let mut alias_root_by_display_root = HashMap::new();
|
||||
let mut alias_roots = Vec::new();
|
||||
let mut seen = HashSet::new();
|
||||
for entry in entries {
|
||||
let mut alias_ordered_entries = entries.to_vec();
|
||||
alias_ordered_entries
|
||||
.sort_by_key(|entry| entry.display_path_root_order().unwrap_or(usize::MAX));
|
||||
for entry in alias_ordered_entries {
|
||||
if entry.authority.kind != SkillSourceKind::Host {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user