fix(git): apply timeout and fatal-error wrapping consistently (audit #14.1) - #267
Conversation
|
|
| } | ||
| } | ||
|
|
||
| func TestReadMethods_FatalExitCodeWrapsErrFatal(t *testing.T) { |
There was a problem hiding this comment.
Removed the requested test in 349da11. I also removed the shared method-level test scaffolding that was only used by the three deleted tests, avoiding dead helpers while retaining the existing focused error-propagation assertions.
[addressed by agent]
| } | ||
| } | ||
|
|
||
| func TestReadMethods_WrapContextErrors(t *testing.T) { |
There was a problem hiding this comment.
Removed the requested test in 349da11. I also removed the shared method-level test scaffolding that was only used by the three deleted tests, avoiding dead helpers while retaining the existing focused error-propagation assertions.
[addressed by agent]
| } | ||
| } | ||
|
|
||
| func TestIsAncestor_ExitCodeOneMeansNotAncestor(t *testing.T) { |
There was a problem hiding this comment.
Removed the requested test in 349da11. I also removed the shared method-level test scaffolding that was only used by the three deleted tests, avoiding dead helpers while retaining the existing focused error-propagation assertions.
[addressed by agent]
.1) Summary: Audit #14.1 extracts the git command contract fixes from #262. Intent: - Ensure read-only git commands honor the same timeout and error-classification contract as mutating commands. - Preserve conditional exit semantics for merge-base ancestry checks. Changes: - Apply the shared timeout and wrapError path to RevParse, IsAncestor, GetCommitTimeSecond, and FileHashes. - Cover fatal exits, deadline expiration, parent cancellation, and IsAncestor exit code 1.
fe0c041 to
349da11
Compare
Summary
Audit #14.1. Apply the established timeout and error-wrapping contract consistently to the remaining read-only Git operations.
Intent
Ensure fatal Git failures and timeouts remain classifiable by callers without changing
IsAncestor's conditional exit-code-1 behavior.Changes
_gitTimeoutandwrapErrortoRevParse,IsAncestor,GetCommitTimeSecond, andFileHashes.(false, nil)for a valid non-ancestor result.Test Plan
make gazelle./tools/bazel test //core/git:git_test --test_output=errors --test_env=GIT_CONFIG_COUNT=1 --test_env=GIT_CONFIG_KEY_0=commit.gpgSign --test_env=GIT_CONFIG_VALUE_0=falseRevert Plan
Revert this PR to restore the previous per-method Git error behavior.
Jira Issues
None.