feat: return native typed exec outcomes - #92
Conversation
There was a problem hiding this comment.
The changes successfully refactor the exec tool to derive execution success/failure directly from child process status rather than relying on parseable output markers. The implementation introduces the typed ToolResult with NonZeroExit error code while preserving backward compatibility.
Key improvements:
- Prevents command output from spoofing success/failure by separating process status from output content
- Introduces
ShellExecOutcomestruct andexecute_with_approved_mutation_typedmethod for typed results - Maintains existing
executemethod for backward compatibility - Comprehensive test coverage including spoofing prevention tests
All validation passed (440 tests, clippy, fmt) and the code is ready for merge.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
Codex reviewNo blocking findings. I traced both public execution paths: the reasoning loop reaches Review status: ready for human approval, but leave this PR open until explicitly authorized to merge. |
Status
Replacement review PR for #87. The original PR was merged accidentally and cannot be reopened by GitHub. PR #91 removed its changes from
main; this PR restores the exact original diff for review and must remain open until explicitly approved for merge.Summary
NonZeroExitas an authoritative typed tool result while preserving legacy output textValidation
cargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningscargo test --all-features(440 passed, 0 failed, 6 ignored)git diff --checkOriginal PR: #87