Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#52 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
67/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
git, shell
領域
tooling

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Shell
スター
16
フォーク
6
平均マージ
6時間 24分
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DimitriGeelen/agentic-engineering-framework のほかの issue

DimitriGeelen/agentic-engineering-framework の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。