fix: update stale catalogId references broken by #1452 spec restructure#1470
fix: update stale catalogId references broken by #1452 spec restructure#1470valentinbeggi wants to merge 1 commit into
Conversation
|
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. |
|
@gspencergoog hey, could you take a look? This fixes stale |
There was a problem hiding this comment.
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.
|
@valentinbeggi do you mind rebasing the branch? This looks reasonable and I can take a look! |
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
19f87c1 to
cab9461
Compare
|
This has been addressed by #1463 which was merged in the meantime. Closing. |
Thanks for your contrib @valentinbeggi! Keep them coming! |
Summary
PR #1452 moved the basic catalog schema from:
specification/v{ver}/json/basic_catalog.jsonto:
specification/v{ver}/catalogs/basic/catalog.jsonThe lit renderer's
basicCatalogwas 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:This happens because the agent samples include examples with the old
catalogIdin the LLM system prompt, so the model generatescreateSurfacemessages 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 examplessamples/agent/adk/custom-components-example/examples/0.9/*.jsonsamples/agent/adk/rizzcharts/examples/standard_catalog/0.9/*.json+prompt_builder.pysamples/client/lit/shell/public/samples/*.json— local file loading samplessamples/client/react/shell/src/mock/restaurantMessages.tssamples/mcp/a2ui-over-mcp-recipe/recipe_a2ui.jsonsamples/agent/adk/migrate_v08_to_v09.pyspecification/v0_9/eval/src/generation_flow.ts+validator.tsspecification/v0_10/eval/src/generation_flow.ts+validator.tsspecification/v0_9/test/cases/*.json+run_tests.py(fixed path to removedbasic_catalog.json)specification/v0_10/test/cases/*.json+run_tests.pyagent_sdks/python/tests/schema/test_validator.pyagent_sdks/python/tests/integration/verify_load_real.pyTest plan
Catalog not founderror on first messagecontact_card.json/workspace_settings.jsonvia the local file upload in the lit shell — should render without errorspecification/v0_9/test/run_tests.py— all tests passspecification/v0_10/test/run_tests.py— all tests pass