Skip to content

Fix skill resource URIs for encoded directory names - #5820

Closed
HootRock wants to merge 3 commits into
PrefectHQ:mainfrom
HootRock:fix/skill-name-uri-5819
Closed

HootRock wants to merge 3 commits into
PrefectHQ:mainfrom
HootRock:fix/skill-name-uri-5819

Conversation

@HootRock

@HootRock HootRock commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Skills named café or my skill can be listed with unreadable resources, or vanish from the list. Encode directory names in resource URIs and decode them once during lookup and discovery. The public manifest, download and sync helpers use the same encoding, preserving original local directory and file names, including literal %20. Existing namespaced skills and unescaped reads such as skill://skill+one/guide.md remain readable.

Fixes #5819.

AI-assisted implementation with Codex. reviewed and tested locally.

Co-authored-by: BlueX888 [email protected]

AI-assisted implementation with Codex.

Co-authored-by: BlueX888 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

This pull request is awaiting maintainer assignment. Linked PRs stay open while maintainers triage the issue; this check remains failing until assignment.

Per CONTRIBUTING.md, an external PR must reference an issue that's assigned to its author. To get there:

  1. A maintainer will review the issue and decide whether to assign you. Please don't comment just to request assignment.

Once you're assigned and the link is present, this check is re-run automatically. Previously gate-closed PRs also reopen — no further action needed.

Maintainers: reopen this PR or remove the missing-issue-link label to bypass this check.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T15:13:13.000671Z 66f92bd PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@marvin-context-protocol marvin-context-protocol Bot added the bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. label Oct 18, 2026

@BrickerP BrickerP left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks correct for #5819.

Advertising quote(skill.name, safe='') in list/template URIs, then unquote on the skill segment in _get_resource / _get_resource_template, matches how AnyUrl already percent-encodes non-ASCII hosts and rejects spaces — so list→read round-trips for café / my skill / # names without double-encoding the pre-quoted form. Keeping resource name / manifest skill id as the raw directory name is the right split.

The skill+one legacy read path is a nice touch (unquote leaves + alone; template uri_template keeps parts[0] spelling). Parametrized tests cover the interesting hosts, including a literal %20 directory.

Process only: check-issue-link is red because HootRock is not assigned on #5819 — not a code defect.

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

Copy link
Copy Markdown
Contributor

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: 66f92bda64

ℹ️ 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".

AI-assisted implementation with Codex.

Co-authored-by: BlueX888 <[email protected]>
AI-assisted conflict resolution with Codex.

Co-authored-by: BlueX888 <[email protected]>

@BrickerP BrickerP left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Re-reviewed on head 02229fd55573fa874cf0d24871f85256bb5ef0f4.

URI host encoding with quote(..., safe=\"\" ) (and safe=\"/\" only under preserve_bytes), lookup via unquote of the skill segment, and matching client utilities (list_skills / get_skill_manifest / download_skill) form a coherent round-trip. The new parametrized cases (spaces, non-ASCII, literal %20, #) plus the legacy skill+one read cover the failure mode well.

@fastmcp-triage-reviewer fastmcp-triage-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review by the FastMCP triage reviewer bot.

The focused run passes all 22 cases, including the reported URI round trips. The namespaced-download test nevertheless asserts an outdated contract: current downloads verify frontmatter and digests and install mounted skills under their final name. Its invalid fixture and nested output expectation cannot establish compatibility with current main.

When updating onto current main, preserve the verified export path. Give the namespaced fixture valid frontmatter and digest/size, expect the final-name directory, and retain the existing mounted-skill tests.

Checks

Retained base/head run: 19 failures + 3 passes → 22 passes. Source/history inspection confirms the export and mounted-directory contracts; no additional tests run.

@zzstoatzz

Copy link
Copy Markdown
Collaborator

thanks for this. closing along with #5819; the comment there explains why.

@zzstoatzz zzstoatzz closed this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. missing-issue-link

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Skills with non-ASCII directory names are listed but unreadable; space-containing names silently disappear

3 participants