Skip to content

v0.1.20

Latest

Choose a tag to compare

@zy84338719 zy84338719 released this 27 Oct 09:58
· 24 commits to main since this release
48d9de8

matrix-tools v0.1.20 —— consumer 链两处修复。

fix(tools):consumer 探针判据粒度对齐

两处判据错误,都只在真实 org 数据上暴露(夹具看不出):

  • 假阳性:源码 import 的是子包路径(github.com/cloudwego/kitex/server),
    go.mod require 的是模块路径(github.com/cloudwego/kitex)⇒ 拿全等去比
    永远匹配不上 ⇒ kitex 父仓被误判「替 kitexotel / kitex-istio 背重依赖」,
    而它的 go.mod 是对的。修法:按模块前缀比(_imports_module)。
  • 假阴性:嵌套模块排除只覆盖第一层 ⇒ kitexotel 在深度 4 ⇒ 它的 import
    被算成父仓的 ⇒ 「父仓替子模块背依赖」这条判据对最深的嵌套模块完全失效。
    修法:逐级向上找 go.mod,覆盖任意深度(_under_nested_module)。

顺带修 stdout 行缓冲:重定向/管道时日志全程 0 字节 ⇒ 进程被杀/超时时一个字都留不下。

自测新增两条自带反证样本的判据用例;变异验证:前缀比退回全等 ⇒ 用例变红。

fix(ci):consumer job 跨仓写回必须用 PAT

该 job 用无凭据的 HTTPS URL clone oekit.github.io ⇒ git push 报
could not read Username for 'https://github.com' ⇒ 从未绿过 ⇒ 站点消费面画像
冻结在 2026-10-21。且 push 失败发生在 "Open consumer issue" 之前 ⇒ 步骤失败即中断
⇒ 真违规从来没人被报过。

修法:token 取 MATRIX_AUDIT_TOKEN || OEKIT_PROJECT_TOKEN || GITHUB_TOKEN
(GITHUB_TOKEN 只对本仓有效,跨仓必须用 classic PAT);push 显式塞
http.extraheader(GH_TOKEN/GITHUB_TOKEN 环境变量只对 gh CLI 生效,git 不认);
失败时 ::error:: 给出可执行诊断;set -euo pipefail 让管道里的失败不被吞。

影响面

consumer_probe 的判据只喂给 CI 的 consumer job 与本地画像生成,
不影响发版链(matrix.py / audit.py / release_post.py)。

对应 PR #111 / #112,issue #109 / #110。