Repository navigation
feat: 门禁触发词边界 + MCP 官方 SDK 三工具 + 失败日志落盘(OpenSpec fix-gate-trigger-and-mcp) - #21
Merged
Merged
Conversation
added 3 commits
September 22, 2026 15:13
OpenSpec: 2026-09-22-fix-gate-trigger-and-mcp(组 1/2/3/4) - 触发启发式:英文触发词改词边界(pushed/deployment 误触发清零), 行动意图或句首祈使才进门禁;QUESTION_MARKERS 加回归锁定 - 定向语言:_detect_languages_in_text 从消息提取语言子集, run_gate 支持 languages 参数;无命中回退全量探测 - MCP:run_check.py --mcp 走官方 mcp SDK(1.26),暴露 check_code_style / auto_fix / list_languages 三工具;根 requirements.txt - 失败日志:run_per_language 完整 stdout+stderr 合并落盘 <log_dir>/.codeguard-last.log,CLI --log-dir/--quiet,失败打摘要行+日志路径 测试:tests/test_gate_trigger.py(7) + tests/test_mcp_server.py(5) 全绿
- README/zh:修正过期「MCP 未发布」表行,新增镜像 MCP 章节(parity 5/5) - skills-check.yml:unittest 前 pip install requirements.txt(MCP 测试不 skip) - .gitignore:out/ - tasks.md:组 1-6 勾选 24/29,3.1 更正为根 requirements.txt + CI 安装 - 全仓 ruff 41 项清零(PLW1510 check=False / BLE001 fail-open noqa / EXE 位 / RUF059 改名 / SIM115-402 / TRY004 保型 noqa)—— 提交门禁跑全仓 ruff check .,债务不清则任何提交都过不了
loong10k
added a commit
that referenced
this pull request
Sep 22, 2026
完成度审计收尾(回答'全部完成了么'): - M1 add-detect-lang-splits 3.1:给 4 个 hook 的 from detect_lang import 追加注释标注 ensure_user_path/load_user_config 的真实定义文件 (scripts/paths.py、scripts/user_config.py)——全会话唯一真未执行的任务 - M1 5.1 图谱复验(新鲜证据):code-review-graph 于 HEAD 7fa79ab 重建, cross_community_edges_total=0、0 warnings(拆分前 19 边高耦合告警),达标 - 翻勾 7 个已归档 change 的 108 个任务框(全部任务均已实际执行并有验证证据; 归档时未翻属簿记遗漏)——仅剩并行会话活跃 change 的 28 框(PR #21 在途,非我方) 验证:我方套件 OK + run_all 141/141/0 + validator 0 errors + openspec strict 11/11 + diff clean
loong10k
added a commit
that referenced
this pull request
Sep 22, 2026
This was referenced Sep 22, 2026
Merged
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 变更
openspec/changes/2026-09-22-fix-gate-trigger-and-mcp(组 1-6 勾选 24/29;组 7 发版在合并后执行)内容
组 1/2 触发启发式 + 定向语言
我刚才 pushed 了/关于 deployment 策略的讨论不再误触发全仓 lintQUESTION_MARKERS(中英双标点)回归锁定_detect_languages_in_text:消息提到语言则只跑子集(run_gate(languages=)),未提及回退全量探测组 3 MCP 官方 SDK
run_check.py --mcp走官方 mcp SDK(1.26)stdio,三工具:check_code_style/auto_fix/list_languagesrequirements.txt(mcp>=1.0)+ skills-check CI 安装步骤(测试不 skip)组 4 失败日志
run_per_language.run_check(log_dir=):失败时 stdout+stderr 合并落盘<log_dir>/.codeguard-last.log--log-dir(默认<path>/out)/--quiet(CI 关闭);失败输出摘要行 + 完整日志路径组 5 文档
.gitignoreout/全仓 ruff 债务清零(提交门禁前提)
门禁跑全仓
ruff check .,41 项债务(PLW1510/BLE001/EXE/RUF059/SIM/PERF/TRY004/I001/F401)清零后才能提交;TRY004 用 noqa 保型(CI 断言 RuntimeError),其余全部机械修复验证
python3 -m unittest discover:44/44python3 tests/run_all.py:141/141ruff check .:cleangit diff --checkclean说明
bump-plugin.mjs codeguard minor(0.6.8 → 0.7.0)+ 市场同步 + tag + Release +openspec archive