Repository navigation
docs(agents): state how a green PR lands, and the governed-surface exception - #1798
Merged
Merged
Conversation
…ception AGENTS.md said nothing about what a seat does with a finished, green PR. The repository permits auto-merge, so the capability existed while the authorisation did not — and an unwritten rule is re-derived by every seat, which is where seats diverge, invisibly, until the divergence produces a merge nobody authorised. Maintainer ruling on #1742, decision batch #81: a seat may take a PR out of draft and arm auto-merge once every check has finished with none failed, unless the diff touches a governed path (AGENTS.md, CLAUDE.md, .claude/**, .github/instructions/**), in which case the PR stays a draft and the maintainer merges it. "Every check green" is written as finished-and-none-failed because two checks here are routinely neither green nor red: Check Changeset concludes `skipped` under the skip-changeset label, and link-check never runs on a diff carrying no .md. No required-checks list is invented, because none was ruled. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PpRjGNnwyo2J1rrmekxB1W
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced Sep 8, 2026
huangyiirene
marked this pull request as ready for review
September 8, 2026 15:25
This was referenced Sep 9, 2026
zhuangjianguo
pushed a commit
that referenced
this pull request
Sep 9, 2026
… a PR "At least one approval required" described nothing in force. Measured twice: PR #1795 merged with zero reviews of any kind, and the active `main` ruleset (id 12187346) carries a `pull_request` rule whose `required_approving_review_count` is 0. The bullet is replaced by a pointer to `AGENTS.md` §How a green PR lands, the section #1798 landed as the single answer to who may land a PR and when — the same "state the rule, link the runbook" shape §Publishing already uses for `docs/RELEASE_STRATEGY.md`. The CI, no-conflict and squash bullets are unchanged and all three remain true. No branch-protection change: the ruling refused that option rather than deferring it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017FzrA1G4U89KEMf7wfLmqq
This was referenced Sep 9, 2026
zhuangjianguo
pushed a commit
that referenced
this pull request
Sep 9, 2026
…f to AGENTS.md §How a green PR lands told every seat that a green, non-governed PR lands by arming auto-merge, and deliberately never named a merge queue — the premise being that this repo has none. The premise is false: ruleset `main` (id 12187346, enforcement active) carries a `merge_queue` rule, and every recently merged PR shows `added_to_merge_queue` / `removed_from_merge_queue` by `github-merge-queue[bot]`. The gesture is unchanged and nothing is rolled back: arming auto-merge enqueues. This is a description defect, not a broken procedure. Every existing sentence in the section is left byte-identical; the mechanism is added as one paragraph, and the provenance blockquote records why #1798 omitted it. The section deliberately does not present `min_entries_to_merge_wait_minutes: 5` as a wait to expect. Nine merged PRs each took 17-20s from enqueue to merge; the parameter caps how long the queue gathers a group and never engages while `min_entries_to_merge` is 1. PR #1795's cited "5m40s" was 5m18s as a draft, 5s to enqueue, 17s in the queue. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017FzrA1G4U89KEMf7wfLmqq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1742
AGENTS.md§✅ Verifying changes gains one subsection, How a green PR lands, plus an empty-frontmatter changeset. No workflow, no script, no gate, no automation — the card is about writing the rule down, and a gate is a separate decision nobody has made.What it says
A seat may take a PR out of draft and arm auto-merge once every check has finished with none failed, unless the diff touches a governed path —
AGENTS.md,CLAUDE.md,.claude/**,.github/instructions/**— in which case the PR stays a draft and the maintainer merges it. Maintainer ruling on #1742, decision batch #81 (issuecomment-5578141346), option A, chosen over "every PR waits for the maintainer".The governed set is transcribed exactly as ruled: not widened, not narrowed, no "and anything sensitive" clause.
AGENTS.md, so it is itself governed: it stays a draft, has no auto-merge, and is the maintainer's own merge. The rule documenting itself.Three measurements that changed the text
1. The filer's "zero hits" is off by one — the gap is still real
Re-ran the search at
f1fc2127, same six terms, same four scopes (AGENTS.md,CONTRIBUTING.md,docs/**,.github/**), case-insensitive:auto-mergeautomergemerge queuemerge-queuesquashready-for-reviewThe hit is
CONTRIBUTING.md:210—Branch will be squash-merged, inside §Getting Merged. It states merge mechanics and never says who may perform the merge, so it does not close #1742's gap; but "zero" was not right, and the section it lives in has a worse problem. Filed separately as #1797: that same list says "At least one approval required", and PR #1795 merged withget_reviewsreturning[]. ⛔ Not fixed here — different file, different reader, and #1742 isAGENTS.md-only.Counts are
grep -con matching lines, notgrep -ooccurrences.2. "Every check green" was not writable as-is
Two checks in this repo are routinely neither green nor red, so a literal reading is undecidable:
Check Changesetconcludesskippedunder theskip-changesetlabel —changeset-check.yml:14isif: "!contains(github.event.pull_request.labels.*.name, 'skip-changeset')". Observed on PR chore(deps): bump better-sqlite3 from 12.11.1 to 13.0.3 #1058:"name":"Check Changeset","conclusion":"skipped".link-checknever runs at all on a diff carrying no Markdown —link-check.yml'spull_requesttrigger is filtered to'**/*.md','**/*.mdx'. Observed by contrast: present on PR ci(labels): declare the 22 live-but-undeclared labels in the manifest #1795, absent from PR chore(deps): bump better-sqlite3 from 12.11.1 to 13.0.3 #1058's eight check runs entirely.The text therefore says finished and none failed, and names both cases. ⛔ No required-checks list is invented, because none was ruled. A third check,
Vercel Preview Comments(details_urlvercel.com/github, concludes success in 0s), is a non-CI check that exists on every PR — it is covered by the same wording without needing to be named.3.⚠️ The ruling's "merge queue" sentence does not hold in this repo — so it is not written down
The ruling closes with "The merge queue remains the only route in (a direct merge returns 405)." Measured, that is an objectstack fact, not a hotcrm one:
merge_groupgrep -rn merge_group .github/exits 1)refs/heads/gh-readonly-queue/*on originhotcrm has no merge queue. PR #1795 is consistent with this: its
base.shaisdbe0ce16, but#1794landed before it merged, and it merged anyway at14:17:38without a queue rebuild.⇒ the section says arm auto-merge, the mechanism this repo actually has (
allow_auto_merge: true), and keeps the ruling's intent — ⛔ never merge by hand — without naming a queue that does not exist here. Writing "merge queue" into the reference repo'sAGENTS.mdwould have sent every future seat looking for one. The 405 claim itself was not tested: testing it means attempting a merge, which is forbidden.Placement
New
###inside the existing## ✅ Verifying changes, after### Every PR carries a changesetand before### Verifying UI in the browser. That section is already the PR lifecycle in order — verify, then changeset — and landing is the next step; the browser subsection is a how-to appendix that reads fine after it. No new top-level section needed.Verification
Full chain, exit code captured before any pipe (
pnpm verify > /tmp/verify.log 2>&1; EXIT=$?):Chain is
validate && typecheck && lint && lint:i18n-gate && hygiene && hygiene:tokens && build && test. Gate-printed verdict lines:✓ Validation passed (1544ms),✓ i18n lint gate: 0 i18n/missing-* issues,✓ source hygiene clean,✓ source token ratchet clean,✓ Build complete (2413ms), andTest Files 165 passed (165)/Tests 3453 passed | 1 skipped (3454).line_budget: N/A on the gate's own printed scope line, not by assertion —check-source-token-ratchet.mjsprintsauthored surface: src/**/*.ts minus src/translations, src/data, and this diff is one.mdplus one.changeset/*.md. Run anyway:EXIT=0,✓ source token ratchet clean, and its residual list (not in a headline layer) is entirelysrc/subdirectories — noAGENTS.md, no.changeset.link-checkis in scope for this PR, since the diff carries.md. No link was added: the added lines contain no URL and no Markdown link syntax (grep -oEfor both over the+lines exits 1). Issue references are plain#nnnntext.Control characters:
grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]'over both changed files exits 1 (clean), independently of thehygienegate's own✓ no raw control bytes in first-party files.Fence:
test/**(epic #1579) not touched —git status --porcelainlists exactlyM AGENTS.mdand the new changeset, nothing else.Changeset: empty-frontmatter, the sanctioned "releases nothing" declaration documented in
changeset-check.yml:33-34and:66-67. Precedent for this exact shape is.changeset/agents-md-pure-metadata-principles.md(AGENTS.md-only, empty frontmatter, reason stated). Nothing here ships to HotCRM users: no object, field, view, label, flow or hook.Files changed
AGENTS.md— +19 / -0, insertion only; no existing line rewritten, reordered or deleted.changeset/agents-md-states-how-a-green-pr-lands.md— newNoted, not filed
CONTRIBUTING.md§Getting Merged is the natural place to link this from, and the §Publishing note in the same file is the local model for "state the rule, link the runbook". No link was added, deliberately: the section it would point into is the oneCONTRIBUTING.md§Getting Merged states "At least one approval required" — measured: PRs land with zero reviews, and it is now the second answer to the question #1742 just wrote down #1797 says is wrong, andAGENTS.mdshould not cite it until that is settled.维护者速读(草稿)
改了什么 —
AGENTS.md加了一小节「How a green PR lands」:CI 全部跑完且没有失败的 PR,如果没碰治理面(AGENTS.md、CLAUDE.md、.claude/**、.github/instructions/**),席位可以自己翻 ready 并挂自动合并;碰了治理面的,保持草稿、由你手工合并。就是你在决策批次 #81 回的那个 A。为什么改 — 这条规矩本来就在执行,只是没写下来。没写下来的规矩每个 agent 都要自己重新推一遍,而推导正是它们分岔的地方——分岔在造成一次错误合并之前完全看不见。三个兄弟仓都写了,hotcrm 是唯一沉默的,而它是参考实现。
风险与代价(含回滚) — 风险很低:一段散文,不新增任何能力、机制或门禁,仓库设置本来就允许自动合并。回滚就是 revert 这一个 commit,没有数据迁移、没有配置变更、没有别的文件依赖它。
merge_group,origin 上 0 个队列分支;objectstack 分别是 10 和 4)。所以正文写的是「挂自动合并」这个本仓真实存在的机制,保留了「席位不手工合并」的原意。如果你的本意确实是要给 hotcrm 上合并队列,那是另一张卡,这段话要改。席位意见 — (留空,待你裁定)
你要做的 —⚠️ 这张 PR 自己就是治理面(它改的就是
AGENTS.md),所以它保持草稿、不挂自动合并、等你手工合并——这正是它写下来的那条规矩作用在它自己身上。你只需要:确认上面那处措辞偏差可以接受,然后合并它。顺带一提,CONTRIBUTING.md里「至少一个 approval」那条是假的(PR #1795 零 review 就合了),已单独立成 #1797,不在这张 PR 里动。🤖 Generated with Claude Code
https://claude.ai/code/session_01PpRjGNnwyo2J1rrmekxB1W
Generated by Claude Code