Repository navigation
feat: implement spec'd fatal error propagation - #773
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements spec-compliant fatal error propagation in the shell, ensuring that certain errors (parse errors, expansion errors) properly cause non-interactive shells to exit while allowing interactive shells to continue. The implementation centralizes error handling at the program level and removes several known_failure flags from test cases that now pass.
- Marks parse errors and expansion errors as fatal per POSIX specification
- Centralizes error handling in
Program::executeto allow interactive shells to continue after errors - Handles errors in subshells and simple commands without propagating fatality to parent contexts
- Enables 8 previously failing test cases across error handling, expansion, and status tests
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| brush-shell/tests/cases/word_expansion.yaml | Removes known_failure flag for parameter expression error test |
| brush-shell/tests/cases/status.yaml | Removes known_failure flag for parse error status test |
| brush-shell/tests/cases/errors.yaml | Removes known_failure flags for 6 fatal error tests, adds investigation note for one edge case |
| brush-core/src/shell.rs | Marks parse errors as fatal and consolidates error-to-result conversion in run_parsed_result |
| brush-core/src/interp.rs | Implements error catching at Program, Subshell, and SimpleCommand levels to prevent fatal error propagation while preserving exit codes |
| brush-core/src/expansion.rs | Marks checked expansion errors (parameter test failures) as fatal per POSIX spec |
Test Resultsββββ3 filesβββββ23 suitesβββ8m 8s β±οΈ Results for commit 8cbfe2a. β»οΈ This comment has been updated with latest results. |
Performance Benchmark Report
Code Coverage Report: Only Changed Files listed
Minimum allowed coverage is Test Summary: bash-completion test suite
|
No description provided.