jackin-release-check

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

jackin-release-check

jackin-release-check

Run the release-readiness gates. Each gate is binary — green passes, red blocks — and the release is ready only when every gate is green (warnings surface but do not block). The commands are the repo's own (from
CONTRIBUTING.md
merge-readiness +
.github/workflows/ci.yml
), never stripped-down substitutes.
运行发布就绪门控。每个门控都是二元判定——绿色通过,红色阻塞——只有当所有门控都为绿色时,发布才就绪(警告会显示但不会阻塞)。所使用的命令均为仓库自身定义的命令(来自
CONTRIBUTING.md
中的合并就绪要求 +
.github/workflows/ci.yml
),绝非简化替代版本。

When to use

使用场景

  • Before cutting a release, or when the operator asks whether the project is release-ready.
  • 在发布版本之前,或者当运维人员询问项目是否已准备好发布时。

When NOT to use

不适用场景

  • Cutting the release itself →
    jackin-release
    (it runs this skill as its first gate).
  • 执行发布操作本身 → 应使用
    jackin-release
    (它会将本技能作为第一个门控运行)。

Process

流程

Run each gate in order; collect a green / red / skip verdict into a one-line-per-gate report.
  1. CI gate.
    gh run list --workflow=ci.yml --branch=main --limit=1 --json conclusion --jq '.[0].conclusion'
    — green only on
    success
    . If
    docker/construct/**
    or
    docs/**
    changed since the last tag (
    git diff --name-only <last-tag>..HEAD -- <path>
    ), also require
    construct.yml
    /
    docs.yml
    green on main.
    Done when every CI workflow that owns a changed path is green.
  2. Static gates.
    cargo fmt --check
    ;
    cargo clippy --all-targets --all-features -- -D warnings
    . Red on any violation.
    Done when both exit 0.
  3. Test gate.
    cargo nextest run --all-features
    ;
    cargo nextest run -p jackin --features e2e --profile docker-e2e
    . Red on any failure.
    Done when both suites pass.
  4. Doc-link gate. Walk internal links under
    docs/content/docs/
    (relative paths +
    href
    s); verify each target file exists. Red only on a broken link to a shipped page; warn on external URLs you cannot reach.
    Done when every internal link resolves.
  5. TODO freshness. Read
    TODO.md
    and
    todo/
    ; flag items referencing completed work or showing no recent activity. Warn — does not block.
    Done when every TODO item is either live or flagged stale.
  6. Security exceptions. Read
    SECURITY_EXCEPTIONS.md
    ; ask the operator whether each entry is still current. Review (blocks) until confirmed or the file is updated and re-read.
    Done when the operator confirms the catalog.
  7. Direct-commit audit.
    git log <last-tag>..HEAD --oneline --no-merges
    ; for each commit,
    gh pr list --state merged --search "<sha>"
    . Warn on commits with no PR — does not block.
    Done when every non-merge commit since the last tag is matched to a PR or listed as ungrouped.
按顺序运行每个门控;将每个门控的“通过/阻塞/跳过”结果汇总到每行一个门控的报告中。
  1. CI门控。执行命令
    gh run list --workflow=ci.yml --branch=main --limit=1 --json conclusion --jq '.[0].conclusion'
    —— 仅当结果为
    success
    时视为通过。如果自上次标签以来
    docker/construct/**
    docs/**
    路径下的文件有变更(通过
    git diff --name-only <last-tag>..HEAD -- <path>
    检查),还需确保main分支上的
    construct.yml
    /
    docs.yml
    工作流执行成功。
    完成标志:所有涉及变更路径的CI工作流均执行成功。
  2. 静态检查门控。执行
    cargo fmt --check
    cargo clippy --all-targets --all-features -- -D warnings
    。只要有任何违规即视为阻塞。
    完成标志:两个命令均返回退出码0。
  3. 测试门控。执行
    cargo nextest run --all-features
    cargo nextest run -p jackin --features e2e --profile docker-e2e
    。只要有任何测试失败即视为阻塞。
    完成标志:两个测试套件均通过。
  4. 文档链接门控。遍历
    docs/content/docs/
    下的内部链接(相对路径 +
    href
    );验证每个目标文件是否存在。仅当指向已发布页面的链接损坏时视为阻塞;无法访问的外部URL仅作为警告。
    完成标志:所有内部链接均可正常解析。
  5. TODO项时效性检查。读取
    TODO.md
    todo/
    目录;标记那些引用已完成工作或长期无活动的项。仅作为警告——不会阻塞发布。
    完成标志:所有TODO项要么仍在进行中,要么已标记为过时。
  6. 安全例外检查。读取
    SECURITY_EXCEPTIONS.md
    ;询问运维人员每个条目是否仍有效。此步骤会阻塞发布,直到运维人员确认或文件已更新并重新读取。
    完成标志:运维人员确认所有条目均有效。
  7. 直接提交审计。执行
    git log <last-tag>..HEAD --oneline --no-merges
    ;对每个提交,执行
    gh pr list --state merged --search "<sha>"
    。对没有对应PR的提交发出警告——不会阻塞发布。
    完成标志:自上次标签以来的所有非合并提交均已匹配到对应的PR,或被列为未分组提交。

Report

报告

One line per gate:
green,
red (block),
warn,
-
skip. A red gate stops the release; a warn surfaces for the operator to accept or fix.
每个门控占一行:
表示通过,
表示阻塞(阻止发布),
表示警告,
-
表示跳过。红色阻塞门控会终止发布流程;警告则会提示运维人员决定接受或修复。

Common mistakes

常见错误

  • Running
    cargo test --locked
    or
    cargo clippy -- -D warnings
    (stripped flags) — those are not the repo's gates; the real commands carry
    --all-targets --all-features
    and use
    nextest
    .
  • Treating a warn as a block, or a red gate as a warn.
  • Skipping the path-specific CI workflows when
    docker/
    or
    docs/
    changed since the last tag.
  • Inventing a doc-link check instead of walking the real
    docs/content/docs/
    tree.
  • 运行
    cargo test --locked
    cargo clippy -- -D warnings
    (简化了参数)——这些并非仓库定义的门控命令;真实命令需携带
    --all-targets --all-features
    参数并使用
    nextest
  • 将警告视为阻塞,或将阻塞门控视为警告。
  • 当自上次标签以来
    docker/
    docs/
    路径有变更时,跳过对应路径的CI工作流检查。
  • 自行编写文档链接检查逻辑,而非遍历真实的
    docs/content/docs/
    目录结构。