feat(guard): #659 route every git push and commit through the write guard #775
No reviewers
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!775
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-659-guard-git-writes"
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?
Summary
Push, commit, and finish now go through a guarded Writer (ADR 0046).
internal/git/writer.go holds a Guard interface and a Writer that refuses every
write when built with no guard (fail closed); internal/service/git/writer.go
adapts guard.DefaultBranchWrite, resolving the default branch and whether it
already exists on the remote. push gains a default-branch guard it never had;
commit and finish keep their existing messages and the allow_default_branch
override (its removal is #665) and route only the decision through the guard.
The orchestrate revert and the empty-repo first push still work.
Closes #659