Skip to content

chore: add ASF source headers and a RAT release gate #3271

Closed

Description

@M4n5ter
English

Part of #2974 — G4: source headers and RAT.

Outcome

Apply the agreed ASF source-header policy and enforce it with an automated audit
of the source release candidate.

Exit criteria

  • Define the file types, generated files, third-party files, fixtures, and
    other justified exclusions covered by the header policy.
  • Add ASF license headers to applicable tracked source files.
  • Record the mechanical header-only change in .git-blame-ignore-revs if
    the project decides that is appropriate.
  • Add Apache RAT or an equivalent mentor-approved audit with a reviewed
    exclusion list.
  • Run the audit against the extracted source archive, not only the Git
    checkout.
  • Make the release workflow fail on an unexpected unapproved file.
  • Update DISCLAIMER-WIP when its missing-header disclosure is no longer
    true.

Existing work

PR #3397 implements this gate. The boxes above record what that pull request
does; none of it is on main until it merges.

Two exit criteria stay open on purpose:

  • The audit is an equivalent Node implementation rather than Apache RAT. The
    reasoning is in the pull request, and it needs mentor confirmation before it
    counts as the "mentor-approved equivalent" this issue asks for.
  • .git-blame-ignore-revs carries the placeholder entry the file's own
    convention requires. Because this repository squash-merges, the landed hash
    goes in a follow-up right after the merge: a hash that never reaches main
    makes git blame fail outright.

Out of scope

  • Rewriting NOTICE or auditing third-party license classifications.
  • General formatting or unrelated source cleanup.

References

Ownership

Leave this issue unassigned until explicitly claimed.

简体中文

#2974 的一部分——G4:源码 headers 与 RAT。

目标结果

落实约定的 ASF 源码 header 策略,并通过源码 RC 的自动化审计持续执行。

完成条件

  • 定义 header 策略覆盖的文件类型,以及 generated files、third-party files、
    fixtures 和其他合理排除项。
  • 为适用的已跟踪源文件添加 ASF license headers。
  • 如果项目认为合适,将纯机械 header 变更记录到 .git-blame-ignore-revs。
  • 添加 Apache RAT 或 mentors 认可的等效审计,并使用经过审查的排除清单。
  • 对解压后的源码归档运行审计,而不只是检查 Git checkout。
  • 出现未预期且未经批准的文件时,让发版 workflow 失败。
  • 当缺少 header 的问题解决后,更新 DISCLAIMER-WIP 中不再成立的披露。

已有工作

PR #3397 实现了这一 gate。上面的勾选记录的是该 PR 的内容;在它合入之前,这些都不在
main 上。

有两条完成条件是有意保持开放的:

  • 审计采用等效的 Node 实现而非 Apache RAT。理由写在 PR 描述里,需要 mentor 确认后
    才算本 issue 要求的"mentors 认可的等效审计"。
  • .git-blame-ignore-revs 目前只有该文件自身约定要求的占位条目。由于本仓库采用
    squash-merge,落地 hash 需要在合并后的 follow-up 中补上:main 上不存在的 hash 会
    让 git blame 直接报错。

不在范围内

  • 重写 NOTICE 或审计第三方许可证分类。
  • 一般格式化或无关源码清理。

参考资料

负责人边界

明确认领前保持 unassigned。

