Minor follow-ups from the country-allow-list local-network review

未關閉
#2,149 0 則留言 0 個 reaction 已指派 1 人 在 GitHub 檢視

維護者通常 1 天內回覆

@Wikid82 已經在處理了。

開始於 2026年12月3日。

評估

這個 Issue 還沒有評估資料。

描述

architecture backend documentation frontend low

Non-blocking items from Supervisor review of PR closing #1895/#1980 (country allow-lists admitting local network visitors). None of these are correctness bugs in that PR's own scope; listed here for later cleanup.

  1. ARCHITECTURE.md doesn't describe the one-time upgrade step. The Seeding bullet (~line 917) doesn't mention KeepManagementCountryListsExcludingLocal or its trigger (the exclude_local_network column being absent before AutoMigrate). Also, the line "The local network rule above" (~916) should name the section instead, since the referenced rule is ~275 lines earlier (~640).
  2. No handler-level test for an admin turning the local-network switch off on a management-assigned list and getting locked out. Service-level coverage exists (access_list_service_test.go's ProposedUpdate, management_access_test.go's TestEvaluateManagement_CountryListLocalNetworkSwitch), but there's no end-to-end test through the management_access_would_lock_out handler response for this specific case.
  3. Redundant/stale admin-whitelist tests in backend/internal/api/handlers. settings_handler_helpers_test.go's TestValidateAdminWhitelist and settings_wave3_test.go's TestValidateAdminWhitelist_Strictness now only exercise services.ValidateAdminWhitelist directly and duplicate validator-level tests that belong in services. settings_wave4_test.go:178's ..._InvalidAdminWhitelistFromSync no longer matches what it tests (the input is now refused by an earlier check, not the sync step it's named for).
  4. Docs range lists omit IPv4 link-local. docs/features/access-control.md and docs/cerberus.md's plain-word range lists leave out 169.254.x.x, which is included in network.LocalNetworkCIDRs().
  5. Accessibility: the new "Allow local network visitors" switch's help text (frontend/src/components/AccessListForm.tsx) isn't linked to the control via aria-describedby.
  6. Test organization: NormalizeAccessList tests are split across access_list_normalize_test.go and access_list_service_test.go — could be consolidated.

Severity: low (cleanup/polish only).

主要語言
Go
星號
17
分支
2
平均合併
1 小時 42 分鐘
30 天內合併 PR
173

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

Wikid82/Charon 的其他 Issue

查看 Wikid82/Charon 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。