本文件以唯讀方式檢查程式 repo 目前的 config / plugin 結構、候選檔案、測試基準與停止線。使用者尚未確認 5B 七項前,不修改程式 repo。
0. 文件狀態
| 項目 | 內容 |
|---|---|
| 文件狀態 | 已完成 |
| 建立日期 | 2026-06-07 |
| 程式基準 | bc3f191,外部 DLL manual-only fake verifier |
| 是否修改程式 repo | 否,只做唯讀盤點、測試與文件整理 |
1. 檢查結論
| 項目 | 結論 |
|---|---|
| 5B 承接位置 | 可承接在 AppSettingsConfig.cs 與 ConfigValidator.cs。 |
| 設定檔承接位置 | 建議維持 samples/config/appsettings.json,不新增第四個啟動設定檔。 |
| 目前 plugin schema | AppSettingsConfig 尚無 PluginLoader / Plugins 欄位。 |
| 目前 loader 讀檔 | ConfigLoader 只載入三個既有 config 檔,5B 不需改讀檔清單。 |
2. 候選檔案
| 類型 | 候選檔案 | 建議 |
|---|---|---|
| Config model | AppSettingsConfig.cs | 新增 PluginLoader / Plugins 最小 config model。 |
| Config validation | ConfigValidator.cs | 新增 plugin id、重複、safe default、source summary 安全驗證。 |
| Sample config | samples/config/appsettings.json | 加入非敏感 metadata-only sample。 |
| Core tests | ConfigValidatorTests.cs、ConfigLoaderTests.cs | 補齊合法、相容、重複與 unsafe source tests。 |
3. 測試基準
| 測試 | 結果 |
|---|---|
dotnet test tests\HS.DeviceControl.Core.Tests\HS.DeviceControl.Core.Tests.csproj --no-restore | 189 passed / 0 failed / 0 skipped |
dotnet test tests\HS.DeviceControl.Application.Tests\HS.DeviceControl.Application.Tests.csproj --no-restore | 57 passed / 0 failed / 0 skipped |
dotnet test HS.DeviceControl.sln --no-restore | 509 passed / 0 failed / 0 skipped |
4. 明確停止線
- 不載入外部 DLL。
- 不掃描 plugin folder。
- 不保存 secret、token、connection string、正式 IP、正式 port 或正式帳號。
- 不改 Application public contract。
- 不做 DB audit / DDL。
- 不做 auth / Swagger。
- 不做 Windows Service。
5. 下一步
下一步仍需等待使用者回覆 5B config schema 實作前確認表 七項同意,才能進入程式 repo 的最小 config schema 實作。