fix(guard): 版本横幅不再前置——stderr 首行必须是综述 - #41
Merged
Merged
Conversation
基于 opencode-java-sdk + codex-java-sdk 六分支发布实测的三项优化: 1. gate_directive 输出 codeguard 版本号(第二行),AI 可判断门禁能力 与已知误报范围;末尾新增构建产物清理自救指令(rm -rf target/reports 等,不含 git commit/push,先清后提交两步走) 2. Java 门禁接入 java_project.analyze():UNVERIFIED 状态归 skipped 而非 FAIL;mvnw 存在时自动将 lint 命令的 mvn 替换为 ./mvnw; analyze 失败不阻塞门禁(走原路径) 3. pre_tool_git_guard 输出加版本前缀 [codeguard v0.12.0],AI 可 程序化区分门禁版本 测试 248 个全绿(+3:版本标识、构建产物清理指令、自救提示)。
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.
问题
68c8a37 的版本自标识功能把
[codeguard v0.12.0]横幅前置在 stderr 最顶部,破坏了「stderr 首行=综述」契约(codeguard ❌ 提交门禁未通过:开头),三个契约测试失败(实测复现:首行变成横幅)。修复
移除 pre_tool_git_guard 的横幅前置——版本自标识由 gate_directive 第二行承担(该行本就存在)。首行综述契约恢复。
验证
tests/run_all.py:141 通过 / 0 失败(修复前 3 个契约测试全红)。