chore: 本地 pre-push 门禁补回 lint + OpenAPI 漂移(CI 移除后)#33
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
CI 于 2026-06-30 整体移除(PR #31 squash 含
5d22b27删ci.yml/e2e.yml),lint 与 OpenAPI 漂移两道快门禁失去自动拦截。按决策补回——用本地pre-pushgit 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:drift、hooks:install(git config core.hooksPath .githooks)。docs/internal/next-step-plan.md:顶部加 2026-06-30 更新横幅(CI 移除、阶段0 完成、Q1/Q4 具体化指针)+ 横切 DoD / 执行进度同步。启用 / 绕过
pnpm hooks:installgit 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