Skip to content

fix(tests): make transcript lookup fixtures portable on Windows - #1386

Open
dungartoriaaa wants to merge 1 commit into
DietrichGebert:mainfrom
dungartoriaaa:codex/fix-transcript-test-windows
Open

dungartoriaaa wants to merge 1 commit into
DietrichGebert:mainfrom
dungartoriaaa:codex/fix-transcript-test-windows

Conversation

@dungartoriaaa

Copy link
Copy Markdown

Refs #1375. Complements #1377.

Test tìm transcript không khớp fixture POSIX khi engine trên Windows đưa đường dẫn dạng D:\home\u\.claude\projects\.... Vì vậy fs.exists và fs.list trả dữ liệu rỗng, test không đọc được tên hội thoại.

Bản sửa chỉ nằm trong test the transcript is found with no classic hook, in its named folder or any other. Các mock tìm tiêu đề và liệt kê thư mục so sánh phần cuối đường dẫn sau khi chuẩn hóa dấu phân cách. Assertion xác nhận không quét thư mục ở lần tìm đầu cũng xử lý phần drive trên Windows. Test vẫn kiểm tra đủ ba tình huống có sẵn gồm thư mục dự kiến, chuyển transcript sang worktree và đổi session.

PR #1377 xử lý bốn test khác về cờ band/mode. Diff này chỉ chạm test transcript còn lại và áp dụng sạch cùng #1377.

Kiểm thử

  • npm test đạt 144 kiểm thử gốc và 30 kiểm thử pi.
  • node scripts/check-rule-copies.js đạt.
  • node scripts/check-versions.js đạt.
  • python benchmarks/agentic/run.py --selftest đạt.
  • claude plugin test . trên Windows, Claude Code 2.1.319, đạt 28/32. Bản gốc đạt 27/32. Test transcript chuyển từ lỗi sang đạt. Bốn lỗi còn lại đúng là bốn test thuộc fix(band): compare the end of the flag path in the band tests #1377.
  • Tạm áp dụng diff fix(band): compare the end of the flag path in the band tests #1377 cùng bản sửa này rồi chạy bộ band trên Windows, đạt 32/32. Đã gỡ diff tạm và xác nhận hash của tệp trở về đúng bản sửa trước khi commit.
  • claude plugin test . trên Linux x64, Ubuntu 24.04 qua WSL và Claude Code 2.1.319, đạt 32/32 với riêng bản sửa này.

English summary

Fix only the remaining transcript lookup test from #1375. Windows fs events normalize the fixture's POSIX paths to drive-prefixed backslash paths. Match their normalized suffixes in the file and directory mocks, and make the named-folder assertion use the same comparison. Preserve the existing named-folder, moved-worktree and new-session scenarios.

This is independent of #1377, which changes the other four failing tests. Verified on Claude Code 2.1.319 with 28/32 band tests passing on Windows (the other four belong to #1377), 32/32 on Linux, and 32/32 on Windows when combined with #1377. All required contribution checks pass.

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