Skip to content

refactor(hub): 偿还 golangci 复杂度豁免并移除 quality-debt 条目 (#1568) - #1606

Merged
DeliciousBuding merged 3 commits into
masterfrom
refactor/hub-complexity
Aug 4, 2026
Merged

refactor(hub): 偿还 golangci 复杂度豁免并移除 quality-debt 条目 (#1568)#1606
DeliciousBuding merged 3 commits into
masterfrom
refactor/hub-complexity

Conversation

@DeliciousBuding

Copy link
Copy Markdown
Collaborator

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.gointernal/ws/manager.gointernal/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

Copilot AI lite review requested due to automatic review settings August 4, 2026 06:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@DeliciousBuding, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 826f3e2a-4086-428c-9e5d-534a3a38d53a

📥 Commits

Reviewing files that changed from the base of the PR and between 3400df6 and 1b1ba96.

📒 Files selected for processing (8)
  • hub-server/.golangci.yml
  • hub-server/internal/app/events.go
  • hub-server/internal/config/config.go
  • hub-server/internal/config/config_env_overrides.go
  • hub-server/internal/config/config_validate.go
  • scripts/verify/check-secrets.sh
  • scripts/verify/quality-debt-baseline.json
  • scripts/verify/tests/verify-quality-debt-ratchet.Tests.ps1

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DeliciousBuding
DeliciousBuding force-pushed the refactor/hub-complexity branch from 06e50fa to 1b1ba96 Compare August 4, 2026 10:23
@DeliciousBuding
DeliciousBuding merged commit 899af14 into master Aug 4, 2026
22 checks passed
@DeliciousBuding
DeliciousBuding deleted the refactor/hub-complexity branch August 4, 2026 12:50
DeliciousBuding added a commit that referenced this pull request Aug 4, 2026
DeliciousBuding added a commit that referenced this pull request Aug 11, 2026
* refactor(hub): 偿还 golangci 复杂度豁免并移除 quality-debt 条目 (#1568)

* fix(ci): secret guard 豁免 Go config 变量接线,修复迁移文件误报 (#1568)

* fix(ci): quality-debt self-test 适配已移除的 hub 豁免条目,改用 edge 条目 (#1568)

---------

Co-authored-by: Codex <codex@vectorcontrol.tech>
DeliciousBuding added a commit that referenced this pull request Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants