fix: status reports ok for a hand-edited generated file

Đang mở
#2 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

@laozhej đang làm issue này rồi.

Từ ngày 28/10/2026.

  • #19 của @laozhej — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
cli, devtools

Hướng nghiên cứu

Start in src/agentsync/syncer.py and trace how AgentSyncer.sync stores hashes and AgentSyncer.status checks generated files. Add a test that reproduces the hand-edited CLAUDE.md case and confirms status reports "modified"; done means status detects the edit and the test passes. Pull request #19 is already open for this issue.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug help wanted

AgentSyncer.sync in src/agentsync/syncer.py stores the hash of the canonical rules for every output path in the lock file, and AgentSyncer.status compares against that hash, not the file on disk. So a manual edit to CLAUDE.md still shows [ok], rulesync status exits 0 in CI, and the next sync drops the edit. Store the hash of each generated file in the lock, compare it with the file on disk in status, report a new "modified" status, and add a test for it.

Reproduced with:

$ rulesync init --tools claude_md >/dev/null && rulesync sync >/dev/null
$ echo "- Always use tabs" >> CLAUDE.md
$ rulesync status | grep CLAUDE; echo "exit=${PIPESTATUS[0]}"
  [ok]      CLAUDE.md
exit=0
$ rulesync sync | grep CLAUDE; grep -c "Always use tabs" CLAUDE.md
  [~] CLAUDE.md
0
Ngôn ngữ chính
Python
Star
1
Fork
3
Merge trung bình
26 ngày 1 giờ
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của obielin/agentsync

Tất cả issue của obielin/agentsync

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.