5B config schema 實作與驗收紀錄

返回文件索引

本文件記錄第五階段 5B config schema 的程式實作、測試、停止線與提交驗收。5B 僅完成 appsettings metadata-only schema 與 validator,不代表系統已啟用真實 PluginLoader、外部 DLL 載入、DB audit、auth / Swagger 或 Windows Service。

0. 基本資訊

項目內容
驗收日期2026-06-07
對應節點第五階段 5B config schema
程式 repo / branchhs-device-control-template / poc/nmodbus-tcp
程式 commit1f635d6,新增 5B config schema 驗證
GitHub Actions27087431249 success
文件 repo 自動狀態同步27087433624 success

1. 程式修改範圍

類別檔案
Config modelAppSettingsConfig.cs
Config validatorConfigValidator.cs
Sample configsamples/config/appsettings.json
Core testsConfigValidatorTests.csConfigLoaderTests.cs
Config 文件docs/config-schema.md

2. 實作內容

項目結果
PluginLoader schema新增 metadata-only gate 與 contract / checksum 比對欄位。
safe defaultEnabledAllowManualExternalDllVerificationAllowDisabledPluginReview 預設皆為 false
Plugins schema新增 plugin id、version、contract version、checksum、source summary、enabled、disabled reason 與 capabilities。
validator驗證必填、重複 PluginId、停用原因、capability、敏感字串與 unsafe source summary。
sample config新增安全範例,不保存路徑、正式連線資訊或可載入檔案資訊。

3. 測試與驗收結果

驗證項目結果
Core.Tests196 passed / 0 failed / 0 skipped
Application.Tests57 passed / 0 failed / 0 skipped
Solution tests516 passed / 0 failed / 0 skipped
停止線掃描本次修改的 Core config / sample config 未命中外部載入 API、plugin folder scan、DB DDL、Swagger 或 Windows Service。
污染字串掃描未命中指定污染字串。
GitHub Actions27087431249 completed success

4. 停止線確認

本次沒有載入外部 DLL、掃描 plugin folder、保存正式連線資訊、修改 Application plugin options public contract、修改 WebApi / ServiceHost / Adapter,或新增 DB audit / DDL / Apply。

5. 驗收結論

5B config schema 已完成本批核准範圍。下一步可進入 5C DB audit 邊界分析與實作前確認;任何 DB audit table、DDL、正式 Apply 或真實 DB 寫入仍需停下確認。