Repository navigation
feat(upstream): 重放解决结构性冲突,并改名只有上游写的文案 - #293
Merged
Merged
Conversation
added 2 commits
October 8, 2026 11:30
改名重放原来只解决"整块纯改名"的冲突块,每个小版本仍剩 4-6 个冲突 (0.157.0 剩 6 个、0.161.0 剩 4 个),巡检几乎每次都开冲突 issue。新增: - 改名归一后的行级三方合并:只把 Zuno 确实改过名的基线行换成改名后的 写法,两侧编辑相邻但不重叠时合并(git 对相邻编辑一律判冲突)。 - 两侧在同一点纯插入、没有共同内容行时都保留(上游在前);完全相同只留一份。 - 快照冲突只差 insta 的 assertion_line 时取上游的值。 - 上游删除、Zuno 改过的 .md 文档保留 Zuno 版本(kept)。 - Rust 多行字符串(inline 快照 @"…"、raw string)跨行按文本处理;块注释 里的引号不再被当成字符串开头。 - 合并之后,把"只有上游写的行"按规则改名:.rs 只改字符串字面量,.snap 按渲染文本处理;不在 [[added]] 范围内的列入 review,挡住自动合并。 在真实版本上回放:0.157.0 冲突 6→3,0.161.0 冲突 4→0;结构性合并的结果 与当时手工解法一致(insta 元数据除外)。巡检在 review 非空时不排自动合并, 边界脚本要求保留这一条件。
这类文件原来逐块解决冲突,未冲突区域里 Zuno 的旧版本号行会原样保留, 例如 0.161.0 的 startup_tip_in_transcript.snap 仍是 (v0.160.1),TUI 快照测试因此失败。现在只要 Zuno 文本正好是基线的改名结果,就按刷新文件 的方式整体重放,版本号行一并更新。
sunerpy
force-pushed
the
codex/upstream-replay-resolvers
branch
from
October 8, 2026 03:33
126d84d to
d3b36d9
Compare
This was referenced Oct 8, 2026
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.
背景
改名重放原来只解决"整块都是改名"的冲突块,其余全部交给人。每个 Codex 小版本仍剩 4–6 个冲突,巡检几乎每次都开冲突 issue:0.157.0 剩 6 个(#286),0.161.0 剩 4 个(#292)。剩下的冲突大多其实有唯一的机械解法。
改动
冲突块(
scripts/zuno_rebrand.py)assertion_line::冲突只差这一行时取上游的值。@"…"、raw string 跨行按文本处理。同时修复一个现有 bug:块注释里的引号会被当成字符串开头,导致后面的代码标识符被改名。文件与合并后处理(
scripts/zuno_upstream.py).md文档:保留 Zuno 版本,列入kept。源码文件仍交给人。${version}行也一并更新,列为已解决。.rs只改字符串字面量,.snap按渲染文本处理,结果记在new_text。不在[[added]]范围(TUI 快照)内的条目同时列入review。review附上具体改了哪些行。巡检在review非空时不排自动合并(.github/workflows/zuno-upstream-sync.yml),边界脚本要求保留这一条件。文档同步更新:
docs/zuno-upstream-sync.md和FORK_REBRAND.toml的头部说明。回放结果(同一来源提交上,新旧规则对比)
Cargo.toml、app-server/src/lib.rs、AGENTS.md与手工解法一致;快照只差 insta 元数据。Moved damaged … local database file;新测试里的CODEX_HOME;codex exec review提示)。在 0.160.0 中,guardian 快照的新行也改对了。review中,不会被自动合并。测试
scripts/test_zuno_rebrand.py:31 项(新增 9 项)。scripts/test_zuno_upstream.py:30 项(新增 3 项集成测试)。scripts/test_smoke_zuno_package.py、check_zuno_update_boundaries.py通过;去掉review条件后边界脚本按预期报错。actionlint -shellcheck= -pyflakes=通过。zuno/pr-gate:见 checks。