verify-gate
GitHub执行KiwiDesk项目的完整验证门禁,包括调试构建、测试和代码检查。仅在变更触及并发相关代码时运行发布构建。旨在提交或PR前确保代码质量与合规性。
Trigger Scenarios
Install
npx skills add KiwiCanopy/KiwiDesk --skill verify-gate -g -y
SKILL.md
Frontmatter
{
"name": "verify-gate",
"description": "Run KiwiDesk's full verification gate — debug build, tests, and lint (AGENTS.md §3, the Verify step), plus the release build when the change touches concurrency. Use before any commit or PR.",
"argument-hint": "[optional: file\/dir to scope the lint]"
}
Run KiwiDesk's verification gate — the Verify step AGENTS.md §3 delegates here — in order, and report the result of each step. Stop and surface the failure the moment a step fails; do not continue to later steps.
Which gate the change earns
Default to the full gate below. One narrow exception, and it is about running the gate that can catch something rather than about saving time:
- Read
.github/ci-ignore.txt. Never restate that list here — it is the one authority, shared with thechangesjob inci.yml, andCiPathFilterTestsis what keeps it honest. - If
git diff --name-onlyagainst the base is entirely inside that list, the Swift gate cannot be affected: nothing the build, the lint or the suite reads is in it. Skip steps 1–3. - Anything else runs the full gate.
docs/,AGENTS.md,.claude/rules/**and.claude/agents/**are deliberately not on the ignore list, so "it's only prose" is not a reason to skip:RuleCitationTestsandInstructionPinTestsread that tree — including paths a rule file pins, which is whydocs/**is not ignorable — and a prose-only edit there has already shipped a dangling citation. - Additionally, when the change touches
docs/orsite/, run the site build —npm ci && npm run buildinsite/. It is a separate gate, not a substitute: a missing Starlight frontmatter block breaks the site and no Swift test can see it.
Say in the report which gate you ran and why.
Fast inner loop
swift buildswift test -q(one command — the old two-command split died with the #494 tail-hang fix; history and the rest of the test conventions live in.claude/rules/tests.md.-qdrops the ~20k per-test progress lines a green full run prints (#1140); failure issues and the run summary still print, and a red run is re-run--filtered for detail)scripts/lint.sh $ARGUMENTS(omit the argument to lint the repo)
scripts/lint.sh prints warnings that are not failures — only
its exit code decides.
A compiler warning reds CI even though step 1 passes (#1594,
#1596). ci.yml's Build and Test steps ratchet
(-warnings-as-errors, deprecations excepted) and step 1 above
does not, so a new warning — in Sources/ or Tests/ — is a
red PR after a green local gate.
Worse, SwiftPM re-emits nothing for a module it did not
recompile, so a warm tree hides it from a re-run. Before pushing,
check the warning the ratchet would see:
swift build --build-tests -Xswiftc -warnings-as-errors \
-Xswiftc -Wwarning -Xswiftc DeprecatedDeclaration
Step 1 keeps its bare command deliberately: VerifyGateParityTests
scrapes it and requires the identical line in scripts/release.sh
and release.yml's verify job, both of which the ratchet
deliberately exempts.
Release build — conditional
swift build -c release
The release build enables the optimizer and stricter concurrency
diagnostics (e.g. non-Sendable captures in @Sendable closures)
that the debug build silently misses. CI runs it as a parallel
job on every PR (#532), and that job is a required status
check on main — scripts/protect-main.sh's CONTEXTS is
the one copy of which checks are (#487) — so a red release build
cannot merge. It is therefore not a mandatory local step.
Run it locally when the change touches concurrency, @Sendable
boundaries, or Sendable conformances — there the ~2min buys
back a PR round-trip. Otherwise skip it and let CI catch it, and
say in the report that it was skipped and why. Run it locally
anyway for anything landing without a PR, where no check gates
the push.
Report
End with a one-line PASS/FAIL summary per step, marking step 4 PASS, FAIL, or SKIPPED (with the reason). On any failure, show the relevant compiler/test/lint output and stop — the gate has not passed.
Version History
- cfa7caf Current 2026-09-27 10:25


