fix: surface opencode errors to CI and catch model-not-found in fallback#100
Conversation
- Add `--print-logs --log-level ERROR` to opencode invocation so fatal errors like ProviderModelNotFoundError appear in CI stdout/stderr instead of only in the local log file - Add ProviderModelNotFoundError to default fallback_on_regex in both github-run-opencode and multi-review, so model-not-found errors trigger fallback to the next candidate model Fixes #99 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
安全无虞 安全分析总结此 PR 仅包含两处非功能性变更:
两处修改均不涉及用户输入处理、身份认证、敏感数据传输或外部 API 调用逻辑。 详细检查
阻塞项:无 建议项:无 |
|
架构合理 本次 PR 变更极小(3 行新增,3 行删除),属于纯配置层面的修补:
从架构角度看:
阻塞项:无 建议项:无 |
|
所有改动都聚焦于 PR 描述的两个目标,逻辑正确无缺陷。 审查结论: 可合并 本次 PR 改动量极小(+3/-3),分别修改两个文件的
|
|
可合并 综合评审总结三位 reviewer(security、quality 以及 PR 自身的 code review)均对本次 PR 给出了无阻塞项、无建议项的结论,一致认为变更合理。 变更摘要:
多 reviewer 确认:
冲突解决: 无冲突。三位 reviewer 结论一致。 阻塞项:无 建议项:无 |
|
Asserting permissions for user Svtter... 详细审查报告: ✅ securityAsserting permissions for user Svtter... [09:56:34.283] INFO (#289): loop { [09:56:36.521] INFO (#289): loop { [09:56:38.459] INFO (#289): loop { ✅ qualityAsserting permissions for user Svtter... [09:56:31.272] INFO (#295): loop { [09:56:33.999] INFO (#295): loop { [09:56:38.577] INFO (#295): loop { [09:56:41.103] INFO (#295): loop { [09:56:43.531] INFO (#295): loop { [09:56:45.668] INFO (#295): loop { [09:57:01.447] INFO (#295): loop { [09:57:03.805] INFO (#295): loop { [09:57:05.885] INFO (#295): loop { [09:57:07.785] INFO (#295): loop { [09:57:14.508] INFO (#295): loop { [09:57:16.418] INFO (#295): loop { [09:57:18.925] INFO (#295): loop { |
|
可合并 该 PR 在两个文件中做了三处修改:为 阻塞项:无 建议项:
|
|
Now I have all the information needed. Let me present the audit results. 发现遗漏 总结PR 在 Python 代码层正确添加了 CRITICAL
PR 修改了两个 Python 脚本的 GITHUB_RUN_OPENCODE_FALLBACK_ON_REGEX: ${{ inputs.fallback-on-regex }}当用户没有显式设置 涉及文件(6 个):
修复方向: 在上述 6 个 action.yml 的 已正确实现的部分(无问题)
|
The Python code default was updated but action.yml input defaults override it — without this change ProviderModelNotFoundError would never be matched when using the composite actions. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
安全无虞 安全分析总结本次 PR 变更仅涉及:
逐项安全检查
阻塞项:无 建议项:无 |
|
可合并 变更覆盖全面:6 个 action.yml 和 2 个 Python 文件的 阻塞项:无 建议项:
|
|
可合并 综合评审总结三位 reviewer(security、quality、code review)在最新版本(含 action.yml 同步修复)上结论一致,均无阻塞项。 关键发现历程
共识确认
阻塞项无 建议项
|
|
Asserting permissions for user Svtter... 详细审查报告: ✅ securityAsserting permissions for user Svtter... [10:01:42.869] INFO (#283): loop { [10:01:45.142] INFO (#283): loop { [10:01:48.003] INFO (#283): loop { [10:01:50.301] INFO (#283): loop { [10:01:53.499] INFO (#283): loop { [10:01:58.241] INFO (#283): loop { [10:02:02.196] INFO (#283): loop { [10:02:04.621] INFO (#283): loop { [10:02:06.897] INFO (#283): loop { [10:02:08.774] INFO (#283): loop { [10:02:16.074] INFO (#283): loop { ✅ qualityAsserting permissions for user Svtter... [10:01:41.386] INFO (#281): loop { [10:01:43.263] INFO (#281): loop { [10:01:46.176] INFO (#281): loop { [10:01:48.483] INFO (#281): loop { [10:01:50.081] INFO (#281): loop { [10:01:58.957] INFO (#281): loop { [10:02:02.470] INFO (#281): loop { [10:02:04.662] INFO (#281): loop { [10:02:06.832] INFO (#281): loop { [10:02:09.030] INFO (#281): loop { [10:02:25.203] INFO (#281): loop { [10:02:31.228] INFO (#281): loop { [10:02:49.377] INFO (#281): loop { [10:02:51.915] INFO (#281): loop { |
|
现在我已经拥有所有需要的信息。以下是完整的审查: 可合并 本次 PR 修正了 issue #99,让 阻塞项:无 建议项:无 审查细节: 变更总览
验证结果
|
|
架构合理 本次 PR 变更基于两个 commit:首先在 Python 脚本中添加
阻塞项:无 建议项:无 |
|
发现遗漏 总结PR 正确实现了 issue #99 的核心需求:添加了 LOWmulti-review 路径中 fallback regex 可能无法匹配到 stderr 输出的 PR 在 opencode 的 注意:这是 multi-review 路径长期存在的架构问题(所有已有 fallback pattern 如 修复方向: 在 combined = (result.stdout + result.stderr).decode("utf-8", errors="replace")
return result.returncode, combined或至少在 |












Summary
--print-logs --log-level ERRORflags to the opencode invocation inrun-github-opencode.py, so fatal errors likeProviderModelNotFoundErrorappear in CI stdout/stderr instead of only in the local log file (~/.local/share/opencode/log/)ProviderModelNotFoundErrorto the defaultfallback_on_regexin bothgithub-run-opencodeandmulti-review, so model-not-found errors trigger fallback to the next candidate modelRoot Cause
opencode 1.15.x writes
ProviderModelNotFoundErroronly to its internal log file, not to stdout/stderr. When a model (e.g.glm-5) is deprecated/removed, the action crashes with exit code 1 but the CI log shows only a generic failure — the actual error is invisible without SSH access to the runner.The
multi-reviewaction already used--print-logs --log-level ERROR(seerun-multi-review.py:226,244), but the mainrun-opencode.shpath used by all other actions did not.Note
The default model is already
glm-5.1in both scripts — no model name update was needed.Fixes #99
Test plan
fallback_on_regextests (test_fallback_on_regex,test_builtin_model_fallback) continue to pass🤖 Generated with Claude Code