Activity

  1. Astro-Han commented on Aug 21, 2026

    @Astro-Han
    Contributor

    Claiming this.

    Draft PR: #3397

    It applies the header policy and enforces it with an audit that runs inside the extracted source archive, reusing the G2 archive path from #3278/#3332 rather than adding a second one. Two commits: policy + audit + release gate, then the mechanical sweep.

    Two points that need a decision rather than more code:

    1. RAT equivalence. The PR implements an equivalent Node audit instead of Apache RAT. Reasons are in the PR description; the short version is that RAT would add a JVM and a downloaded jar to the path a voter is expected to reproduce, and its glob exclusions fail open, while this audit fails closed on any file that matches neither a header rule nor a reviewed exclusion. This still needs mentor confirmation to count as the "mentor-approved equivalent" this issue asks for. If mentors want literal RAT output, the policy data carries over to a rat-excludes file, but the fail-closed property does not.

    2. .git-blame-ignore-revs. That file's own convention requires hashes that exist on main, and this repository squash-merges, so the PR adds the placeholder entry and the landed hash goes in a follow-up right after the merge. An unknown hash makes git blame fail outright.

    The exclusion list is the part that needs human review, not the header insertion — npm run check:asf-headers -- --report prints every rule with its justification and the exact files it claims.

    Merging the sweep will require open pull requests to rebase.

    Prepared with Claude Code; the exclusion rules and their justifications are AI-drafted and need a human contributor of record to confirm them.

  2. self-assigned this
    on Aug 21, 2026
  3. 17 remaining items

  4. added theissue type on Aug 29, 2026
  5. Astro-Han commented on Sep 1, 2026

    @Astro-Han
    Contributor
    English

    Status: six of seven criteria met, and the last one does not gate a candidate

    The header audit ran clean against the extracted candidate in the 2026-08-28 Prepare ASF source candidate run on 9343da93: 2,744 covered files plus 131 reviewed exclusions, with no missing, duplicate, stale, or unreviewed-provenance result.

    The .git-blame-ignore-revs criterion is already done and should be ticked. #3501 (3bb0146578, 2026-08-23) replaced the placeholder left by #3397 with the landed squash hash c633ea5b2524d9463228e01f8d369ef9166c3f05. The file still carries one unfilled placeholder, but it belongs to the Biome format baseline (#415) from 2026-07-19 and is unrelated to the ASF header sweep or to this release.

    The mentor-approved RAT equivalent is the only criterion left, and it belongs in the vote. #2974 has been restructured so header completeness is checked by voters against the exact candidate — "source files carry ASF license headers, or DISCLAIMER-WIP discloses the gap" is now a line in the vote email's verification checklist. That is where ASF projects verify this property, and where mentors, as IPMC members, give the confirmation this criterion asks for. Keeping the criterion is still worthwhile if we want the Node implementation blessed as the standing equivalent, but as a follow-up rather than a gate.

    Suggest ticking the .git-blame-ignore-revs box and retitling the issue to reflect that it is now a post-RC1 follow-up rather than a release gate.

    简体中文

    进展:7 条已满足 6 条,最后一条不构成候选版本的门槛

    许可头审计在 2026-08-28 针对 9343da93 的 Prepare ASF source candidate 运行中,对解压后的候选包执行通过:2,744 个覆盖文件加 131 个已审查排除项,无缺失、重复、过期或未审查来源的结果。

    .git-blame-ignore-revs 这一条已经完成,应当勾上。 #3501(3bb0146578,2026-08-23)已把 #3397 留下的占位条目替换为落地的 squash 哈希 c633ea5b2524d9463228e01f8d369ef9166c3f05。文件中仍有一个未填的占位条目,但它属于 2026-07-19 的 Biome format baseline(#415),与本次 ASF 许可头扫描和本次发布无关。

    导师认可的 RAT 等价物是唯一剩下的一条,而它属于投票。 #2974 已重构,许可头完整性改由投票人针对确切候选包检查——「源文件带 ASF 许可头,或 DISCLAIMER-WIP 已披露缺口」现在是投票邮件验证清单中的一行。这正是 ASF 项目核验这一性质的地方,也正是导师作为 IPMC 成员给出本条所要求确认的地方。如果我们希望把 Node 实现正式确立为常设等价物,保留这条仍有价值,但应作为后续项而非门禁。

    建议勾上 .git-blame-ignore-revs 一条,并改写标题,反映它现在是 RC1 之后的后续项,而不是发布门禁。


    Drafted with help from Claude Code. I reviewed the final text and take responsibility for posting it.

  6. Astro-Han commented on Sep 2, 2026

    @Astro-Han
    Contributor

    Closing: six of seven criteria are met on main (#3397, #3501), the audit runs clean against the extracted candidate, and the remaining one — a mentor's confirmation that the Node audit is an acceptable RAT equivalent — is now a line in the vote email's verification checklist under #2974, which is where IPMC members give that answer. Nothing further lands from this issue.

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

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions