Skip to content

Conversation

@brkn
Copy link
Contributor

@brkn brkn commented Oct 31, 2025

Description

  • Return SystemCall::Result objects from guard checks at database util class methods instead of primitive true values. This removes the need for checking the object of the returned.

  • Replace Failure Struct with a class to remove warnings at test outputs. Failure constant redefined

@brkn brkn force-pushed the refactor/tell-dont-ask branch from 3a2f547 to 84c4b55 Compare October 31, 2025 11:49
@brkn brkn closed this Oct 31, 2025
@brkn brkn deleted the refactor/tell-dont-ask branch October 31, 2025 11:53
@brkn brkn restored the refactor/tell-dont-ask branch October 31, 2025 11:53
@brkn brkn reopened this Oct 31, 2025
@alassek
Copy link
Contributor

alassek commented Nov 8, 2025

I’m in favor of the motivation here, to reduce type-checking results by making them work consistently. But I’m not sure I like the specific solution of faking shell command output. I don’t think we should be capturing exit codes for executions that didn’t happen.

@brkn
Copy link
Contributor Author

brkn commented Nov 8, 2025

Thank you for the comment.

I’m not sure I like the specific solution of faking shell command output.

To understand it better, which one you don't like:

A) These database methods (like exec_drop_command) returning SystemCall::Result instances when we didn't do system calls on early exits

B) These database methods (like exec_drop_command) returning an object that respond to #exit_code calls when we didn't do system calls on early exits

@brkn brkn force-pushed the refactor/tell-dont-ask branch from 84c4b55 to 4255136 Compare January 20, 2026 10:19
@brkn brkn force-pushed the refactor/tell-dont-ask branch from 4255136 to 785520a Compare January 20, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants