本卡屬 FR-089(母卡 CM-1688),修 arc review CM-1738 的 I-6,Important。建議 model:Sonnet 5,effort:low——13 個 class 各加一個基底宣告,runner 已實跑確認方法都齊、加上去不會紅。

問題是什麼(白話)

主專案替套件實作 port(介面)的 adapter,有 13 個沒寫「我實作的是哪個介面」。現在方法都齊、沒壞。但介面(ABC)的保護是「漏實作某個方法 → 建物件當場報錯」;沒繼承就沒這層。日後套件在 IEvidenceSink 加一個必要方法,asset/bulletin 那兩支(有繼承)開機就炸、一眼看到;這 13 支照常啟動,直到那個方法被呼叫才錯,而 evidence sink 是證據存檔路徑,症狀是某一類證據靜默不進資料庫。review 稱這是「投入產出比最高的一條」。

在哪裡

core/plugins/detection.py:64 EvidenceSinkAdapter → IEvidenceSink(jedi_detection.domain.ports:52,ABC)
core/plugins/detection.py:87 NotifyConfigAdapter → INotifyConfig(:86,ABC)
core/plugins/detection.py:104 AgentDirectoryAdapter → IAgentDirectory(:119,ABC)
core/plugins/detection.py:128 CryptoAdapter → ICrypto(:98,ABC)
core/plugins/detection.py:180 TaskLookupAdapter → ITaskLookup(:242,ABC)
core/plugins/detection.py:217 FileIdResolverAdapter → IFileIdResolver(:272,ABC)
core/plugins/compliance_audit.py:82,96,118 LicenseGuard/ProjectRoleGuard/IdentityGuard
core/plugins/license.py:74,119,245 MailNotifier/JediAuthTenantDirectory/TenantAdminDirectory
core/plugins/ai_bot.py:28 RedisChatHistoryStore → IChatHistoryStore(jedi_ai_bot.domain.repository.chat_history_store)
對照組(已繼承):core/plugins/asset.py:38、bulletin.py:51

先查再寫:review 說「另有 11 支對應的是 Protocol 型別,本來就不需繼承」。compliance_audit 與 license 那六個,開套件 domain/ports.py 確認對應型別是 ABC 還是 Protocol——是 Protocol 就不加,並在回寫寫明哪幾個是 Protocol 跳過。detection 六個與 ai_bot 一個首腦已核對是 ABC。

怎麼修

要寫測試

全量:pytest test/test_module_boundaries.py test/test_jedi_package_logger_names.py -q 貼 tail -1,與開工前基線比。

手測(DEV)

紀律

測試政策:碎片 case,不寫新測試檔,突變驗證即可。