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:
felixxia-oai authored and copyberry committed 2026-07-31 13:47:46 +00:00
1 parent aea26afaee
commit 66d63afd18
6 files changed
+231 -1

No files matched your search

+5
View File
@@ -61,6 +61,11 @@ impl SkillLoadOutcome {
self.skill_root_by_path.get(path)
}
/// Returns loaded skill roots in discovery order.
pub fn skill_roots_in_discovery_order(&self) -> impl Iterator<Item = &AbsolutePathBuf> {
self.skill_roots.iter()
}
pub(crate) fn file_system_for_skill(
&self,
skill: &SkillMetadata,