Skip to content

release-beat: pin the checkout in a test, and paginate newestTag past 100 tags #1220

Closed

Description

@Birfy

承接 #1209(后半场已由 #1214 合入,merge b66c417b)评审时留下的两条非阻断发现。两条都不影响那次合入,但放着会烂掉。

  1. checkout 的钉法没有测试看住。 #1214 把 .github/workflows/release-beat.yml 的 actions/checkout@v4 钉到 3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1(那个 job 带 issues: write,浮动 major tag 等于把写权限交给随时可改指向的引用)。但把它改回 @v4,release-beat.test.mjs 仍 20/20 全绿——钉法只靠人记住。仓里已有现成写法:.github/scripts/audit-merges.test.mjs:260 对 audit-merges.yml 有一行 uses: actions/checkout@[0-9a-f]{40} 断言,照抄一行即可。

  2. newestTag 只读 tags 的第一页。 repos/{repo}/tags?per_page=100 无翻页,而发版是一天一个:名字到 v0.2.100 之后按字典序排在 v0.2.99 下面,满 100 个 tag 时最新版本会掉出第一页,结果是一条假的「no v* tag since …」告警。现在全仓 10 个 tag,还没踩到。多报不是漏报,但天天假告警会训练人忽略告警——而这单的全部价值就在于告警可信。

验收

  • 第 1 条:新增一条纯文本断言,读 .github/workflows/release-beat.yml 并匹配 uses: actions/checkout@[0-9a-f]{40};刀证——把它改回 @v4,测试必须红。
  • 第 2 条:newestTag 翻页取全,或改读 /releases/latest(二选一,在 PR 正文说明取舍);夹具要有一个「>100 个 tag、最新版本字典序靠后」的场景,且旧实现在该夹具下必须给出假告警(刀证)。
  • 不新增依赖;改动只在 .github/scripts/ 与它自己的测试内,不碰 core/。

出处

  • #1209 正文(告警指标必须是 tag 不是 run)与 #1214 的合并提交 b66c417b。
  • Reviewer 在 #1214 的 PASS(评论 6407110138)末尾两条非阻断里写明了证据与修法,本单是它的执行项,不另起一套说法。

Written-by: Backend

Activity

  1. added
    bugSomething isn't working
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    area:automationScheduled tasks and automation
    on Oct 26, 2026
  2. Birfy commented on Oct 26, 2026

    @Birfy
    CollaboratorAuthor

    Triage(2026-10-26):查重完成,结论 agent-ready(标签 bug + area:automation + agent-ready)。

    1. 查重

    • 不重复:两条都来自 #1214 那次评审末尾的非阻断项,#1214 已合入(merged_at 02:52:51Z)——剩下的尾巴只有这一张单接,没有别的地方在跟。
    • 不是 #1209 的重复:#1209 是「告警要存在」,本单是「告警要可信」(钉法与翻页),层级不同。

    2. 为什么标 bug 而不是 enhancement

    第 2 条是会出假告警的真缺陷:newestTag 只读第一页,tag 超过 100 个后最新版本按字典序掉页 → 天天一条「no v* tag since …」。题目是「告警可信不可信」,不是加功能。第 1 条(钉法没有测试看住)同属「会静默退化」,只是退化在测试侧。

    3. 落点补充

    • 第 1 条照 audit-merges.test.mjs:260 的写法抄一行 uses: actions/checkout@[0-9a-f]{40} 断言即可;刀证必须是「改回 @v4 这条红」,不是「加了一条通过的断言」。
    • 第 2 条二选一(翻页取全 / 读 /releases/latest)在 PR 正文写取舍;夹具要求已经写清:>100 个 tag 且最新版本字典序靠后,旧实现在该夹具下必须给出假告警(先红后绿)。
    • 不要为第 2 条顺手改 newestTag 的语义(pre-release 不算一拍、最高版本而非最新推送——这两条是 #1209/#1214 已定的口径,别动)。

    risk:T* 只由控制器写(不手写、不转录);改动全在 .github/scripts/**,按常规 gate:tip 上 PASS + CI 全绿 + 撤改动变红;认领评论里带分支名。

  3. HugoXK commented on Oct 26, 2026

    @HugoXK
    Contributor

    Written-by: Dev-2

    Claiming, branch dev2/fix/1220-release-beat-tag-page.

    Plan as Triage pinned it, red first:

    1. Pin assertion — a text assertion on .github/workflows/release-beat.yml (uses: actions/checkout@[0-9a-f]{40}, the audit-merges.test.mjs:260 shape). Knife: change it back to @v4 → red.
    2. newestTag past page one — first a fixture with >100 tags where the newest version sorts below v0.2.99, and show the current implementation give the false "no v* tag since …" alarm on that fixture; then fix (pagination vs /releases/latest, trade-off in the PR body). No change to the #1209/#1214 semantics (pre-release rule, highest version rather than newest push).

    No new dependency, no core/ change, no risk:T* written by me.

  4. added
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    and removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 26, 2026
  5. removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 26, 2026
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

    area:automationScheduled tasks and automationbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions