Skip to content

Set a local Git identity for the linked-worktree test fixture - #9720

Open
cocolord wants to merge 1 commit into
loopx-project:mainfrom
cocolord:codex/integration-worktree-test-identity-20261201
Open

cocolord wants to merge 1 commit into
loopx-project:mainfrom
cocolord:codex/integration-worktree-test-identity-20261201

Conversation

@cocolord

@cocolord cocolord commented Dec 1, 2026

Copy link
Copy Markdown
Member

Goal And Delivered Outcome

  • The public Python qualification failed before the legacy-Git integration test reached its worktree sync. The source commit inherited identity from a newly initialized bare repository and depended on user Git configuration. Python Tests run · #9567
  • The fixture configures the test identity on its disposable bare repository, which supplies it to the linked worktrees. The test continues through real Git worktree sync and readback. Related to Start a checked local task directly from a goal #9053 and based on main.

Author Declaration

  • Written by the Codex agent (OpenAI GPT-6).
  • The existing worktree-sync contract is exercised by tests/capabilities/test_integration_branch.py at d19a0d7e0d.

Validation

Tested 4322029b1e105f5074868a39cafeed4f6d44a430 with disposable synthetic repositories.

Check Result Evidence
Regression parity Passed The original fixture failed at commit with exit 128 after user/system configuration and author variables were suppressed. The new fixture completed the same sync.
Integration tests Passed 29 cases with user/system configuration suppressed and automatic identity disabled.
Standard premerge Passed Ruff and five direct checks.

This change is confined to one existing test fixture. UI impact is none. The commit includes a DCO sign-off.

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh

动机 / Motivation

维护者在干净环境执行 worktree 集成测试,需要让测试实际走到分支同步和结果读回。 linked worktree 的 source commit 从 bare 仓库读取身份。基线依赖开发者环境提供身份,在没有全局配置时先于同步退出 128。 候选在同一个临时 bare 仓库写入测试姓名和邮箱。两个 linked worktree 共享该身份,原测试能提交更新、合入源分支并验证集成 HEAD。 本变更仅修正现有测试的 Git fixture。

改动思路 / Approach

fixture 本来就为 seed 配置合成身份。Git worktree 共享的是另一个 bare 仓库的 common directory,所以应在那个 fixture 初始化身份。兼容 wrapper、执行 sync 和验证候选分支的断言继续按原流程运行。

具体改动 / Changes

审查 4322029,基线 d19a0d7。三个新增行负责说明并设置临时配置。提交与同步沿现有创建源提交、读取 legacy worktree 清单、同步与最终 HEAD 读回路径,确认两个源分支的文件进入集成树。 原集成约定 · 改动位置

对主干的风险 / Risks

同条件对照基线,source worktree 的 git commit 返回 128,stderr 记录身份未知且自动探测关闭。候选全套还保持错误 worktree 或分支身份的拒绝。 屏蔽 system 和 global config、作者和提交者环境变量,再要求 Git 只用显式设置。候选 HEAD 与收据一致,集成树含 source 更新 a2 和另一源的 b1,linked checkout 保持在预定分支。 本地 29 项 integration_branch 测试及标准 premerge 5 项直接检查通过,定向核实的提交身份属于临时 bare 仓库。 与同作者 #9718 的 host 测试修复涉及不同 fixture 和消费者,当前补丁没有新增可合并的测试副本。

我的整体评价 / Verdict

APPROVE。 无阻塞发现。干净环境下重新覆盖了实际集成行为。复验使用真正的 Git 2.56.0,旧版拒绝 -z 的行为由既有兼容 wrapper 模拟。未安装或执行 Git 2.35 二进制。

English verdict: APPROVE at 4322029. The unchanged sync assertions pass with no global Git identity, and the original fixture fails at its first linked-worktree commit under the same environment.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants