Skip to content

fix(mcp): an earlier card's address gets the current card (#278) - #279

Merged
alekswebnet merged 1 commit into
mainfrom
fix/card-earlier-address
Nov 25, 2026
Merged

alekswebnet merged 1 commit into
mainfrom
fix/card-earlier-address

Conversation

@alekswebnet

@alekswebnet alekswebnet commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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 under card- is still not found.

Tested: app.test.ts reads the pre-#277 address and gets the current card, its text and policy, under the address asked; refuses card-latest.html; lists one card. worker.test.ts reads 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 under card- 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.

View guided diff Turn on auto-fix

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 4 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@alekswebnet
alekswebnet merged commit 9bc5746 into main Nov 25, 2026
10 checks passed
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.

The app server: an earlier card's address gets the current card (Grok: read-resource failed: 400)

1 participant