The gate refuses a force push onto a branch that is not the member's own (martha#230) #233

Manually merged
terra merged 2 commits from neptunus/230-force-push into main 2026-11-26 06:43:10 +00:00
Member

Refs #230, #45

The gate refuses a force push onto any branch that is not the acting member's own. Raf decided this on 2026-11-26, ticking "Force push to a peer's branch" on #45 c5603. The threat model is on #230.

  • What counts as a force: --force, -f (also bundled, as in -uf), --force-with-lease[=…], or + on a refspec.
  • What branch it writes: each refspec's target. For HEAD/@, or with no refspec, it is the branch git lists for the worktree the call runs in.
  • Unchanged: a member's own branch still takes a force; a forced delete is still judged by the delete rule; the default-branch rule still answers first.
  • Option values: the word after -o, --push-option, --receive-pack or --exec is no longer read as the remote.

Proof, through the namespace wrapper:

  • guard_workspace: 24 pass, 0 fail
  • the six test files that use the guard: all green
  • tsc, eslint and check:restated-values: clean
  • three mutants killed (each turns 1 test red): the refusal removed, the bundled form not read, and the option values read as the remote

🤖 Generated with Claude Code

Refs #230, #45 The gate refuses a force push onto any branch that is not the acting member's own. Raf decided this on 2026-11-26, ticking "Force push to a peer's branch" on #45 c5603. The threat model is on #230. - **What counts as a force:** `--force`, `-f` (also bundled, as in `-uf`), `--force-with-lease[=…]`, or `+` on a refspec. - **What branch it writes:** each refspec's target. For `HEAD`/`@`, or with no refspec, it is the branch git lists for the worktree the call runs in. - **Unchanged:** a member's own branch still takes a force; a forced delete is still judged by the delete rule; the default-branch rule still answers first. - **Option values:** the word after `-o`, `--push-option`, `--receive-pack` or `--exec` is no longer read as the remote. Proof, through the namespace wrapper: - guard_workspace: 24 pass, 0 fail - the six test files that use the guard: all green - tsc, eslint and check:restated-values: clean - three mutants killed (each turns 1 test red): the refusal removed, the bundled form not read, and the option values read as the remote 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The gate refuses a force push onto a branch that is not the member's own (martha#230)
Some checks failed
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
CI / nothing private (pull_request) Has been skipped
dependency advisories / advisories (pull_request) Has been cancelled
dependency advisories / node in . (pull_request) Has been cancelled
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Has been cancelled
dependency advisories / node in installer (pull_request) Has been cancelled
c4 model / c4-model (pull_request) Has been cancelled
c4 model / c4-model-1 (pull_request) Has been cancelled
CI / links resolve (pull_request) Has been cancelled
CI / gate coverage (pull_request) Has been cancelled
CI / structural floor (pull_request) Has been cancelled
CI / Martha's names are its own (pull_request) Has been cancelled
CI / no import cycle (pull_request) Has been cancelled
CI / the relay loads in the recorded host (pull_request) Has been cancelled
CI / the host drift check bites (pull_request) Has been cancelled
CI / the engine drift check bites (pull_request) Has been cancelled
CI / the posted text check bites (pull_request) Has been cancelled
CI / the clean-install proof removes its container (pull_request) Has been cancelled
CI / the ring reaches the owner on the live run's tmux (pull_request) Has been cancelled
CI / workflows are valid (pull_request) Has been cancelled
CI / installer (pull_request) Has been cancelled
CI / no test the base passed goes missing (pull_request) Has been cancelled
CI / the pictures change only with the version (pull_request) Has been cancelled
CI / no literal restates a defined value (pull_request) Has been cancelled
CI / every check runs in a job (pull_request) Has been cancelled
CI / every job has a timeout (pull_request) Has been cancelled
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Has been cancelled
standalone / the pinned Node is nodejs.org's (pull_request) Has been cancelled
921deda55d
A push that forces by --force, -f (alone or in a bundle such as -uf), a lease, or a + on a refspec is refused when a
branch it writes is not the acting member's own: another member's branch, or one no member owns. A refspec naming HEAD
or @, or none at all, writes the branch git lists where the call runs. A member's own branch takes a force as before;
a forced delete stays the delete rule's. The value -o, --push-option, --receive-pack and --exec take is no refspec.

DECIDED 2026-11-26 by the owner, ticking "Force push to a peer's branch" on #45 c5603.

Refs #230, #45
r=1 fold-in: a forced push of the tags alone or of a ref outside refs/heads/ writes no branch (martha#230)
All checks were successful
dependency advisories / node in . (pull_request) Successful in 9s
dependency advisories / node in installer (pull_request) Successful in 9s
c4 model / c4-model-1 (pull_request) Successful in 3s
c4 model / c4-model (pull_request) Successful in 0s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 18s
dependency advisories / advisories (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 4s
CI / the relay loads in the recorded host (pull_request) Successful in 15m26s
CI / Martha's names are its own (pull_request) Successful in 22s
CI / structural floor (pull_request) Successful in 34s
CI / no import cycle (pull_request) Successful in 29s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
CI / nothing private (pull_request) Has been skipped
CI / the engine drift check bites (pull_request) Successful in 28s
CI / the posted text check bites (pull_request) Successful in 16s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 14s
CI / the host drift check bites (pull_request) Successful in 1m6s
CI / workflows are valid (pull_request) Successful in 15s
CI / the pictures change only with the version (pull_request) Successful in 20s
CI / every check runs in a job (pull_request) Successful in 16s
CI / every job has a timeout (pull_request) Successful in 17s
CI / no test the base passed goes missing (pull_request) Successful in 43s
CI / installer (pull_request) Successful in 2m21s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 19s
CI / no literal restates a defined value (pull_request) Successful in 1m6s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 37s
CI / the clean-install proof removes its container (pull_request) Successful in 22m43s
CI / gate coverage (pull_request) Successful in 17m40s
a977851785
The reviewer's three required points, each pinned by a test that a mutant turns red:
- a forced push of the tags alone writes no branch, now asserted from a worktree on another member's branch;
- a forced delete is the delete rule's, now asserted with a delete that no other rule refuses;
- a refspec writing a ref outside refs/heads/ (a tag) is left to #231's rule, and a bare name no member owns is named
  as a branch nobody owns, or a tag.
Notes taken: -fo <value> reads the next word as -o's value, -ofoo is no force, and the refusal names a branch git
lists as refs/heads/<name> by its short name.

Refs #230
terra manually merged commit 74041d9249 into main 2026-11-26 06:43:10 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
martha-ai/martha!233
No description provided.