Skip to content

fix: update stale catalogId references broken by #1452 spec restructure#1470

Closed
valentinbeggi wants to merge 1 commit into
google:mainfrom
valentinbeggi:fix/catalog-id-after-spec-restructure
Closed

fix: update stale catalogId references broken by #1452 spec restructure#1470
valentinbeggi wants to merge 1 commit into
google:mainfrom
valentinbeggi:fix/catalog-id-after-spec-restructure

Conversation

@valentinbeggi
Copy link
Copy Markdown

@valentinbeggi valentinbeggi commented May 20, 2026

Summary

PR #1452 moved the basic catalog schema from:

  • specification/v{ver}/json/basic_catalog.json

to:

  • specification/v{ver}/catalogs/basic/catalog.json

The lit renderer's basicCatalog was correctly updated to the new canonical $id (https://a2ui.org/specification/v{ver}/catalogs/basic/catalog.json), but all downstream consumers were missed, causing a runtime crash:

A2uiStateError: Catalog not found: https://a2ui.org/specification/v0_9/basic_catalog.json

This happens because the agent samples include examples with the old catalogId in the LLM system prompt, so the model generates createSurface messages with the outdated ID — which no longer matches the registered catalog on the client.

Files updated

  • samples/agent/adk/restaurant_finder/examples/0.9/*.json — LLM prompt examples
  • samples/agent/adk/custom-components-example/examples/0.9/*.json
  • samples/agent/adk/rizzcharts/examples/standard_catalog/0.9/*.json + prompt_builder.py
  • samples/client/lit/shell/public/samples/*.json — local file loading samples
  • samples/client/react/shell/src/mock/restaurantMessages.ts
  • samples/mcp/a2ui-over-mcp-recipe/recipe_a2ui.json
  • samples/agent/adk/migrate_v08_to_v09.py
  • specification/v0_9/eval/src/generation_flow.ts + validator.ts
  • specification/v0_10/eval/src/generation_flow.ts + validator.ts
  • specification/v0_9/test/cases/*.json + run_tests.py (fixed path to removed basic_catalog.json)
  • specification/v0_10/test/cases/*.json + run_tests.py
  • agent_sdks/python/tests/schema/test_validator.py
  • agent_sdks/python/tests/integration/verify_load_real.py

Test plan

  • Run the restaurant finder sample server and verify no Catalog not found error on first message
  • Load contact_card.json / workspace_settings.json via the local file upload in the lit shell — should render without error
  • Run specification/v0_9/test/run_tests.py — all tests pass
  • Run specification/v0_10/test/run_tests.py — all tests pass

@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 20, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@valentinbeggi
Copy link
Copy Markdown
Author

@gspencergoog hey, could you take a look? This fixes stale catalogId references that were broken by #1452 — the spec path changed but the sample examples, eval prompts, and test fixtures weren't updated alongside the renderer.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates catalogId and schema URLs across various files, including Python SDK tests, sample JSON configurations, and specification evaluation tools, to align with a revised directory structure. Additionally, the test runners in the specification directories were updated to simplify catalog aliasing and reflect the new file paths. Feedback from the review highlights a domain inconsistency in a test validator fixture and suggests enhancing error messages in the test suite by including full file paths to improve debuggability.

Comment thread agent_sdks/python/tests/schema/test_validator.py
Comment thread specification/v0_9/test/run_tests.py
Comment thread specification/v0_9/test/run_tests.py
@ditman
Copy link
Copy Markdown
Collaborator

ditman commented May 22, 2026

@valentinbeggi do you mind rebasing the branch? This looks reasonable and I can take a look!

@ditman ditman self-requested a review May 22, 2026 21:28
PR google#1452 moved the basic catalog from
  specification/v{ver}/json/basic_catalog.json
to
  specification/v{ver}/catalogs/basic/catalog.json

and updated the canonical $id accordingly. The lit renderer's
basicCatalog was updated, but all downstream consumers (sample
examples, eval prompts, test fixtures, run_tests.py scripts) still
referenced the old URL, causing an "A2uiStateError: Catalog not found"
at runtime when the LLM generates createSurface messages with the
outdated catalogId.

Changes:
- Update all agent/client sample example JSONs (restaurant, custom-
  components, rizzcharts, MCP, React mock) to use the new catalogId
- Update eval generation_flow.ts prompts for v0.9 and v0.10
- Update spec test case fixtures for v0.9 and v0.10
- Fix run_tests.py for both versions to load from the new path
- Update agent SDK tests to use the new ID
@valentinbeggi valentinbeggi force-pushed the fix/catalog-id-after-spec-restructure branch from 19f87c1 to cab9461 Compare May 25, 2026 07:36
@valentinbeggi
Copy link
Copy Markdown
Author

This has been addressed by #1463 which was merged in the meantime. Closing.

@github-project-automation github-project-automation Bot moved this from Todo to Done in A2UI May 25, 2026
@ditman
Copy link
Copy Markdown
Collaborator

ditman commented May 26, 2026

This has been addressed by #1463 which was merged in the meantime. Closing.

Thanks for your contrib @valentinbeggi! Keep them coming!

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants