diff options
| author | Jesse Vincent <jesse@fsck.com> | 2026-10-22 22:32:48 +0000 |
|---|---|---|
| committer | Jesse Vincent <jesse@fsck.com> | 2026-10-23 03:38:19 +0000 |
| commit | 750ba92008b88850f6ab321706c7f840bbfff503 (patch) | |
| tree | d13ce7fd72c1c8616ed889b9147b63e1b1132f7e /tests | |
| parent | f75c01fd9b320060c301e2c6591dfc74a8436f15 (diff) | |
fix(sdd): task-brief says when a plan's task headings are not in Englishfix/2459-2496-task-brief-headings
task-brief recognizes only the English word `Task` in a task heading.
writing-plans' template shows `### Task N:` but never says the word is
machine-read, so a model writing a plan in Spanish writes `## Tarea 1:`.
task-brief and task-start then report "task 1 not found in plan-es.md
(no heading matching 'Task 1')", which reads as "this plan has no task 1"
and sends the controller looking for a task that is on line 3 (#2496).
When a plan has no Task headings at all, task-brief now prints, before the
existing not-found line, that task headings must use the English word
"Task" whatever the plan's language, and lists up to five headings shaped
like tasks (`<word> <id-with-a-digit>`). A plan that has Task headings,
just not the requested one, still gets only the not-found line, so asking
for Task 9 of an eight-task plan stays quiet.
This deliberately does not accept other words. Plans commonly carry
`Phase 1`, `Chunk 2` and `Step 1` headings, and a word-agnostic rule
would turn them into tasks. Keeping the word fixed in the plans
themselves is a writing-plans wording change, which needs evals.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/claude-code/test-sdd-workspace.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/claude-code/test-sdd-workspace.sh b/tests/claude-code/test-sdd-workspace.sh index 667e5a0..22f1774 100755 --- a/tests/claude-code/test-sdd-workspace.sh +++ b/tests/claude-code/test-sdd-workspace.sh @@ -252,6 +252,39 @@ PLAN fi done + # --- Translated task headings: say so instead of "not found" (#2496) --- + cat > "$repo/plan-es.md" <<'PLAN' +# Plan: demo + +## Tarea 1: Banner + +**Archivos:** + +## Tarea 2: Segunda +PLAN + local es_err + rc=0 + es_err="$(cd "$repo" && "$SDD_SCRIPTS/task-brief" plan-es.md 1 "$id_out" 2>&1 >/dev/null)" || rc=$? + if [[ "$rc" -eq 3 && "$es_err" == *'English word "Task"'* \ + && "$es_err" == *"## Tarea 1: Banner"* && "$es_err" == *"## Tarea 2: Segunda"* ]]; then + pass "task-brief on a plan with no Task headings names the headings it saw" + else + fail "task-brief on a plan with no Task headings names the headings it saw" + echo " exit: $rc" + echo " stderr: $es_err" + fi + + # A plan that has Task headings, just not this one, gets the plain error. + rc=0 + es_err="$(cd "$repo" && "$SDD_SCRIPTS/task-brief" plan-ids.md 99 "$id_out" 2>&1 >/dev/null)" || rc=$? + if [[ "$rc" -eq 3 && "$es_err" == "task 99 not found in plan-ids.md (no heading matching 'Task 99')" ]]; then + pass "a missing task in a plan with Task headings gets only the not-found line" + else + fail "a missing task in a plan with Task headings gets only the not-found line" + echo " exit: $rc" + echo " stderr: $es_err" + fi + # --- review-package takes the plan first and lands in its directory --- local git_id=(-c user.email=t@example.com -c user.name=t -c commit.gpgsign=false) ( cd "$repo" \ |
