Repository navigation
fix(mcp): an earlier card's address gets the current card (#278) - #279
Merged
Merged
Conversation
… that kept one from before a change (#278)
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 #278.
After #277 was deployed, Grok could not load the app: "read-resource failed: 400". The card's address carries its hash, #277 changed the card, and the server answered only the new address: the earlier one,
card-df8ccbdd2aa8.html, got "Resource not found" on mcp.embed-my.org. Grok had kept the tool list, or the reply, from before. ChatGPT keeps the card it fetched, so its old replies played on.The fix: an earlier card's address,
ui://h5p-play/card-and twelve hex digits, gets the current card, with the same policy, as a resource template that is not listed. The card plays what an earlier one was handed (the same tool input, and the result's_meta). The address still changes with the card, so a chat that keeps cards by address fetches a changed one as before. Any other name undercard-is still not found.Tested:
app.test.tsreads the pre-#277 address and gets the current card, its text and policy, under the address asked; refusescard-latest.html; lists one card.worker.test.tsreads the earlier address from the Worker in the Workers runtime. Both packages' typecheck passes.After merge: deploy the Worker again. Grok's old tool list then loads the app; reconnecting the app in Grok does the same now, before the deploy.
Summary by cubic
Fixes the failure after #277 where chats that kept an earlier card address (like Grok) got a 400 on read. Now an earlier card's address (
ui://h5p-play/card-plus 12 hex digits) serves the current card, so old tool lists and replies still work; other names undercard-are still not found. The resource is not listed, and the address still changes with the card content. Redeploy the Worker after merging so Grok's saved tool list loads the app.Written for commit 1957a34. Summary will update on new commits.