Skip to content

fix(git): refresh retained rename diff baselines - #355

Merged
wzz6423 merged 2 commits into
mainfrom
fix/diff-rename-baseline
Dec 5, 2026
Merged

wzz6423 merged 2 commits into
mainfrom
fix/diff-rename-baseline

Conversation

@wzz6423

@wzz6423 wzz6423 commented Dec 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

Retained worktree rename tabs kept reading their original path after the rename was staged, so their before-side content and filename could disagree with the current index. Resolve the current rename/copy state before reloading those tabs and report a read error when Git status cannot be verified.

Add regressions for staging, worktree edits, reset to untracked, restaging, committing, source-path reuse, literal filenames, images, and status failure recovery. Ordinary and historical tabs retain their existing Git command count.

@coderabbitai summary

GitHub Project

  • Project: zshell Development
  • Start date: 2026-12-05
  • Target date: 2026-12-05

PR Type

  • Type: fix

Validation

  • Status: passed

  • Command: python3 -B mac/tests/test_diff_rename_baseline.py

  • Result: 101 assertions passed against the production reload, content readers, status parser, and review store with real disposable Git repositories.

  • Status: passed

  • Command: python3 -B mac/tests/test_diff_review_snapshot.py

  • Result: All 338 existing snapshot assertions passed after updating the fixture to include the production status parser.

  • Status: passed

  • Command: python3 -B mac/tests/test_diff_rename_baseline.py --source-ref 429e371

  • Result: The negative control exited 1 as expected, with 31 failed assertions reproducing stale baselines, stale filenames, and editable stale state before this fix.

  • Status: passed

  • Command: make format

  • Result: Swift and Rust formatting completed; git diff --check passed.

  • Status: passed

  • Command: make run DERIVED_DATA=<temporary-build>; codesign --verify --deep --strict <built-debug-app>; python3 -B mac/tests/test_diff_rename_baseline.py --derived-data <temporary-build>

  • Result: The full macOS Debug app built, launched and passed signature verification. The compiled app fixture passed 95 rename-baseline assertions.

  • Status: passed

  • Command: python3 -B mac/tests/test_diff_rename_baseline.py; python3 -B mac/tests/test_diff_review_snapshot.py; python3 -B mac/tests/test_git_status_snapshot.py

  • Result: Production source probes passed 109, 338 and 19 checks. The old revision negative control failed 35 checks as expected. Independent review found no blocking issue.

  • Status: not run

  • Reason: CI completion is not awaited for this maintainer-authorized change.

Risk and Rollback

  • Risk: Retained local worktree rename/copy tabs add one status process limited to the current and original paths. Status failures disable editing and review until a successful reload.
  • Rollback: Revert this pull request.

Related Issue

None

AI Attribution

Resolve live worktree rename metadata before loading retained tabs and keep before-side content and filenames aligned with the current index. Treat status failures as read errors and cover Git state transitions with production-loader regressions.

Co-authored-by: Codex <noreply@openai.com>
@coderabbitai

coderabbitai Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Co-authored-by: Codex <noreply@openai.com>
@wzz6423
wzz6423 marked this pull request as ready for review December 5, 2026 04:01
@wzz6423
wzz6423 merged commit 8ded5be into main Dec 5, 2026
27 checks passed
@wzz6423
wzz6423 deleted the fix/diff-rename-baseline branch December 5, 2026 04:01
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.

1 participant