Skip to content

policy-sign does not cover the risk-tier data: risk-rules.json and its test can change without a human signature #3091

Open

Description

@HugoXK

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.

Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: da93569a1a5948fbb832b05330c7d0cb
Branch: dev/1-policy-sign-covers-tier-data
Base: 3e901fa
At: 2026-11-15T00:49:03Z

Bot: FlyBot Dev-1
Tier: T2 (policy/ is not a T3 path, so both files fall to the unknown-path default T2; the signature is required by gateFiles, not by the tier)

Dedupe (live main 3e901fab + closed issues): gateFiles → 44 hits; the only open ones are #2731 (a composite action that test.yml uses is not listed — different file class), #2124 (a signature step that can be deleted), #2671 (a parse gap) — none covers the tier data. #2093/#2095 (queue gates not covered) are closed and were about the gate scripts. risk-rules.json → no open issue about gating the data itself. No open issue or PR lists .github/agent/risk-rules.json for this gate.

What is wrong

policy/gates.json gateFiles lists the checker .github/scripts/risk-gate.mjs, but not the data it reads: .github/agent/risk-rules.json, nor the test that pins the split, .github/scripts/risk-gate.test.mjs. So the file that decides what counts as T3 — for every later pull request in this repository — can be rewritten by a pull request that carries no human signature.

#3089 is the live example: it moved new Function\( and \beval\( from tiers.T3.diffPatterns to tiers.T3.diffPatternsNotInTests, which changes the tier every future pull request is given, and it landed on 3e901fab at 2026-11-15T00:47:11Z with policy-sign green because gateFiles() returns [] for its two files.

policy/ itself is already covered as a directory entry, so policy/gates.json cannot be changed without a signature — this issue is only about the two files outside it.

Fix

Two entries in policy/gates.json gateFiles:

  • .github/agent/risk-rules.json
  • .github/scripts/risk-gate.test.mjs

Nothing else: no other file class, no rule change, no reordering of the list.

Acceptance, red first

In policy/gates.test.mjs (the existing test for this list), at base 3e901fab:

  1. gateFiles(['.github/agent/risk-rules.json']) is empty today and must return that entry — red before the edit, green after.
  2. gateFiles(['.github/scripts/risk-gate.test.mjs']) likewise.
  3. A change to the tier data with a body that carries no Policy-sign: line must be refused by the same decision the checker takes; a body carrying the line is accepted. Red before the edit (the change is not seen as a gate change at all).
  4. Controls: .github/scripts/risk-gate.mjs is still a gate change (unchanged), and an ordinary client file is not.

Landing note

This pull request changes policy/gates.json, which is itself a gate file, so its own policy-sign will be red until a human writes Policy-sign: <comment id> into the body naming a comment from someone other than the PR author. That is the intended shape, not a defect: the owner keeps the veto on widening the signature surface. Bot accounts cannot sign, so the Dev must not try.

Activity

  1. HugoXK commented on Nov 15, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-15T02:47:30Z

  2. HugoXK commented on Nov 15, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-15T04:45:26Z

  3. HugoXK commented on Nov 15, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-15T06:21:57Z

  4. HugoXK commented on Nov 15, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-15T06:44:54Z

  5. HugoXK commented on Nov 15, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-15T08:45:47Z

  6. HugoXK commented on Nov 15, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-15T12:45:05Z

  7. HugoXK commented on Nov 16, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-16T00:45:00Z

  8. HugoXK commented on Nov 16, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-16T02:45:02Z

  9. HugoXK commented on Nov 16, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-16T04:44:42Z

  10. HugoXK commented on Nov 16, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-16T06:44:49Z

  11. HugoXK commented on Nov 16, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-16T08:45:01Z

  12. HugoXK commented on Nov 16, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-16T10:44:42Z

  13. HugoXK commented on Nov 16, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-16T12:44:46Z

  14. HugoXK commented on Nov 17, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-17T00:46:59Z

  15. HugoXK commented on Nov 17, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-17T03:29:23Z

  16. HugoXK commented on Nov 17, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-17T04:46:15Z

  17. HugoXK commented on Nov 17, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-17T07:02:09Z

  18. HugoXK commented on Nov 17, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-17T08:45:09Z

  19. HugoXK commented on Nov 18, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-18T00:12:42Z

  20. HugoXK commented on Nov 18, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-18T00:49:58Z

  21. HugoXK commented on Nov 18, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-18T02:51:46Z

  22. HugoXK commented on Nov 18, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-18T05:05:31Z

  23. HugoXK commented on Nov 18, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-18T06:44:44Z

  24. HugoXK commented on Nov 18, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-18T08:44:44Z

  25. HugoXK commented on Nov 18, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-18T10:44:41Z

  26. HugoXK commented on Nov 18, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: da93569a1a5948fbb832b05330c7d0cb
    At: 2026-11-18T12:44:46Z

  27. Birfy commented on Nov 20, 2026

    @Birfy
    Collaborator

    Written-by: Triage

    PR #3092 已开放,tip e19cb0518882,卡在 gate file 签名线(tip 上 gate checks 红)。

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-prPull request opened by an agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions