diff options
| author | Jesse Vincent <jesse@fsck.com> | 2026-10-22 22:26:43 +0000 |
|---|---|---|
| committer | Jesse Vincent <jesse@fsck.com> | 2026-10-23 03:38:19 +0000 |
| commit | 3735a50d5ab4c77ffa0ec7f0423d7414415c0aab (patch) | |
| tree | 8132b3256872ca2d1453e25be693fbe247595f23 /tests/opencode/test-plugin-loading.sh | |
| parent | 750ba92008b88850f6ab321706c7f840bbfff503 (diff) | |
fix(sdd): task-brief refuses a brief an unclosed code fence would run to EOFfix/2436-task-brief-unclosed-fence
task-brief ignores Task headings inside fenced code blocks by toggling a
flag on every ``` line. When a plan leaves a fence open (an edit deletes a
closing fence), the flag stays set for the rest of the file, every later
Task heading is invisible, and the requested task's brief runs to EOF.
The script then reported success: #2436 saw a 177-line task come back as
a 1159-line brief holding tasks 6 through 10, handed to an implementer as
its requirements.
The awk now notes whether a Task heading line appears inside the fence
that is still open at EOF. If one does while the requested task is being
captured, the task's end cannot be found, so task-brief deletes the
partial output and exits 4, naming the line where the fence opened. If
the open fence hides the requested heading itself, it names the fence
before the existing not-found error (exit 3), and suppresses the
"use the English word Task" hint, which would otherwise blame the
plan's English headings for what the fence did.
A fence left open that hides no Task heading changes nothing about the
brief, so it is still written, with a warning on stderr. Real plans do
this: in a corpus of 1,288 plans, refusing on any fence left open at EOF
blocked three correct briefs in two plans, each ending in a stray ``` that
hides no task. With this rule every brief in that corpus matches dev's.
An unclosed fence in a later task leaves an earlier task's brief alone.
The plan path reaches awk through the environment rather than -v, which
would interpret the backslashes of a Windows path as escapes. The fence
rule itself is unchanged, so this composes with #2304's CommonMark fence
tracking: a correct parser still cannot close a fence the author never
closed.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
Diffstat (limited to 'tests/opencode/test-plugin-loading.sh')
0 files changed, 0 insertions, 0 deletions
