跳到主內容

Theme / v0.21.46

Oh My Codex (OMX)

Codex CLI 工作流增強層

基礎觀念

v0.21.45~v0.21.46:doctor 信任修復與 Git Master 授權邊界

整理 v0.21.45~v0.21.46 兩個 release:foreign hook 空 matcher(空字串匹配器)造成的 omx doctor 誤報修復,以及 v0.21.46 的 native agent 指引範圍限定 (assignment-scoped overlays) 與 Git Master 的 history/remote 寫入授權邊界。

概述

本課涵蓋兩個 patch release(修補版本):v0.21.45(2026-11-01 19:15:23 UTC;台灣時間 2026-11-02 03:15)與 v0.21.46(2026-11-02 05:34:01 UTC;台灣時間 13:34)。官方主題句依序為:“This patch release fixes omx doctor falsely reporting an unsafe trust migration for an unchanged foreign Codex hook group whose matcher is the empty string (#3984).”、“This patch release keeps generated native-agent instructions within the assigned scope and clarifies Git Master’s task authority for history and remote writes.” 兩版官方皆明言:「No breaking API changes.」

v0.21.45:空 matcher 的 foreign hook trust 修正

問題:omx doctor 誤報不安全的信任遷移

官方說明本版修復 omx doctor 對「unchanged foreign Codex hook group whose matcher is the empty string」的誤報(issue #3984)。

修正內容(#3985,修 #3984)

EMPTY FOREIGN HOOK MATCHER TRUST:foreign hook(外部鉤子)trust hash(信任雜湊)輸入保留任何字串 matcher(匹配器),包括空字串 ""。官方原文說明先前的問題:

“Previously the truthiness check omitted an empty matcher, causing the calculated hash to differ from Codex’s stored trust hash and omx doctor to report unsafe_managed_removal for an unchanged trusted hook group.”

也就是說:先前的真值檢查 (truthiness check) 省略了空 matcher,導致計算出的 hash 與 Codex 儲存的 trust hash 不同,使 omx doctor 對未變更的受信任 hook group 回報 unsafe_managed_removal。

範圍限定

官方明言:「The fix targets the empty-matcher hash mismatch. The separately reported SessionEnd outlier is not addressed.」——本修正只針對空 matcher 的 hash 不匹配;另行回報的 SessionEnd outlier(離群案例)不在本次處理範圍。

v0.21.46:native agent 指引範圍與 Git Master 授權

ASSIGNMENT-SCOPED NATIVE AGENT OVERLAYS(#3989)

生成的 posture(姿態)與 exact-model guidance(精確模型指引)「no longer tell read-only or advisory roles to implement or always build」——不再叫唯讀 (read-only) 或顧問 (advisory) 角色去實作 (implement) 或永遠建構 (always build)。

官方原文進一步說明:「Specialist coverage, completion criteria, and verification requirements follow the assignment and repository/task requirements.」——專家涵蓋範圍 (specialist coverage)、完成準則 (completion criteria) 與驗證要求 (verification requirements) 跟隨 assignment(任務指派)及 repository/task requirements(儲存庫/任務需求)。

GIT MASTER AUTHORITY BOUNDARIES(#3997)

官方對 Git Master 的 task authority(任務授權)邊界有兩項澄清:

  1. History 與 remote 寫入需要授權:「History rewrites and remote writes require task authority.」——歷史改寫 (history rewrites) 與遠端寫入 (remote writes) 需要 task authority。
  2. 保護無關的未提交工作:「Preserve unrelated dirty and untracked work without stashing, resetting, cleaning, or overwriting it」——不以 stashing(暫存)、resetting(重置)、cleaning(清理)或 overwriting(覆寫)破壞無關的 dirty(已修改未提交)與 untracked(未追蹤)工作。

此外:「split independent concerns while keeping a behavior’s required tests and support files together」——拆分獨立 concerns(關注點)時,須將一個 behavior(行為)所需的 tests(測試)與 support files(支援檔案)留在一起。

相容性與驗證

  • 兩版官方皆明言「No breaking API changes」(無破壞性 API 變更)。
  • Release-coupled metadata(與 release 綁定的中繼資料)分別已由 dev 上的 #3982(0.21.45)與 #3993(0.21.46)同步,release 本身不再次 bump 這些 surfaces。
  • 兩版皆通過 npm ci、npm run build、npm test(475 個 Node test files)、npm run check:no-unused 與 npm run lint。v0.21.45 的 lint 報告了既有的 linter.rules.recommended deprecation notice(棄用通知)。
  • v0.21.46 另通過聚焦回歸測試:native-config.test.js(36 passed、0 failed)、codex-hooks.test.js(74 passed、1 skipped、0 failed);版本同步檢查(node dist/scripts/check-version-sync.js --tag v0.21.46 與 cargo metadata --locked)回報所有六個 OMX workspace crates 皆為 0.21.46。

動手升級檢查清單

升級 v0.21.46:動手檢查清單

逐項勾選,確認你已完成升級必要的步驟(進度會保存在此瀏覽器)

0 / 4
隨堂測驗

v0.21.45 修復的 omx doctor 誤報,根本原因是什麼?

💡 想先看個提示?

問題出在「空字串」被真值檢查忽略。

延伸閱讀