| Age | Commit message (Collapse) | Author |
|
sdd-repo fell back to the plan file's repository when the current
directory was outside any repository. That made the plugin-cache case
silently succeed somewhere: an agent that cd'd into the skill directory
and passed an absolute plan path got whichever checkout that path
pointed into. With the plan in the main checkout (where writing-plans
leaves it) and execution in a linked worktree, that is the #2429
wrong-worktree bug again, with exit 0. A real session (sdd-cwd-eval
sdd-A-5) took exactly this path and only landed in the right place
because its plan path happened to be the worktree's.
The SDD and executing-plans helpers now pick their repository the way
git does: the current directory's working tree, or DIR when given -C
DIR. Outside any working tree, sdd-workspace, task-brief,
review-package, task-start and task-done all stop with the shared
message and write nothing, even when the plan's absolute path is inside
a repository. sdd-repo no longer takes PLAN_FILE, since the plan has no
say.
The two "outside any repository ... uses the plan's repository" tests
and the task-start/task-done fallback tests become assertions that the
shared message comes out and nothing is written, in the cwd or the
plan's repository.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
sdd-repo's no-repository message told every caller to run 'git init'.
That is the right fix for a new project, but the other way to reach it
is standing in the wrong directory, such as the plugin's own skill
directory after reading "from this skill's directory" literally. There,
'git init' would turn the plugin cache into a repository and hide the
real mistake.
task-start and task-done were worse. They still read HEAD and BASE in
the bare cwd while the brief and ledger went through sdd-repo. From a
non-repo cwd with the plan in a repo that has commits, task-start wrote
the brief into the plan's repo, then printed git's fatal plus "HEAD has
no commit yet ... make an initial commit first" and exited 2. task-done
printed git's fatal. review-package in a repo with no commit said
"bad BASE: HEAD~1".
Every helper that can hit this (sdd-workspace, task-brief,
review-package, task-start, task-done) now stops with the same message
from sdd-repo, naming the current directory and offering init-and-commit
only as the new-project case:
SDD scripts must run from inside the git working tree you're
executing in, with at least one commit (current directory: <PWD>).
If this is a new project, run 'git init' and make a first commit,
then rerun.
sdd-repo gains --with-commit, which also refuses a repository whose HEAD
has no commit. review-package, task-start and task-done pass it because
they need HEAD as a BASE or a review range; sdd-workspace and task-brief
do not, so a brief can still be written right after git init.
task-start and task-done now read HEAD and BASE with git -C in the
repository sdd-repo names. Resolution is otherwise unchanged: the cwd's
repo, else the plan's, else exit 2. sdd-repo is now executable like its
siblings.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
nothing (#2388)
Under `set -euo pipefail`, task-done extracted the ledger's test-result
field with:
last=$(grep -v '^[[:space:]]*$' "$log" | tail -n 1)
When the test command passes but the log is empty or blank-only, `grep -v`
matches no lines and exits 1; pipefail propagates that through the
pipeline, and set -e aborts the assignment before the ledger line is
written. A passing task is then silently not recorded: exit 1, no stderr,
no ledger entry — indistinguishable from the failure path the guard exists
to produce.
Make the no-match case non-fatal, falling back to a literal placeholder for
the ledger field:
last=$(grep -v '^[[:space:]]*$' "$log" | tail -n 1) || last="(no output)"
The failure guard above this line (recording nothing when the test command
itself exits non-zero) is untouched.
Fixes #2385.
|
|
A cheaper execution mode alongside subagent-driven development: the
session implements every task itself under the same workspace, ledger
and stopping rules, with one fresh whole-branch review on the most
capable model at the end. Helper scripts task-start/task-done keep the
ledger and test log honest; the final fix pass re-grades findings and
fixes Critical/Important under TDD. writing-plans' handoff, SDD's
when-to-use text and two README lines change to match.
|