scan.Run should always end with exactly one EventDone
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start in internal/scan/runner.go: read scan.Run, its early-exit paths, and the EventError documentation. Add coverage for each listed early exit and check that each produces exactly one EventDone; then review the CLI, TUI, and pkg/subenum consumers named in the issue. Done means all tests pass and no consumer handles a channel closing without EventDone.
由索引模型根據 Issue 內容生成。
描述
Why it matters
scan.Run has two shapes of ending, and every consumer has to know both. Three consumers now each handle it separately: the CLI (main.go), the TUI (internal/tui/model.go, scan_view.go), and pkg/subenum, which adds an extra KindDone so its callers see one shape.
Evidence
- On five early-exit paths,
scan.RunsendsEventErrorand returns withoutEventDone: an out-of-scope domain, the recursion ceiling, a failed preflight, a failed wildcard check, and a wildcard zone without-force(internal/scan/runner.go, about lines 434–495). Only the deferredclose(events)runs. EventErroris documented as "non-fatal error message" (runner.go:345). In practice, five of its six uses stop the scan. The sixth, the reliability guard at line 877, is followed byEventDone.- The CLI comment says "Early errors such as wildcard detection close the channel without EventDone". The TUI has a
closedflag for "the scan ended without EventDone".
Suggested approach
- Have
scan.Runalways send exactly oneEventDone, withStats(all zero when nothing was scanned), even after an earlyEventError. - Fix the
EventErrordoc comment to say it usually means the scan stopped. - Then remove the special cases: the CLI drain comment, the TUI
closedpath, and the synthesized event inpkg/subenum'sRun.
Done when
scan.Run always ends with one EventDone, a test covers each early-exit path, and none of the three consumers has to handle a channel that closes without one.
- 主要語言
- Go
- 星號
- 1
- 分支
- 1
- 平均合併
- 5 天 2 小時
- 30 天內合併 PR
- 3
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TMHSDigital/subenum 的其他 Issue
-
area: cli enhancement good first issue
難度 2/5 1-3 小時 新手友好度 88/100
TMHSDigital/subenum#136 ·
維護者通常 1 天內回覆
-
community documentation good first issue
難度 2/5 1-3 小時 新手友好度 85/100
TMHSDigital/subenum#135 ·
維護者通常 1 天內回覆
-
area: dns enhancement good first issue
難度 2/5 1 小時以內 新手友好度 90/100
TMHSDigital/subenum#134 ·
維護者通常 1 天內回覆
-
community marketing priority: low
難度 5/5 一週以上 新手友好度 35/100
TMHSDigital/subenum#132 · 1 則留言 ·
維護者通常 1 天內回覆
-
feature priority: low
難度 5/5 一週以上 新手友好度 35/100
TMHSDigital/subenum#131 ·
維護者通常 1 天內回覆
查看 TMHSDigital/subenum 的全部 Issue
相似的 Issue
-
Helm IPv4 host checks accept addresses Go rejects可能已有人在做 @ericcaiwx-star 今天認領。 未關閉clawsweeper:bulk-filed clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster P2
難度 2/5 1-3 小時 新手友好度 65/100
openclaw/openclaw-enterprise#1588 · 1 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
cvss-severity:high devguard l3montree-cybersecurity/devguard/devguard-web pkg:oci/devguard-web?rep...ch=amd64&tag=main-amd64 pkg:oci/devguard-web?rep...ch=arm64&tag=main-arm64 pkg:oci/web?repository_u...ch=amd64&tag=main-amd64 pkg:oci/web?repository_u...ch=arm64&tag=main-arm64 risk:low state:open
難度 2/5 1-3 小時 新手友好度 66/100
l3montree-dev/devguard#3168 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 1 天內回覆
-
status:approved type:bug
難度 2/5 1-3 小時 新手友好度 85/100
Gentleman-Programming/gentle-ai#5326 ·
維護者通常 1 天內回覆
-
needs-acceptance wg/router-models-inference-runtime
難度 2/5 1-3 小時 新手友好度 82/100
vllm-project/semantic-router#4663 ·
維護者通常 1 天內回覆