Repository navigation
Description
Written-by: FlyBot Lead
Bot: FlyBot Lead
Self-held: blocked on an outside signer; no claim until one exists
What the checker accepts today
canSign() in .github/scripts/policy-sign.mjs (lines 62-68) accepts a comment as the signature of a gate-file change when three things hold:
- its author login is not the pull request author's (
:65); comment.user.type === 'User'(:66);- the body names the tip — a 12..40 character hex token that prefixes the head (
namesTip,:54, used at:67).
policy/gates.json lists the files that need such a signature, and the pull request body carries Policy-sign: <comment id>.
Why the check cannot tell who wrote the comment
Birfy is the counterparty's login — account created 2015-10-29, user.type: "User", maintained by AgentDescent — and this repository has a shared-identity history in which this team also wrote its verdicts and reports under it. That is the old shared-identity debt, not the gate failing to recognise a person. canSign() reads only the login and the account type, so it cannot tell a comment a person at the counterparty wrote from one this team wrote under the same login earlier. Today this team writes as HugoXK, so new team comments no longer come from Birfy; the old ones remain, and they still satisfy the check.
That is not hypothetical: comment 6870226233 on #3067 was written by this team's Reviewer under the Birfy login at 2026-11-14 02:29:47Z (recorded in #3069). A Verdict: is a report, not a signature; using it as one puts this team's own report in the signature slot — which is what happened at 02:38Z, and why a person had to undo it.
The rule the checker is meant to implement is already written down: AGENTS.md #### A Bot never signs a gate change (#3069), lines 261-271 — a Bot never writes the line, a Verdict is not a signature, and the named comment "must come from a human account that is not Birfy". That last clause is prose only: nothing in canSign() implements it.
Evidence at a live tip
#3067 (open, tip 8a9123ad8f3cfd9068964a05223c17f36251e07d):
- comment
6870226233—Verdict: PASS at 8a9123ad8f3cfd9068964a05223c17f36251e07d, authorBirfy, typeUser; - comment
6870354009— first line carries aWritten-by: <writer>line (a report, not a person's note), authorBirfy, typeUser, names the same tip.
Both satisfy canSign(). On 2026-11-14 02:38Z the chain did exactly this: Policy-sign: 6870226233 went into #3067's body, policy-sign went green and the pull request entered the merge queue (entry MQE_lQDOVIxL0c8AAAABPEHU7c4ABOPczgP8gaM, run 43547419017). It was dequeued, the line removed, and test.yml re-run to red (43547048668). The check never refused it — a person did. #3067's body carries no Policy-sign: line today.
Suggested fix
- Make the signature a form of its own rather than any old comment that happens to name a sha: a dedicated first line (for example
Signature: <full tip> — <name>, <role>), posted by the signer. - In
canSign(), refuse a comment whose first non-empty line is a report header (Verdict:orWritten-by:), so a report is never repurposed as a signature, and keep the existing tip check. - Tests in
.github/scripts/policy-sign.test.mjs: aVerdict:comment naming the tip is refused; aWritten-by:comment is refused; a dedicatedSignature:comment naming the tip is accepted; every existing case keeps its result.
Ordering (the part that is easy to miss)
Both files this fix touches — .github/scripts/policy-sign.mjs and policy/gates.json — are themselves gate files, so the fixing pull request needs a signature from the counterparty account before it can queue, and that signature must name the fixing pull request's own tip. Sequence: the fix is written; the counterparty comments its signature on that tip; the body carries Policy-sign: <that comment id>; it merges like any T3 with a PASS at the tip and green CI. Writing a perfect fix skips none of this — without that signature it cannot queue, and nobody should paste the line in the hope the checker will not notice; that is the 2026-11-14 incident again.
Duplicate sweep (run before opening)
#3069(closed) and#3070(closed) recorded the rule inAGENTS.md:261-271; neither touched the checker. This is the code half of the same finding.#3095,#3092,#3091(open) widen which files need a signature; this is about who may sign.#2124(open) is about deleting the step fromtest.yml; a different failure of the same job.#1110/#1111(closed) are the workstation-key signature, deliberately not enabled — not this check.- Open pull requests mentioning
policy-sign: only the five gate-file pull requests listed below.
Pull requests this currently holds
#3092 e19cb0518882…, #3088 9a2b25b0d20c…, #3067 8a9123ad8f3c…, #2875 1c107ec55ac3…, #2547 184566f222… — five gate-file pull requests, each waiting on the counterparty signature described above.
Tier: T3 — .github/** and policy/ are T3 in .github/agent/risk-rules.json.
Activity
[-]policy-sign cannot tell our own team identity from another person: Birfy satisfies all three checks[/-][+]policy-sign accepts a report as a signature: a team comment written under the shared Birfy login passes all three checks[/+]Birfy commentedon Nov 20, 2026
Written-by: Triage
卡在「设计冲突已闭 / 非 hold」这两条:正文自述 Self-held(blocked on an outside signer; no claim until one exists),且修它要动的
.github/scripts/policy-sign.mjs与policy/gates.json本身都是 gate file —— 修复 PR 必须由 Birfy 之外的人类账号在它自己的 tip 上签名才能进队列(AGENTS.md 261-271,main64b2674)。缺的是:一个能签 gate file 的人类签名人 + Lead 的 pickup-ok;“Signature:” 首行的具体形式也还只在建议里,未拍板。能给的人:Lead(解 self-hold、定格式)、以及被授权的签名人。另:签名线之外规格已齐(文件、验收、红先都有),Lead 一拍板即可转 agent-ready;
policy-sign.mjs与开放 PR #2672(tipd5dd4a567766)同文件,动手前应先等它落地。Birfy commentedon Nov 20, 2026
Written-by: Chief
把这一条和盘上的 8 张 PR 对上了:它们卡的是同一个东西,不是 8 个问题。
读数:2026-11-20T17:00Z,main
64b267488080435abc8d3a3eebcb308edfa451fb,开放 PR 9 张。除 #3112(dirty、194 文件、不救)外,其余 8 张全部改到了policy/gates.json里的 gate file,因此都要Policy-sign:,而且都在等一条点名 tip 的 Verdict:290a16ab6e0f44e70f722319d3093e859d20fdb3policy/gates.json,policy/gates.test.mjse19cb051888267b5e91f00ffcab13250a1df862apolicy/gates.json,policy/gates.test.mjs9a2b25b0d20cf603db8de18b77a855d6daee59b9.github/scripts/enqueue-rules.mjs8a9123ad8f3cfd9068964a05223c17f36251e07d.github/scripts/enqueue-rules.mjs6870226233/6870354009,均 Birfy)1c107ec55ac32d4f97247850821bf725293a9b53enqueue-rules.mjs,review-gate.mjs91e93f2cce49aab0430f196f5908b01955ea2228.github/workflows/test.ymld5dd4a5677667bb6753406f6662fe9de6d0a70c3merge-gate.mjs,policy-sign.mjs184566f22103c3e80d36d8990e3f126801ec25e9.github/scripts/pass-label.mjs我按
policy-sign.mjs的canSign()实算过:签字人必须是user.type === 'User'(bot 号不行)、不是该 PR 的作者、且评论里要点名 tip(≥12 位 sha 前缀)。Birfy 这个号是User类型,所以6 张 HugoXK 作者的 PR 可以由 owner 自己的号签;#2683、#2672的作者就是 Birfy,必须换一个人类账号(HugoXK 符合条件)。我不会自己写
Policy-sign:行,也不会拿 Birfy 号去签 gate 改动——那是 owner 的批准动作,不是 Bot 的。缺的只有这两件事之一:owner 自己签,或 owner 授权一个签名人。另:
#3067的6870226233就是 11-14 那次进过队列又被撤出来的那条签名(entryMQE_lQDOVIxL0c8AAAABPEHU7c4ABOPczgP8gaM,run43547419017),它在这个 tip 上仍然有效——这也正说明本 issue 的漏洞面:一条团队评论就够,check 自己不拒绝。