Give non-latin names their own URL, and stop caching under test - #70
Merged
Merged
Conversation
A name written entirely in a script with no latin characters reduced to nothing and fell back to the literal "item". 192 of the catalogue's 21,837 prompts and resources are such names, so on any server holding more than one of them only the first was reachable and the rest were pages in the sitemap that could not be opened. They now fall back to a short stable hash of the name. An unlovely URL, but a working one, and the page still shows the name as its publisher wrote it. phash2 rather than phash, because it is specified to be portable -- a URL minted today has to resolve tomorrow. The cache is also off under test. It is a global ETS table while async tests each hold their own database sandbox, so one test can be handed a value computed from rows it cannot see; that produced one failure here that would not reproduce. Three seeds clean since. Closes #69 --- Pages affected: - [MCP Harbor](https://ai.mcpharbor.dev/) -- registry home, search and recently added servers. - [MCP server directory](https://ai.mcpharbor.dev/servers) -- the listings these pages hang under. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #69.
Capability.slug/1collapses everything outside[a-z0-9], so a name written entirely in a script with no latin characters reduced to nothing and fell back to the literal"item". 192 of the catalogue's 21,837 prompts and resources are such names — on any server holding more than one, only the first was reachable and the rest were URLs in the sitemap that could not be opened.They now fall back to a short stable hash of the name. An unlovely URL, but a working one, and the page still displays the name exactly as its publisher wrote it.
:erlang.phash2/1rather thanphash/2, because it is specified to be portable — a URL minted today has to resolve tomorrow.Cache off under test
One run failed and would not reproduce.
McpRegistry.Cacheis a global ETS table whileasync: truetests each hold their own database sandbox, so one test can be handed a value computed from rows it cannot see. Now that chunk contents are cached and not just counts, that stopped being theoretical.Caching a count nobody is measuring buys nothing under test, so
config/test.exsturns it off. Three seeds clean since.Tests: 169 passing.
Pages affected:
🤖 Generated with Claude Code