Skip to content

fix(feedback_deliver): default gh/git callbacks must prepend the binary - #23

Merged
agiacalone merged 1 commit into
mainfrom
fix/feedback-deliver-default-callbacks
Jun 28, 2026
Merged

fix(feedback_deliver): default gh/git callbacks must prepend the binary#23
agiacalone merged 1 commit into
mainfrom
fix/feedback-deliver-default-callbacks

Conversation

@agiacalone

Copy link
Copy Markdown
Owner

Problem

deliver() defaulted both callbacks to bare _sh (gh=_sh, git=_sh). On the real --execute path that made gh("repo","clone",…) exec a program literally named repo (FileNotFoundError), and git(...) one named -C. Every test injects gh=/git= mocks, so the bug was invisible — the --execute path 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/_git wrappers that prepend the binary name and use them as deliver()'s defaults. The injected-callback design (for tests) is unchanged.

Test

test_default_gh_git_callbacks_prepend_binary — asserts the wrappers prepend gh/git and that deliver wires them as the defaults (guards the exact regression). Full suite green — 398 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_015cY2osrcunEXb5a8xtTy2V

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
@agiacalone
agiacalone merged commit 9ae4c1e into main Jun 28, 2026
4 checks passed
@agiacalone
agiacalone deleted the fix/feedback-deliver-default-callbacks branch June 28, 2026 23:20
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.

1 participant