Repository navigation
fix(dart/core): report unknown envelope keys at their paths - #4197
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the MessageProcessor to report unknown envelope keys and misspelled message types at the key's JSON Pointer instead of /version. It also ensures that validation error details retain dot paths and the message index. Comprehensive unit tests have been added to verify these changes. I have no further feedback to provide.
|
Hi @leoafarias, thank you for raising this PR and we verified that it reports unknown envelope keys at their own JSON Pointer path. The pr will be reviewed. Thank you for your patience and understanding. |
|
From triage bot, suggestion: For humansTL;DR Summary: Targeted issues: Suggestion: The PR meets the review criteria:
Its CI runs on the latest commit wait for a maintainer to approve them.
To adjust and apply this suggestion, run in your a2ui checkout: tools/internal/triage_new/triage_ui.sh https://github.com/a2ui-project/a2ui/pull/4197For software🤖 Agent-generated |
|
From triage bot, suggestion: For humansTL;DR Summary: Targeted issues: Suggestion: Suggest no assignee, because no team member has submitted a review. The PR meets the review criteria:
Its CI runs on the latest commit wait for a maintainer to approve them.
Reply:
To adjust and apply this suggestion, run in your a2ui checkout: tools/internal/triage_new/triage_ui.sh https://github.com/a2ui-project/a2ui/pull/4197For software🤖 Agent-generated |
…st (#4371) ## Summary Applies `dart format` to two files in `dart/a2ui_core` so that the `format-check` and `dart_a2ui_core` formatting jobs pass on `main` again. They have failed on `main`, and on every PR based on it, since #4197 merged. ## Changes - `dart/a2ui_core/lib/src/processing/processor.dart`: one statement is wrapped the way Dart 3.13 formatting wraps it. - `dart/a2ui_core/test/processor_test.dart`: one list literal is re-indented, and one call is wrapped with a trailing comma. The diff is the formatter's output and nothing else. With whitespace and trailing commas removed, both files are identical before and after.
Description
Fixes #4194.
MessageProcessorsendspath: "/version"for an unknown envelope key (extranext tocreateSurface) and for a misspelled type (createSurfac), so an agent correcting its message edits the wrong field._inferEnvelopeDetailpicks/versionbecause the unknown-key message always contains "Expected 'version'".Solution
_readEnvelopenow sets the rejected key as the error's JSON Pointer, soextrareports/extraandcreateSurfacreports/createSurfac._inferEnvelopeDetailuses that pointer when it names a top-level key of the envelope; other errors keep the existing inference. Details keep their dot paths, likemessages.1.extra.dart/a2ui_core/CHANGELOG.md.Verification
dart/a2ui_core/test/processor_test.dart: both cases, pointer escaping, a key containingversionand the detail path, plus controls for an unsupported version, a valid message and a body error. The five unknown-key tests fail onmain.dart testindart/a2ui_corepasses (2,370 tests, conformance suite included), and so dodart analyzeandscripts/fix_format.sh --check.Pre-launch Checklist
One time:
For this PR:
I haven't run a sample or
scripts/e2e_test.sh: both need an agent backed by a live model and an API key I don't have set up here.If you need help, consider asking for advice on the discussion board.