Conversation
P0 三项修复覆盖本会话在四 SDK 12 分支生产就绪中实测的三次撞锁: - P0#1 _run_one timeout 路由:同时处理 TimeoutExpired 与 subprocess exit 124 都路由为 skipped 而非 failures(旧行为把 Maven install 冷缓存 >2 分钟误报为阻塞);user_config 默认 lint_timeout_seconds 120→300 - P0#2 OpenSpec validate 集成:run_gate 末尾若仓根 openspec/config.yaml 存在且 openspec CLI 可用则跑 strict validate;CLI 缺失路由 skipped - P0#3 静默跳过漏报修复:resolve_project_roots=[] 时 cwd 一层子目录兜底扫 git 仓(monorepo 模式);找不到则 exit 2 + stderr 明确错误信息 (旧行为 exit 0 静默放过) 测试:tests/test_p0_routing_openspec_skipgate.py 新增 8 个用例; 全套 tests/run_all.py 141/141 全过。
- gate_lib._openspec_validate 引用了不在作用域的 cfg(openspec 项目且 CLI 已装时必然 NameError)→ 改为显式 timeout_seconds 参数(默认 300), 调用方 _run_gate_uncached 从 cfg 取 lint_timeout_seconds 传入 - failures.append 循环 → failures.extend(PERF402) - 测试文件删除未用 import json、拆分 import ast, inspect(F401/I001) 验证:uvx ruff check hooks/ scripts/ tests/ 全过;tests/run_all.py 141/141
对应 OpenSpec change 2026-09-22-gate-toolchain-unverified(verdict-integrity / language-gate-commands / hook-protocol delta): - verdict:Maven POM 4.1.0 / release version / invalid target / UnsupportedClassVersionError 归 UNVERIFIED(无法验证 ≠ 验证失败); SC1071 同理(ShellCheck 不支持 zsh 方言) - zsh 目标面剔除:shell 全量 gate 剔除 *.zsh;delta 面明示「N 个 zsh 文件 未验证」不静默丢弃 - 缓存键加 scope 维度:切断 UPS 软门禁(repo)与硬门禁(delta)60s TTL 互串 - 逃生门三形态 + 审计:repo config 读取失败留痕(skipGate-read-error)、 git -c codeguard.skipGate=true(inline-skipGate)、链内 git config codeguard.skipGate true && … && --unset(chain-skipGate, 此前整链被拦首用必败);_git_seg_parts 子命令边界收紧——commit -m 消息 文本里的豁免短语不再静默关掉门禁 - FULL_SCAN_EXCLUDES 增补 Agent 工作目录(.mimosa/.worktrees 等 7 个) - 测试:test_gate_hardening_usage.py 19 用例;3 个 CLI/auto_fix 用例补 skipUnless(ruff) 工具缺失守卫(无法验证 ≠ 验证失败) 验证:unittest discover 221 通过(无 ruff 3 skipped / ruff==0.16.8 shim 下 221 全过 0 skipped);run_all 141/141;ruff check 全绿; validate_languages_json 11 规则通过
对应 OpenSpec change 2026-09-23-java-gate-default-level(language-gate-commands delta): - java_project.analyze:Maven 默认 argv 追加 -DskipTests(测试代码仍编译, 仅跳过执行);Gradle 默认 argv 追加 -x test——大仓全量测试普遍超门禁 300s 超时预算,跑满只剩 UNVERIFIED,门禁给不出真结论(P2-6 收口) - languages.json java.lint 同步 + docs/LANGUAGES.md 重新生成(可复现) - README(en + zh-CN parity 对齐):默认等级语义、codeguard.json java.commands 升级含测试完整 verify 的路径、ruff 版本基线(CI 钉扎 ruff==0.16.8,项目无自有配置时注入默认规则集——P2-7 收口) 验证:unittest discover 221 通过(3 skipped=ruff 工具缺失守卫); run_all 141/141;ruff 全绿;validate_languages_json 11 规则通过
…明示(基于 codex/claudecode 六分支发布真实痛点)
…ne_stale_finding verdict-integrity 原则("无基线证据绝不豁免")由 baseline_stale_finding 双跑基线落地, 本函数作为兜底接口仍返回 None:测试断言(test_verdict_integrity、test_session_fixes) 与 spec 一致。零行为变更,仅 docstring 诚实化避免后续读者误读。 详见 memory project-codeguard-plugin-optimization.md
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.
摘要
三个 OpenSpec change 的硬化批次,全部来自四 SDK 12 分支生产就绪与 hermes/easydoc 实测撞锁:
1. P0 三项硬化(2026-09-22-p0-routing-openspec-skipgate)
TimeoutExpired与 exit 124 都路由 skipped(Maven 冷缓存超时不再误报阻塞),默认 120→300 秒openspec/config.yaml且 CLI 可用则跑 strict validateresolve_project_roots空结果时 cwd 兜底扫 git 仓,仍无则 exit 2 + 明确报错2. 工具链不兼容归 UNVERIFIED + 逃生门收口(2026-09-22-gate-toolchain-unverified)
git -c codeguard.skipGate=true(inline-skipGate)/ 链内 set→commit→unset(chain-skipGate,修复文档绕过首用必败);commit -m消息文本里的豁免短语不再静默关掉门禁3. java 默认检查等级 + ruff 基线(2026-09-23-java-gate-default-level)
-DskipTests(测试代码仍编译)、Gradle 追加-x test——大仓全量测试普遍超门禁 300s 超时预算,跑满只剩 UNVERIFIED;测试执行交 CI 或codeguard.json java.commands显式声明(既有权威覆盖)测试
unittest discover:221 通过——无 ruff 环境 3 skipped(skipUnless(ruff)工具缺失守卫);ruff==0.16.8 下 221 全过 0 skippedtests/run_all.py:141/141对应 delta
hook-protocol / language-gate-commands / verdict-integrity(gate-toolchain-unverified + java-gate-default-level)+ gate-trigger-policy(p0-routing-openspec-skipgate)