chore: complete engineering hygiene remediation#251
Merged
Conversation
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.
关联事项
Closes #248
Closes #249
Relates to #250
变更说明
1. 发布与 CI
CIworkflow:拆分为单版本quality-gate与多版本runtime-matrix,避免在 Python 版本矩阵中重复执行 lint、pip-audit、build 与 smoke test。publishworkflow:发布前同时校验 wheel 与 sdist 的唯一性和版本一致性,并分别执行 wheel / sdist 安装 smoke test。2. 依赖与版本治理
uv.lock。3. 应用与运行时健壮性
app.py中若干 request / payload / logging helper 的可测试性,并补齐对应行为测试。opencode_client.py中 upstream session id 返回值的类型边界校验。check_untyped_defs/warn_return_any,并修复新增暴露出的类型问题。4. 测试与覆盖率门禁
scripts/check_coverage.py,在总覆盖率之外,对关键模块增加单文件最低覆盖率要求。agent、app、jsonrpc_ext、opencode_client、version、script contract 等测试。5. 脚本与文档
smoke_test_built_cli.sh,支持显式 artifact 路径,兼容 wheel / sdist,避免歧义选择旧产物。scripts/README.md,同步说明新的脚本职责与 coverage policy。验证
uv run pre-commit run --all-filesuv run pytestuv run pip-audituv run python ./scripts/check_coverage.pybash -n scripts/*.shuv build --no-sources --out-dir <tmp>bash ./scripts/smoke_test_built_cli.sh <wheel>bash ./scripts/smoke_test_built_cli.sh <sdist>