Skip to content

chore: 本地 pre-push 门禁补回 lint + OpenAPI 漂移(CI 移除后)#33

Merged
XZZKANY merged 1 commit into
masterfrom
chore/local-prepush-gate
Jun 29, 2026
Merged

chore: 本地 pre-push 门禁补回 lint + OpenAPI 漂移(CI 移除后)#33
XZZKANY merged 1 commit into
masterfrom
chore/local-prepush-gate

Conversation

@XZZKANY

@XZZKANY XZZKANY commented Jun 29, 2026

Copy link
Copy Markdown
Owner

背景

CI 于 2026-06-30 整体移除(PR #31 squash 含 5d22b27ci.yml/e2e.yml),lint 与 OpenAPI 漂移两道快门禁失去自动拦截。按决策补回——用本地 pre-push git hook(无 CI 基建,仍有拦截)。

变更

  • .githooks/pre-push:跑 pnpm run verify:fast
  • scripts/check-openapi-drift.mjs:记录 digest → pnpm openapi → 比对,漂移即 exit 1(逻辑镜像 verify-local.mjs:71-94)。
  • package.json:verify:fast(lint + check:drift)、check:drifthooks:install(git config core.hooksPath .githooks)。
  • docs/internal/next-step-plan.md:顶部加 2026-06-30 更新横幅(CI 移除、阶段0 完成、Q1/Q4 具体化指针)+ 横切 DoD / 执行进度同步。

启用 / 绕过

  • 启用(每个 clone 一次):pnpm hooks:install
  • 绕过单次:git push --no-verify

边界

仅覆盖 lint + 漂移;不含已炸的 desktop typecheck(frontend 未入 workspace)与慢 pytest,全量仍须 pnpm verify。hook 是本地防线、可绕过,非强制门禁(贴合无 CI 决定)。

验证

本 PR 的 push 即由该 hook 实跑拦截:pnpm run verify:fast → eslint 0 errors(2 既有 warning)+ prettier clean(含新 .mjs)+ [check:drift] OpenAPI 契约无漂移,通过才放行。详见 .codex/verification-report.md

🤖 Generated with Claude Code

CI 于 2026-06-30 整体移除(PR #31 squash 含删 ci.yml/e2e.yml),lint 与 OpenAPI
漂移两道快门禁失去自动拦截。新增本地 pre-push hook 补回:

- .githooks/pre-push 跑 pnpm run verify:fast
- scripts/check-openapi-drift.mjs:记录 digest→pnpm openapi→比对,漂移即 exit 1
- package.json:verify:fast / check:drift / hooks:install(set core.hooksPath)

一次性 pnpm hooks:install 启用,绕过用 git push --no-verify。仅覆盖 lint+漂移两道快门禁
(不含已炸的 desktop typecheck 与慢 pytest),仍须 pnpm verify 手动全量。
next-step-plan.md 同步顶部更新横幅 + CI/阶段0/Q1 相关条目。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@XZZKANY
XZZKANY merged commit 60ae779 into master Jun 29, 2026
@XZZKANY
XZZKANY deleted the chore/local-prepush-gate branch June 29, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant