refactor(hub): 偿还 golangci 复杂度豁免并移除 quality-debt 条目 (#1568) - #1606
Conversation
|
Warning Review limit reached
Next review available in: 59 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
06e50fa to
1b1ba96
Compare
Summary
偿还 hub-server 的 golangci 复杂度豁免(issue #1568),移除全部 5 条 file-scoped 复杂度豁免及 quality-debt baseline 条目:
internal/config/config.go(gocognit 47):Load的 env 覆盖逻辑拆入新文件config_env_overrides.go(按 JWT / Server / TokenDance ID / S3 / Upload / AgentTeam 分节),Validate的域校验拆入新文件config_validate.go(validateServerEnv / validateDB / validateRedis / validateJWT / validateTokenDanceID),根文件收敛为线性 glue。internal/app/events.go(gocognit 35):pushPendingTargetTasks/pushPendingTasks内的内联重放逻辑抽出为replayTargetBoundTask/replayPendingTask小函数,行为保持不变(含 outbox 归属、requeue、ack、delivery 标记语义)。internal/router/router.go、internal/ws/manager.go、internal/repository/migrate.go:实际复杂度已低于 golangci 阈值(gocognit≥30 / gocyclo≥20 / cyclop>21),豁免规则直接移除。hub-server/.golangci.yml:删除 5 条复杂度豁免规则。scripts/verify/quality-debt-baseline.json:移除对应 5 条 golangci_exclusions 条目(issue 1568)。Verification
go build ./...、go vet ./...通过go test ./internal/config/... ./internal/app/...通过gofmt -l为空(其余 gofmt 报告为 master 既有 refactor(edge): SDK 适配器 outbound client 收口(#1592) #1604 债)golangci-lint run ./...:5 个原豁免文件零复杂度告警;其余告警为既有 [P1] 建立 Hub lint finding fingerprint ratchet并移除整 job 软放行 #1573 软门禁范围pwsh scripts/verify/verify-quality-debt-ratchet.ps1:9 PASSgit diff --check干净