feat: Compress skill paths with root aliases#19098
Merged
Conversation
3a6df41 to
c2ad035
Compare
sayan-oai
reviewed
Apr 24, 2026
Comment on lines
+764
to
+776
| fn alias_instruction_overhead_cost(budget: SkillMetadataBudget) -> usize { | ||
| let absolute_lines = [ | ||
| SKILLS_INTRO_WITH_ABSOLUTE_PATHS.to_string(), | ||
| SKILLS_HOW_TO_USE_WITH_ABSOLUTE_PATHS.to_string(), | ||
| ]; | ||
| let aliased_lines = vec![ | ||
| SKILLS_INTRO_WITH_ALIASES.to_string(), | ||
| "### Skill roots".to_string(), | ||
| SKILLS_HOW_TO_USE_WITH_ALIASES.to_string(), | ||
| ]; | ||
|
|
||
| lines_cost(budget, &aliased_lines).saturating_sub(lines_cost(budget, &absolute_lines)) | ||
| } |
Collaborator
There was a problem hiding this comment.
can we easily reuse the actual model-visible text constructed in AvailableSkillsInstructions::body() rather than constructing roughly the same text here?
sayan-oai
reviewed
Apr 24, 2026
Comment on lines
2630
to
+2631
| let available_skills = build_available_skills( | ||
| &implicit_skills, | ||
| &turn_context.turn_skills.outcome, |
Collaborator
There was a problem hiding this comment.
we're changing model-visible context, can we have an integration test that asserts it takes the expected shape?
sayan-oai
approved these changes
Apr 24, 2026
sayan-oai
approved these changes
Apr 24, 2026
Collaborator
sayan-oai
left a comment
There was a problem hiding this comment.
tests needed and one other comment but lgtm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add skill root tracking so model-visible skill lists can use short path aliases when absolute paths would exceed the metadata budget.