Skip to content

fix(audit): follow the repository renames and the msime consolidation - #28

Merged
houko merged 1 commit into
mainfrom
fix/audit-renamed-repositories
Sep 30, 2026
Merged

houko merged 1 commit into
mainfrom
fix/audit-renamed-repositories

Conversation

@houko

@houko houko commented Sep 30, 2026

Copy link
Copy Markdown
Member

Summary

The daily organization audit has failed every day since the repository renames and the msime consolidation, and most of its findings were caused by the audit itself, not by the repositories.

Health policy (tools/health-policy.json) is keyed by repository name, so the renamed repositories were all reported as "No health policy". Keys are renamed with the policy content unchanged; the required checks already match each repository's current ruleset:

  • MSIME-Windows → msime-windows, Metasequoia-n-gram → chinese-ime-lm, metasequoia-ime-skin-example → msime-skin-example: key only.
  • MSIME-Apple → msime: release.yml no longer exists; replaced by release-macos.yml and release-ios.yml, the two release workflows that actually run on main. The other four platform release workflows have never run on main and are not registered yet. require_pr is now true, matching the pull_request rule on develop.
  • MSIME-Web → msime-web: update-manifest.yml was merged into sync-downloads.yml in fix(automation): publish 0.8.0 and stop the two download manifests from deadlocking each other msime-web#170.
  • MSIME-Engine and MSIME-Linux are removed; the audit skips archived repositories, so these entries were dead.

Product locks (tools/product_locks.py) compared product-lock.json in MSIME-Windows, MSIME-Apple and MSIME-Linux plus their engine submodule pins. It now compares msime-windows/product-lock.json with msime/resources/desktop-dictionary.lock.json. The msime lock lists download artifacts, so normalize_lock converts it to the product-lock shape: only artifacts from a dict-* release count (the same list carries the sentence model from chinese-ime-lm), and the repository name is compared in lower case (MSIME-Engine vs msime-engine). The comparison rules themselves are unchanged.

The engine now lives inside each product repository, so the engine pin comparison and the paginated fetch of the archived MSIME-Engine history are no longer called. engine_pin_report and its tests are kept.

Repositories with no required checks yet (msime-cloud, msime-customdict, homebrew-tap, msime-skins, ime-dictionary) are deliberately not given a policy; which checks they should require is a maintainer decision, and the "No health policy" finding is the prompt for it.

Decision needed: dictionary versions

With the lock check working again, it reports that the two products pin different dictionary releases: msime uses dict-v2.0.1, msime-windows still uses dict-v1.0.0. Under the existing rules that is a problem (tag, source commit and three asset digests differ). Either Windows should move to dict-v2.0.1, or a tag difference should become a note and only "same tag, different digest" should fail. This PR keeps the existing rule.

Verification

  • python -m unittest discover -s tests: 28 tests OK, including new cases for both lock formats, the model-artifact filter, case-insensitive repository names and a lock spanning two dictionary releases.
  • Ran python tools/audit_repositories.py --health locally against the live organization (GET requests only). Compared with the last scheduled run (36706750667):
    • Gone: "No health policy" for msime, msime-windows, msime-web, chinese-ime-lm, msime-skin-example; MSIME-Apple: product-lock.json is unreadable.
    • Newly visible because those repositories are audited again: msime CodeQL failing on schedule with one run stuck for over 3 hours; msime-windows release.yml last three runs failed; msime-web CodeQL not run in 240 hours and sync-downloads.yml not run in 6 hours; msime-skin-example CodeQL with no success in 240 hours; the dictionary version difference above.
    • Unchanged and out of scope: organization 2FA, repository deletion and visibility change by members; the five repositories without a policy; CodeQL not running in Google-PinyinIME-Rev, pinyin_cpp and pinyin_python.

The audit stays red after this PR; every remaining finding is a real one. The coverage job in this PR's checks will also fail on homebrew-tap and msime-skins having no .github directory, which predates this change.

健康策略按旧仓库名登记,改名后 msime、msime-windows、msime-web、chinese-ime-lm、msime-skin-example 全被报成没有策略;产品锁检查还在读 MSIME-Apple 的 product-lock.json 和已归档 MSIME-Engine 的提交历史,永远报 unreadable。

策略只改键名:msime 的 release.yml 换成实际在 main 上发版的 release-macos.yml 与 release-ios.yml,msime-web 的 update-manifest.yml 换成合并后的 sync-downloads.yml(#170),删去已归档的 MSIME-Engine 与 MSIME-Linux。产品锁改为比对 msime-windows 的 product-lock.json 与 msime 的 resources/desktop-dictionary.lock.json,两种格式先归一化再沿用原有比对规则;引擎已并入各产品仓,引擎 pin 比对不再接入审计,函数与测试保留。
@houko
houko merged commit d067652 into main Sep 30, 2026
5 of 6 checks passed
@houko
houko deleted the fix/audit-renamed-repositories branch September 30, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant