Commit cd8df64
docs(agents): criterion ③'s test is scoped to the branch's own commits — the unranged git log walked all of main and made force-with-lease dead letter (#18351)
Fixes #18178
## The defect
`AGENTS.md` Multi-agent §3 allows `--force-with-lease` only while all
five criteria hold.
Criterion ③ stated the bar — *nobody else has ever pushed it* — and then
operationalised it
as the author and committer sets of an **unranged** `git log` over the
branch's remote ref.
With no range that walks the branch's entire ancestry, all of `main`
included, so the sets
are main's whole history plus the agent and the test cannot pass for
**any** branch cut from
`main`. The stated criterion is satisfiable and right; only its
operationalisation was
impossible — a reader who follows the words never force-pushes, one who
follows the intent
does, and that divergence is the bug. The card was filed after the dev
on #17330 declined to
take a reading it could not prove and shipped four `wip:` commits plus a
merge instead.
## The change
One hunk, two lines, `AGENTS.md` :473–:474. The parenthetical is
re-keyed to the branch's
**own** commits — the range form `origin/main..` in front of the branch
ref. Criteria ①②④⑤
are untouched, ③'s bar is untouched (same words, same strictness), and
the file stays at its
1075-line ceiling with no new line.
```diff
- `claude/issue-*`; ② this worktree created it; ③ nobody else has ever pushed it (the
- author and committer sets of `git log origin/BRANCH` are you alone); ④ no open PR
+ `claude/issue-*`; ② this worktree created it; ③ nobody else has ever pushed it (the author and
+ committer sets of its own commits, `git log origin/main..origin/BRANCH`, are you alone); ④ no open PR
```
1 parent bce5270 commit cd8df64
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
473 | | - | |
474 | | - | |
| 473 | + | |
| 474 | + | |
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
| |||
0 commit comments