Skip to content

AGENTS.md §3 criterion ③ tests the branch's WHOLE ancestry, so --force-with-lease is dead letter for every branch cut from main (measured: 33 pairs vs 1 scoped; control: main itself reads 32) #18178

Description

@claude

Flagged by #17330's dev, which declined to force-push and reported the ambiguity instead of picking a reading — the correct behaviour under 「两条细则冲突 ⇒ 按更严的一条行动并立卡」. Re-measured independently by the domain:devx execution seat before filing. ⛔ Unlabelled for domain:* and ungraded; AGENTS.md is a governed surface, so routing is triage's (likely domain:skills). ⛔ The seat did not dedupe; dedupe words at the bottom.

The text

AGENTS.md:472:477, Multi-agent §3 — a branch is unshared and --force-with-lease allowed only while ALL FIVE hold:

② 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 on it
carries a reviewer or an approval …

The defect: the parenthetical TEST cannot pass for any branch, ever

git log origin/<branch> with no range walks the branch's entire ancestry — which includes all of main. So the author/committer sets are main's whole history plus the agent.

Measured on origin/main and on a live claude/issue-* branch:

reading value
distinct author|committer pairs, git log origin/claude/issue-17330-ambient-roots-app 33
the same, scoped to the branch's own commits (<merge-base>..tip) 1Claude|Claude
control — the same test on origin/main itself 32

⇒ The 33 is simply main's 32 plus the agent. The control is what makes this a defect rather than an observation about one branch: any branch cut from main fails the literal test, so criterion ③ can never be satisfied and the entire §3 allowance is dead letter.

⚠️ Note the split: the stated criterion ("nobody else has ever pushed it") is satisfiable and, on the measured branch, plainly true. Only the parenthetical operationalisation is impossible. A reader who follows the words never force-pushes; a reader who follows the intent does. That divergence is the bug.

Why it is worth fixing rather than tolerating

A rule that reads as permission but tests as prohibition costs a real action every time an agent meets it. On #17330 the dev built the clean single commit, verified its tree hash was identical to the pushed tip's, then reset and shipped four wip: commits plus a merge commit rather than take a reading it was not sure of. Nothing was lost that round — GitHub's squash merge takes the PR title and body, so no wip: subject reaches main — but the branch history is noisier than the rule intends to allow, and the next agent pays the same tax.

Suggested repair (⛔ a proposal, not a prescription)

Scope the test to the branch's own commits, e.g. git log <merge-base with main>..origin/<branch>, so it measures what criterion ③ actually says. ⚠️ ⛔ Do NOT loosen the criterion itself — the fix is to the test, not to the bar. Criteria ①②④⑤ are untouched by this card.

Acceptance

  1. The repaired test is run on a real claude/issue-* branch and shown to return the agent alone, with a firing control (a branch that genuinely has a second pusher, or a constructed equivalent) proving it still refuses a shared branch.
  2. ⛔ No change to the five criteria's substance — this is a spelling repair to ③'s parenthetical.
  3. AGENTS.md is governed: whatever PR carries this follows the governed-surface path (⛔ never armed or merged by a lane seat).

Dedupe words

force-with-lease · AGENTS.md multi-agent · unshared branch criteria · author committer sets · git log origin branch


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions