Skip to content

fix(config): degrade gracefully when remote config source is unreachable - #182

Merged
LeXwDeX merged 1 commit into
devfrom
fix/config-offline-degrade
Aug 7, 2026
Merged

fix(config): degrade gracefully when remote config source is unreachable#182
LeXwDeX merged 1 commit into
devfrom
fix/config-offline-degrade

Conversation

@LeXwDeX

@LeXwDeX LeXwDeX commented Aug 7, 2026

Copy link
Copy Markdown
Owner

内容

  • fetchRemoteJson 双路降级:初始 fetch 失败与 response body 读取/解码失败均返回 undefined(源不可达)并记 warning
  • wellknown 源不可达 → 跳过该源,本地配置完全可用;secondary remote_config 不可达 → 合并空(与主路径一致)
  • 测试:wellknown-offline.test.ts 覆盖 fetch 失败 + body 读取中途报错两条降级路径(body 路径为本批新增覆盖)

验证

  • 提交时 pre-commit 全量 typecheck + lint 通过;工作流内 opencode typecheck exit 0、config 相关测试全绿

备注

  • DAG 审查遗留项 O1(不可达时回退 last-known-good 缓存)未包含:本 PR 只做降级语义与覆盖;缓存方案作为独立后续项

- fetchRemoteJson 双路降级:初始 fetch 失败与 response body 读取/解码失败均返回 undefined(源不可达),由 fetchRemoteJson 记 warning
- wellknown 源不可达 → 跳过该源(continue),本地配置完全可用;secondary remote_config 不可达 → 合并空({}),与主路径行为一致
- 测试:wellknown-offline.test.ts 覆盖 fetch 失败与 body 读取中途报错两条降级路径
@LeXwDeX
LeXwDeX merged commit 83d0053 into dev Aug 7, 2026
3 checks passed
@LeXwDeX
LeXwDeX deleted the fix/config-offline-degrade branch August 7, 2026 02:57
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.

1 participant