Repository navigation
feat(health): Add configurable upstream error rules - #830
Conversation
📝 Walkthrough
Priority: ➖ Normal Merge Risk: 🟡 Moderate · up to Entering a cooldown in the modern rule editor can prevent the rule from updating. Fix that editing path before merging. Pre-merge checks |
|
There was a problem hiding this comment.
Note
Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.
🟡 Other comments (1)
web/src/frontends/modern/features/config/ErrorRulesEditor.vue-142-190 (1)
142-190: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win将现代编辑器的 cooldown 更新值转换为字符串。
现代
AppTextField的 number 输入会将可解析值写为数字。随后errorRuleValue对row.cooldown调用trim(),会抛出类型错误并阻断现代编辑器更新规则。经典编辑器发送字符串,不受此问题影响。建议修复
- v-model="row.cooldown" + :model-value="row.cooldown" + @update:model-value="row.cooldown = String($event)"
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: QUIET
- Plan: Advanced
- Run ID:
47480bf5-4dd9-46ad-a09f-0b9f3ec5e50c
📒 Files selected for processing (44)
internal/control/error_rules_test.gointernal/control/group_detail.gointernal/control/group_settings.gointernal/control/settings.gointernal/gateway/custom_error_rules_test.gointernal/gateway/handler.gointernal/gateway/jev_decision.gointernal/gateway/live.gointernal/gateway/mistral_realtime.gointernal/gateway/websocket_turn.gointernal/health/decision.gointernal/health/error_rules.gointernal/health/error_rules_test.gointernal/health/execution_judge.gointernal/state/error_rules_test.gointernal/state/runtime_settings.gointernal/state/snapshot.goweb/src/frontends/classic/api/control/types.tsweb/src/frontends/classic/app/resources/groups.tsweb/src/frontends/classic/app/resources/settings.tsweb/src/frontends/classic/components/config/ErrorRulesEditor.vueweb/src/frontends/classic/features/groups/group-route.tsweb/src/frontends/classic/features/groups/settings/GroupSettingsTab.vueweb/src/frontends/classic/features/groups/settings/group-settings-patch.tsweb/src/frontends/classic/features/monitor/LogDetailDrawer.vueweb/src/frontends/classic/features/settings/ReliabilitySettingsSection.vueweb/src/frontends/classic/features/settings/SettingsView.vueweb/src/frontends/classic/features/settings/settings-patch.tsweb/src/frontends/classic/i18n/locales/en-US/core.tsweb/src/frontends/classic/i18n/locales/ja-JP/core.tsweb/src/frontends/classic/i18n/locales/zh-CN/core.tsweb/src/frontends/modern/api/group-detail.tsweb/src/frontends/modern/api/settings.tsweb/src/frontends/modern/features/config/ErrorRulesEditor.vueweb/src/frontends/modern/features/groups/GroupAdvancedPanel.vueweb/src/frontends/modern/features/logs/LogDetailPanel.vueweb/src/frontends/modern/features/settings/SettingsView.vueweb/src/frontends/modern/features/settings/settings-draft.tsweb/src/frontends/modern/features/settings/use-settings-editor.tsweb/src/frontends/modern/i18n/locales/en-US.tsweb/src/frontends/modern/i18n/locales/ja-JP.tsweb/src/frontends/modern/i18n/locales/zh-CN.tsweb/src/shared/error-rule-messages.tsweb/src/shared/error-rules.ts
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
|
Addressed the cooldown input issue in ef85c66: the modern rule editor converts numeric input updates to strings before parsing. The same commit omits empty optional condition arrays when reading rules, so editing and then restoring a rule no longer leaves settings marked as changed. The docstring coverage warning in the review summary is not a quality gate defined by this repository, so no bulk docstring changes are included. |
关联 Issue / Related Issue
Refs #753
变更内容 / Change Content
Allow operators to customize existing upstream error handling without changing the decision or execution architecture. Rules match HTTP status codes and case-insensitive keywords in error codes, types, or messages, then choose whether to retry and one state action: keep state, cool down a model or credential, count a failure toward blacklisting, or skip the group for the current request.
Rules use existing error evidence, including errors already recognized under HTTP 200. New 2xx error detection and scanning normal answer text remain outside this change. Credential probes and recovery behavior are unchanged. No database schema migration or new dependency is required.
Validation:
make checkpassed after integratingorigin/mainat3745fbab, covering Go module checks and vet, frontend lint/style/format checks, TypeScript checks, frontend and Go builds, andgo test -count=1 . ./internal/.... Earlier custom error-rule storage contracts passed on SQLite, real MySQL 8.4, and real PostgreSQL 18, covering persistence, inheritance, group overrides, empty overrides, escaped Unicode keywords, and storage-size boundaries. Those external-database runs were not repeated for this frontend-only revision. No automated browser or E2E tests were run.自查清单 / Checklist
make check, or documented why it could not run and what remains unverified.Public documentation and release notes are unchanged; no documentation update is included in this PR.