guard: refuse every commit on the default branch after the first push, with no override #665
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.
Blocks
Depends on
#670 epic: one guard enforces the recorded limits on every surface
sixfold-space/madtea
#659 guard: the git write functions call the guard
sixfold-space/madtea
Reference
sixfold-space/madtea#665
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?
ADR 0006 and ADR 0046 say that the only write to the default branch is the first push into an empty repo.
madt_commitandmadtea commitbreak that rule in two ways today:allow_default_branchon MCP (internal/mcp/tools_localgit.go) and--allow-default-branchon the CLI (internal/cmd/git/commit.go). ADR 0006 says that no guard in this tier has an override.internal/service/git/commit.go). ADR 0006 refuses it.Scope:
Acceptance:
Depends on #659 (the git write functions call the guard). Decision records: ADR 0006, ADR 0046.
The code for this landed on main, and the host tests pass: a commit on the default branch is refused on both surfaces, with and without a merge in progress, the empty-repo first commit still works, and the override is gone from both surfaces with no alias. There is no forge-tagged test for this one; the proof is the real-git tests on the host. Keeping this open until the forge-test gate for the breaking set is green.
The v0.20.0 breaking set is complete and green on main. The code landed across the v0.20.0 branches, the full local gate passes, and the forge suite is green on both forges at both pinned versions on current main (
31693766). Closing as done.