feat: add passive channel monitoring mode - #5592
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✅ Files skipped from review due to trivial changes (6)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughIntroduces a ChangesChannel Test Mode Feature
Sequence Diagram(s)sequenceDiagram
participant Scheduler as AutomaticallyTestChannels
participant Setting as GetMonitorSetting
participant Selector as selectChannelsForAutomaticTest
participant Worker as testChannels
Scheduler->>Setting: read ChannelTestMode
alt passive_recovery
Scheduler->>Selector: mode=passive_recovery
Selector-->>Scheduler: auto-disabled channels only
Scheduler->>Worker: testChannels(channels, allowDisable=false)
else scheduled_all
Scheduler->>Selector: mode=scheduled_all
Selector-->>Scheduler: enabled + auto-disabled channels
Scheduler->>Worker: testChannels(channels, allowDisable=false)
end
Worker-->>Scheduler: results, enable/disable per channel
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@web/default/src/i18n/locales/en.json`:
- Around line 3631-3632: The description for "Scheduled full test" in the
en.json file overstates the actual behavior by claiming it "probes all channels"
when it actually excludes manually disabled channels. Update the longer
description string that starts with "Scheduled full test probes all channels" to
clarify that the scheduled mode only tests non-manually-disabled channels,
thereby removing the misleading implication that all channels are tested
regardless of their manual disable status.
In `@web/default/src/i18n/locales/ja.json`:
- Line 3631: The Japanese translation for the "Scheduled full test" key in the
ja.json file uses unnatural phrasing. Replace the current value "スケジュール全体テスト"
with the more natural and clearer Japanese term "定期フルテスト" to improve readability
and consistency with the description on Line 3632.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 05853858-40a8-44d7-bb07-8fe7906ca952
📒 Files selected for processing (13)
controller/channel-test.gocontroller/channel_test_internal_test.gosetting/operation_setting/monitor_setting.goweb/default/src/features/system-settings/integrations/monitoring-settings-section.tsxweb/default/src/features/system-settings/operations/index.tsxweb/default/src/features/system-settings/operations/section-registry.tsxweb/default/src/features/system-settings/types.tsweb/default/src/i18n/locales/en.jsonweb/default/src/i18n/locales/fr.jsonweb/default/src/i18n/locales/ja.jsonweb/default/src/i18n/locales/ru.jsonweb/default/src/i18n/locales/vi.jsonweb/default/src/i18n/locales/zh.json
|
hi, how to review this? |
…itoring # Conflicts: # web/default/src/features/system-settings/integrations/monitoring-settings-section.tsx # web/default/src/features/system-settings/operations/index.tsx # web/default/src/features/system-settings/operations/section-registry.tsx # web/default/src/features/system-settings/types.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@web/default/src/features/system-settings/models/routing-reliability-section.tsx`:
- Around line 386-414: Remove the unused items prop from the Select component.
The items prop (containing the array with value and label objects for
'scheduled_all' and 'passive_recovery') is not part of the Select component API
from `@base-ui/react/select` and will be ignored. The SelectItem children
components with the same values ('scheduled_all' and 'passive_recovery') already
define the select options, making the items prop redundant. Delete the entire
items array and the prop assignment while keeping the SelectItem children
intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 24659143-4cfc-4774-961b-9ebe8ff20129
📒 Files selected for processing (11)
web/default/src/features/models/components/drawers/model-mutate-drawer.tsxweb/default/src/features/system-settings/models/index.tsxweb/default/src/features/system-settings/models/routing-reliability-section.tsxweb/default/src/features/system-settings/models/section-registry.tsxweb/default/src/features/system-settings/types.tsweb/default/src/i18n/locales/en.jsonweb/default/src/i18n/locales/fr.jsonweb/default/src/i18n/locales/ja.jsonweb/default/src/i18n/locales/ru.jsonweb/default/src/i18n/locales/vi.jsonweb/default/src/i18n/locales/zh.json
💤 Files with no reviewable changes (2)
- web/default/src/i18n/locales/vi.json
- web/default/src/i18n/locales/zh.json
✅ Files skipped from review due to trivial changes (4)
- web/default/src/features/models/components/drawers/model-mutate-drawer.tsx
- web/default/src/features/system-settings/models/index.tsx
- web/default/src/i18n/locales/en.json
- web/default/src/i18n/locales/fr.json
🚧 Files skipped from review as they are similar to previous changes (2)
- web/default/src/i18n/locales/ja.json
- web/default/src/i18n/locales/ru.json
|
@seefs001 有空帮忙 review 下不?感谢啦 |
|
看了下没问题可以合并,把这个冲突改掉就ok了。 |
|
好呢 |
…itoring # Conflicts: # setting/operation_setting/monitor_setting.go
|
@seefs001 fixed |
Merge upstream changes including: - ClickHouse log database support (QuantumNous#5663) - System task for persistent log cleanup progress - Passive channel monitoring mode (QuantumNous#5592) - Channel test environment toggle - Node name defaults to hostname when NODE_NAME unset (QuantumNous#5659) - tsgo for web type checking - Refactored database type detection API (UsingMainDatabase/UsingLogDatabase) Conflict resolution: - AGENTS.md, CLAUDE.md: kept local Chinese version, added UsingMainDatabase/UsingLogDatabase docs - controller/channel-test.go: kept AIHubError naming, adopted allowDisable + localErr checks - docker-compose.yml: kept ai-hub naming, added ClickHouse config - model/redemption.go: kept local deletion (feature removed) - web/default/package.json: adopted upstream tsgo/oxlint/oxfmt toolchain - use-sidebar-data.ts: kept local (no redemption codes) - i18n locale files: kept local translations, added 8 new upstream keys
* feat: add passive channel monitoring mode * fix: clarify passive monitor mode copy
* feat: add passive channel monitoring mode * fix: clarify passive monitor mode copy
* feat: add passive channel monitoring mode * fix: clarify passive monitor mode copy
* feat: add passive channel monitoring mode * fix: clarify passive monitor mode copy
Important
📝 变更描述 / Description
新增渠道测试模式配置
monitor_setting.channel_test_mode,支持在现有定时全量测试之外选择“仅被动恢复”模式。scheduled_all保持原行为:后台按间隔测试所有非手动禁用渠道,可自动禁用失败渠道,也可恢复自动禁用渠道。passive_recovery下,真实接口请求命中渠道并匹配自动禁用规则时才会禁用渠道;后台定时任务只测试自动禁用状态的渠道,用于恢复,不再主动探测启用渠道。🚀 变更类型 / Type of change
🔗 关联任务 / Related Issue
✅ 提交前检查项 / Checklist
Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。📸 运行证明 / Proof of Work
通过:
web/default/src/i18n/locales/_reports/_sync-report.json显示 en/fr/ja/ru/vi/zh 的 missing/extras/untranslated 均为 0。说明:
当前失败于既有未修改文件中的 React hooks / query lint 规则(例如
src/components/ai-elements/web-preview.tsx、src/components/data-table/hooks/use-debounced-column-filter.ts、src/features/channels/components/dialogs/*等),本 PR 修改的文件未出现在 lint 报错列表中。Summary by CodeRabbit