关联规范
背景
本次会话中 verify full 被多次运行:手动 full、commit hook scoped gate、pre-push full、CI full。push 和 CI full 是规则要求,但本地相同 fingerprint 下重复 full 耗时明显。
需要降低本地重复验证成本,同时不能削弱 #65 / #90 对 PR 合并证据的要求。
产品解决方案
为本地 verify full 增加 fingerprint cache。相同代码、依赖、治理配置和运行环境下,短时间内已经通过的 full 可以被 pre-push 复用;CI 仍始终运行 full,最终合并证据仍以 GitHub required check 为准。
用户视角:本地连续小流程不再重复跑完全相同的 full,但输出仍展示复用的证据和 fingerprint。
技术实现方案
- 定义 cache key:
HEAD/tree hash + requirements-dev hash + governance/rules/workflows hash + Python version + OS。
verify full 成功后写 .local/verify-cache/full/<key>.json,包含时间、命令、检查项、结果。
- pre-push hook 调用
verify full 时,如果命中短时间内成功 cache 且 key 完全一致,则输出 cached: true 并跳过重复执行。
- 手动
verify full --no-cache 和 CI 环境禁用 cache。
- governance tests 覆盖 cache hit、cache miss、依赖变化失效、CI 禁用。
Acceptance criteria
Blocked by
None - can start immediately
关联规范
背景
本次会话中
verify full被多次运行:手动 full、commit hook scoped gate、pre-push full、CI full。push 和 CI full 是规则要求,但本地相同 fingerprint 下重复 full 耗时明显。需要降低本地重复验证成本,同时不能削弱 #65 / #90 对 PR 合并证据的要求。
产品解决方案
为本地
verify full增加 fingerprint cache。相同代码、依赖、治理配置和运行环境下,短时间内已经通过的 full 可以被 pre-push 复用;CI 仍始终运行 full,最终合并证据仍以 GitHub required check 为准。用户视角:本地连续小流程不再重复跑完全相同的 full,但输出仍展示复用的证据和 fingerprint。
技术实现方案
HEAD/tree hash + requirements-dev hash + governance/rules/workflows hash + Python version + OS。verify full成功后写.local/verify-cache/full/<key>.json,包含时间、命令、检查项、结果。verify full时,如果命中短时间内成功 cache 且 key 完全一致,则输出cached: true并跳过重复执行。verify full --no-cache和 CI 环境禁用 cache。Acceptance criteria
Blocked by
None - can start immediately