refactor: one git-run chokepoint owns output disposition #806
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#806
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
madtea builds every git child process in one place (internal/gitexec), but the choice of what to do with that process stdout and stderr is spread across five run helpers in internal/git, and each one decides for itself.
The split shows up as a user-visible inconsistency. clone streams git native progress to the terminal, so a large clone shows a progress bar. pull and fetch buffer both streams, so a large pull shows nothing until it finishes and reads as hung.
The five helpers and their choices:
This is the same shape as ADR 0049 (one hardened HTTP client layer): clients built independently, only one carrying the policy, consolidated into one layer with a guard that fails the build on a bypass. The git runner is the one cross-cutting concern not consolidated yet. Command construction is already central in internal/gitexec per ADR 0038; only output disposition is scattered.
I want one git-run chokepoint that owns output disposition, with an explicit mode per stream (capture, stream, or tee), so a caller states what it wants instead of each helper hard-coding a different answer. A parity guard then fails the build on any git run built outside the chokepoint, the same way the HTTP client guard does. The progress gap between clone and pull becomes one caller choosing stream, not a separate fix.
I am recording the design as an ADR first. This issue is the decision issue for that record.
Acceptance:
Reopening. The ADR 0056 PR merge closed this, but the refactor it tracks is not done, so it stays open until the work lands.
I accept the design in ADR 0056. The record is landed as proposed and flips to accepted when the refactor lands and this issue closes.
Closing as the decision issue. The design is accepted and recorded in ADR 0056 (0056-one-git-runner-owns-output-disposition). The refactor that implements it continues in #808, which stays open until the code lands.