Skip to content

fix(tests): unhang the Claude Code skill suite and realign SDD assertions with the current skill - #2137

Open
obra wants to merge 2 commits into
devfrom
fix/claude-code-test-suite
Open

fix(tests): unhang the Claude Code skill suite and realign SDD assertions with the current skill#2137
obra wants to merge 2 commits into
devfrom
fix/claude-code-test-suite

Conversation

@obra

@obra obra commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Problem (tracked in #2130)

Four defects left the Claude Code skill suite unable to pass:

  1. test-helpers.sh spawned the CLI under timeout with stdin left open — the CLI can block on stdin and hang the whole suite.
  2. test-subagent-driven-development.sh:86 asserted pre-rename step names (Step 1|Load Plan) that no longer exist in the skill — a live run yesterday failed exactly here while the model's answer was correct ('during setup').
  3. Line ~139 asserted the removed provide-text-directly behavior; SDD now routes briefs via scripts/task-brief.
  4. Sweep found the same two defect classes in test-subagent-driven-development-integration.sh: its prompt instructed the model to violate the current skill ('Provide full task text to subagents'), and its direct claude -p invocation also lacked the stdin guard.

Fix

  • < /dev/null on both CLI spawn sites (helper + integration test).
  • Assertions and prompts rewritten against the current SKILL.md: setup-phase reading accepted ('beginning|start|setup|before dispatch'), task-brief flow asserted instead of paste-the-text. Patterns tolerate correct paraphrases without going vacuous.
  • test-worktree-native-preference.sh's 'Step 1a' checked and left alone — that's its own RED/GREEN terminology, not the SDD rename.

Verification

bash -n clean on all touched files. The stdin fix has a deterministic falsification: a stub claude that reads stdin — pre-fix helper blocks until timeout (exit 124), post-fix exits immediately (exit 0). The prose assertions are live-LLM by nature; they were rewritten from the current skill text, and the previously-failing 'Read at beginning' case now matches yesterday's observed correct answer.

Findings originally reported in PR #2071 (@ericyen97903-lab, closed on process grounds), verified during triage and tracked in #2130. Fixes #2130.

Who is submitting

Claude Fable 5 on Claude Code 2.1.228 (implementation subagent + controller review), working the triage build queue directed by @obra, who reviews the diff.

@arittr @ada-sen — review requested.

obra added 2 commits August 13, 2026 00:32
run_claude ran `timeout "$timeout" "${cmd[@]}"` with the suite's stdin
inherited by the spawned CLI. When the suite is run from a terminal (or
any open stdin), claude -p can block reading stdin and each test stalls
for its full timeout instead of completing.

Verified deterministically with a stub `claude` that reads stdin (cat):
with an open stdin pipe the old helper blocks until timeout kills it
(exit 124); with the redirect it exits immediately with output.

Part of #2130; defect documented in PR #2071 by @ericyen97903-lab.
The SDD skill tests still asserted on pre-rename skill text, so correct
model answers failed the suite:

- "Read at beginning" asserted "Step 1|beginning|start|Load Plan";
  the current skill has no numbered steps or Load Plan phase (setup
  covers it: "Read the plan once" during Setup). A live run today
  failed this assertion when the model correctly answered "during
  setup". Pattern now accepts setup/before-dispatch paraphrases while
  still requiring an at-the-start answer.
- "Provides text directly" asserted the removed provide-full-task-text
  behavior; SDD now routes task requirements through brief files
  (scripts/task-brief). The test now asks brief-file-vs-whole-plan and
  asserts the brief-based flow.
- The integration test's prompt and summary told the agent to
  "provide full task text to subagents (don't make them read files)",
  contradicting the skill it verifies; reworded to the task-brief flow.
  Also gave its direct `timeout 1800 claude -p` the same </dev/null
  stdin guard as run_claude.

Live-LLM tests; verified with bash -n on every touched file.

Part of #2130; defects documented in PR #2071 by @ericyen97903-lab.
@obra
obra requested a review from arittr August 13, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant