Repository navigation
fix(tool-cli): prevent output from replacing source evidence - #182
Merged
Merged
Conversation
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.
当前问题与证据
tool_cli.py的--output使用os.replace,缺少对读取中的figure_evidencesidecar 与参数/计划文件的路径碰撞保护_write_output实现将回执写到输入 JSON 路径,输入文件字节确实被替换改动
tests/test_tool_cli.py:新增输入 sidecar、--args-file、--plan-file输出碰撞回归测试tool_cli.py:从直接调用或计划识别源文件,输出阶段以 resolved path 比较拒绝碰撞,返回既有OUTPUT_WRITE_FAILED/ exit 2;不同路径的正常输出保持不变核验与限制
cd031f816264b0ef121891ca5d91759480d85d59c458fd223c9206ef0958158ace4dad173a5722dcmain...head:ahead=2 / behind=0tool_cli.py、tests/test_tool_cli.pytool-cli-agent-smoke工作流若在 Draft PR 自动触发,需单独核验其实际 run/job 结论,不能把 CI 元数据冒充本轮本地测试状态:READY_FOR_MAINTAINER_REVIEW,仅 Draft PR;不得据此直接合并,不启用 auto-merge
当前 Draft PR 的 CI 执行证据
Tool CLI Agent smoke (optional),trigger=pull_request,status=completed,conclusion=successc458fd223c9206ef0958158ace4dad173a5722dclocal-tool-contracttest_cli_output_cannot_replace_source_or_request_inputs ... okCompile tool and test modules、Test registry, CLI, UI and native tool calls、Run complete repository manual test suite、Generate JSON and offline HTML catalog全部 successREMOTE_CI_TEST_EXECUTED,不等于本地原生TEST_EXECUTED,也不构成科研有效性或外部符合性验证