fix(acp): detect CLI config errors on startup and provide actionable guidance#1947
Merged
fix(acp): detect CLI config errors on startup and provide actionable guidance#1947
Conversation
Contributor
Code Review:fix(acp): detect CLI config errors on startup and provide actionable guidance (#1947)变更概述本 PR 将 方案评估结论:✅ 方案合理 将内联的错误消息构建逻辑提取为纯函数是正确的重构方向——参数显式传入,无副作用,完全可测试。新增的 config error 检测模式针对 Codex config.toml 解析失败的实际场景,提供了可操作的用户指引。检测链的顺序设计合理(config error 后于 command-not-found 执行,优先级更高),与测试用例一致。 问题清单未发现 CRITICAL、HIGH、MEDIUM 级别问题。 汇总
结论
纯函数提取干净,测试覆盖充分(8 个用例覆盖所有分支),与项目架构一致,代码质量良好。 本报告由本地 CONCLUSION: APPROVED |
…guidance When a CLI (e.g. Codex) fails to start due to a config file parsing error, extract the config file path from stderr and show a clear message suggesting the user review or temporarily rename the problematic config file. This addresses cases like Codex multi-agent config.toml settings that the ACP bridge cannot parse (invalid type errors).
5979c30 to
768904b
Compare
Contributor
|
✅ 已自动 review,无阻塞性问题,正在触发自动合并。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
error loading configpattern in stderr and provide an actionable message with the config file pathbuildStartupErrorMessage()function for testabilityRelated Issues
Closes #1143
Test Plan
acpStartupError.test.ts)