Repository navigation
Report returned command errors in machine mode - #287
Conversation
Preserve structured stderr diagnostics for theme and edit failures, including warnings and redirection, without duplicate render-error reporting. Fixes #278 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the machine-mode error-reporting changes.
No open issues 🎉
What changed in this PR
Addresses #278 by making returned command failures, including failed theme operations and rejected non-interactive edit calls, emit structured JSON diagnostics on stderr in machine mode.
Changes:
- Report ordinary command errors while preserving warning envelopes and stderr redirection.
- Prevent duplicate diagnostics after output-rendering failures, including with
--verbose. - Add regression coverage and document the automation behavior.
| File | Description |
|---|---|
docs/navigation.md |
Document machine-mode command errors and stderr redirection. |
CosmosDBShell/Azure.Data.Cosmos.Shell.Core/ShellInterpreter.cs |
Emit returned errors and suppress duplicate rendering diagnostics. |
CosmosDBShell.Tests/Shell/ExecuteCommandExceptionTests.cs |
Test warning envelopes, redirection, and duplicate suppression. |
CosmosDBShell.Tests/Parser/CommandStatementTests.cs |
Update warning expectations for returned command failures. |
CosmosDBShell.Tests/Integration/ShellProcessTests.cs |
Cover errors across output modes, redirection, scripts, and expressions. |
CHANGELOG.md |
Record the fix for silent machine-mode failures. |
Review effort: Balanced
Code coverage overviewLanguages: C# C# / code-coverage/dotnet
View coverage of the 3 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed because a critical interaction between expression evaluation and outer exception handling can emit duplicate JSON diagnostics for an already-reported failure.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
…#287 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Fixes #278.
Summary
themefailures and rejected non-interactiveeditcalls.2>/2>>redirection.--verbose.Validation