.NET: Validate declarative message properties and improve action errors - #8119
Open
Manjunath Janardhan (manjunathshiva) wants to merge 2 commits into
Open
Manjunath Janardhan (manjunathshiva) wants to merge 2 commits into
Manjunath Janardhan (manjunathshiva) wants to merge 2 commits into
Conversation
Manjunath Janardhan (manjunathshiva)
temporarily deployed
to
github-app-auth
September 7, 2026 11:48 — with
GitHub Actions
Inactive
Manjunath Janardhan (manjunathshiva)
temporarily deployed
to
github-app-auth
September 7, 2026 11:48 — with
GitHub Actions
Inactive
Manjunath Janardhan (manjunathshiva)
temporarily deployed
to
github-app-auth
September 7, 2026 11:48 — with
GitHub Actions
Inactive
Manjunath Janardhan (manjunathshiva)
temporarily deployed
to
github-app-auth
September 7, 2026 11:48 — with
GitHub Actions
Inactive
Copilot started reviewing on behalf of
Manjunath Janardhan (manjunathshiva)
September 7, 2026 11:49
View session
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused implementation matches the stated requirements and includes appropriate regression coverage.
Pull request overview
Adds early validation for invalid declarative message properties and improves runtime action diagnostics.
Changes:
- Rejects unknown message-template properties during workflow construction.
- Includes underlying exception details in action failures.
- Adds regression coverage for validation, extensions, expressions, and aliases.
File summaries
| File | Description |
|---|---|
DeclarativeWorkflowBuilder.cs |
Validates message-template extension properties. |
DeclarativeActionExecutor.cs |
Adds underlying error details to failures. |
DeclarativeValidationTests.cs |
Covers validation and runtime diagnostics. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Manjunath Janardhan (manjunathshiva)
marked this pull request as ready for review
September 7, 2026 11:52
Manjunath Janardhan (manjunathshiva)
temporarily deployed
to
github-app-auth
September 7, 2026 11:53 — with
GitHub Actions
Inactive
Manjunath Janardhan (manjunathshiva)
deployed
to
github-app-auth
September 12, 2026 17:36 — with
GitHub Actions
Active
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.
Motivation & Context
A misspelled property such as
activity.testorprompt.testis retained as extension data by the YAML reader. Workflow construction succeeds, and the workflow can emit an empty message instead of reporting the typo. Invalid template expressions also surface an outer exception that identifies the action but omits the underlying error.Description & Review Guide
Buildwith aDeclarativeModelException. A runtime invalid-member error now includes both#output (SendActivity)and the Power Fx diagnostic for'Test'. Dynamic expressions continue to be evaluated at execution; this change does not introduce general static expression validation or reject the supportedTopicalias.autoSendremain supported. The reproduction uses{Local.ToolResponse.Test}; the automated triage exampleactivity: =System.LastMessage.Testis emitted as literal text in my local reproduction.Full solution build completed with zero warnings or errors. The affected declarative test project passed all 882 tests on .NET 10. Tests use
LANG=en_US.UTF-8andLC_ALL=en_US.UTF-8: three existing date-parsing cases also fail with unchanged declarative code under this machine's default locale. The full .NET 10 unit run passed: 7,205 passed, 65 skipped, zero failures. Local hosting tests also requiredDOTNET_HOSTBUILDER__RELOADCONFIGONCHANGE=falseand permission for the Foundry test host to create its local state directory. Formatting and style checks passed.Related Issue
Fixes #8015
No competing open PR or human implementation claim was found in the issue discussion or linked timeline when preparing this draft.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.