fix(feedback_deliver): default gh/git callbacks must prepend the binary - #23
Merged
Merged
Conversation
deliver()'s defaults were `gh=_sh, git=_sh`, so on the real (non-mocked)
--execute path `gh("repo","clone",…)` shelled out to a program literally
named `repo` (FileNotFoundError) and `git(...)` to `-C`. Every test injects
gh=/git= mocks, so the bug was invisible and the --execute path had never
actually run end to end. Add `_gh`/`_git` wrappers that prepend the binary
and use them as the defaults.
Regression test: test_default_gh_git_callbacks_prepend_binary (asserts the
wrappers prepend gh/git AND that deliver wires them as defaults).
Full suite green (398 passed).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015cY2osrcunEXb5a8xtTy2V
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
deliver()defaulted both callbacks to bare_sh(gh=_sh, git=_sh). On the real--executepath that madegh("repo","clone",…)exec a program literally namedrepo(FileNotFoundError), andgit(...)one named-C. Every test injectsgh=/git=mocks, so the bug was invisible — the--executepath had never run end to end. Hit live while delivering CECS 378 Lab 2 feedback (failed on the first clone; nothing was pushed).Fix
Add
_gh/_gitwrappers that prepend the binary name and use them asdeliver()'s defaults. The injected-callback design (for tests) is unchanged.Test
test_default_gh_git_callbacks_prepend_binary— asserts the wrappers prependgh/gitand thatdeliverwires them as the defaults (guards the exact regression). Full suite green — 398 passed.🤖 Generated with Claude Code
https://claude.ai/code/session_015cY2osrcunEXb5a8xtTy2V