Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

dup-task-scan.sh (G-052) cannot distinguish a half-staged rename from a real duplicate, and its message misdirects the fix

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
67/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
git, shell
Lĩnh vực
tooling

Hướng nghiên cứu

Start with dup-task-scan.sh, especially the index scan and duplicate-message logic around lines 29, 43–46, and 52–57; compare its results with git diff --cached --name-status for the half-staged and genuine-duplicate cases. Keep detection intact, distinguish the recoverable half-staged move in the message, and verify that it suggests git add -A .tasks/ while genuine duplicates retain the current message.

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

Mô tả

dup-task-scan.sh (gate G-052) correctly refuses a half-staged task move, but its refusal
message cannot distinguish that case from a genuine duplicate — and the remedy it implies
is wrong for the common one.

Confirmed by running the script in both directions
  • Fully staged rename (git mv): one path in the index → exit 0, allowed. Correct.
  • New path added, old path's deletion not staged: both paths in the index → exit 1,
    refused with Duplicate task IDs detected (G-052).

The second case is a true positive on a partially staged index, not a false positive on
a rename. (A downstream task's own title asserted the opposite; running the script settled
it the other way.)

Why the message misdirects

dup-task-scan.sh:29 reads git ls-files --cached; :43-46 intersects task IDs across
active/ and completed/; :52-57 prints only path names. It never consults
git diff --cached --name-status, where a staged rename appears as R and a real orphan
does not — so the one signal that separates a recoverable half-staged move from a permanent
active+completed duplicate is available at the moment the gate runs and unused.

An operator reading "Duplicate task IDs detected" next to two paths reaches for deletion.
The actual fix in the common case is git add -A .tasks/.

Suggested fix

Do not loosen the detection — it is correct. Read git diff --cached --name-status,
and when the pair appears as a rename or as an unstaged deletion of the old path, say so:
name the half-staged case and print git add -A .tasks/ as the remedy. Keep the current
message for the genuine orphan.

Filed from project 1409-sprind under its observation-inbox triage task. The downstream
root-cause analysis already existed and recorded "reported, not patched"; re-measurement
during triage found it had never actually been filed, which is itself the reason this
issue exists.

Ngôn ngữ chính
Shell
Star
16
Fork
6
Merge trung bình
6 giờ 24 phút
Pull request đã merge (30 ngày)
5

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

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 DimitriGeelen/agentic-engineering-framework

Tất cả issue của DimitriGeelen/agentic-engineering-framework

Issue tương tự

Thêm issue về Shell/Bash

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.