Repository navigation
fix: CI 仅运行受影响检查并复用未变化输入的成功结果 - #893
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.
解决的问题与行为变化
主 CI 过去无论改前端、后端还是文档都会启动整组测试;部分专用回归把共享提示登记和整个前端目录作为触发条件,导致用户列表的一处修改也启动多个无关功能的验收。
本次给主 CI、安全扫描、VIP 和多机验收增加按输入范围选择 job 的步骤。同一 PR 的后续提交,以及 production 合并的实际父提交,若相关文件对象与 job 定义完全一致且对应 job 已成功,可以复用旧结果。失败、取消、跳过或无法查询的结果不用于跳过检查。只有显式 checkout PR head 的成功检查可以复用;临时合并树检查不复用。手动、tag 和每周安全扫描仍执行全部对应检查。
专用工作流收窄共享提示/类型/翻译及整个前后端的触发路径,移除历史 feature push 的重复入口,保留 PR 与手动入口。检查命令及业务源码未改变;逐 job 对比原定义一致。最后修补使用
[skip ci],避免重新触发 48 个仅改变触发器的专用工作流。主前端仍使用 GitHub runner、6 GiB Node 堆。关联记录与来源
用户明确要求“未改动的内容不重复测试”并要求落实到工作流。后继于 #890、#889。无外部提交。
管理员新功能提示
提示 ID、展示位置、关闭行为、ID 沿用和回归均不适用:仅 CI 内部逻辑,无新管理员界面。
复现与验收
基线 production
c269390a8d2a3ecd718ec6d71f24bc808e1bb52b。.github/ci/test_select.py用临时 Git 仓库覆盖重命名/删除、锁文件、命令变更、成功复用、失败/API 异常回退、PR/fork 隔离与全量入口。协议、调度或传输补充
不适用:仅 Actions 调度,不修改应用协议、业务重试或幂等。
实际验证
git diff --check9974945bb110d4326ed9e7f6c2dabd01c10e0f29:python3 -m unittest discover -s .github/ci -p 'test_*.py' -v868dca62c的真实 Actions 筛选步骤兼容性与运行影响
.github/ci/scopes.json,决策与旧证据写入 job summary。actions: read用于查询历史检查,沿用contents: read,不伪造成功 check。文档与用户可见变化
新增
.github/ci/README.md,贡献指南说明按范围运行和复用证据的边界。没有发布或生产部署。Agent 使用声明
Codex 负责实现、检查和 PR 维护;具体模型 ID/推理强度未知(会话仅标识 GPT-6),无子 Agent。
提交前自查