Skip to content

feat: extend skills/list to support additional roots.#10835

Open
xl-openai wants to merge 2 commits intomainfrom
xl/skill-list
Open

feat: extend skills/list to support additional roots.#10835
xl-openai wants to merge 2 commits intomainfrom
xl/skill-list

Conversation

@xl-openai
Copy link
Collaborator

@xl-openai xl-openai commented Feb 6, 2026

Add an optional perCwdExtraUserRoots

@xl-openai xl-openai requested a review from owenlin0 February 6, 2026 00:58
Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1076fdb2f5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 73 to 64
pub async fn skills_for_cwd(&self, cwd: &Path, force_reload: bool) -> SkillLoadOutcome {
if !force_reload && let Some(entry) = self.cached_entry_for_cwd(cwd) {
return entry.outcome;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid reusing extra-root cache for plain skills_for_cwd

Because skills_for_cwd returns whatever cached entry exists for the cwd without checking that it was computed with no extra roots, any earlier call to skills_for_cwd_with_extra_user_roots will “poison” the cache. In that case a subsequent skills_for_cwd(cwd, false) (used elsewhere for normal skill listing) will unexpectedly include skills from those extra user roots, even though no extra roots were requested. This makes the extra-root behavior persist beyond the request that opted in and can surface unintended skills to other callers.

Useful? React with 👍 / 👎.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's expected.

@xl-openai xl-openai force-pushed the xl/skill-list branch 2 times, most recently from a15ed4f to 9dc0be5 Compare February 6, 2026 02:01
Copy link
Collaborator

@owenlin0 owenlin0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre-approving with small comments


/// Optional per-cwd extra roots to scan as user-scoped skills.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub per_cwd_extra_user_roots: Vec<SkillsListExtraRootsForCwd>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: let's do this instead for consistency (should be covered by AGENTS.md now)

    #[ts(optional = nullable)]
    pub per_cwd_extra_user_roots: Option<Vec<SkillsListExtraRootsForCwd>>,

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my goal is to keep updating AGENTS.md so codex just applies consistent conventions by default🤞

#[ts(export_to = "v2/")]
pub struct SkillsListExtraRootsForCwd {
pub cwd: PathBuf,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this annotation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants