Skip to content

Commit 0becdea

Browse files
fix(b53d-00b0): replace chained ticket comment+transition with single --reason flag (merge worktree-20260327-075020)
2 parents f76523d + 942aacc commit 0becdea

File tree

3 files changed

+67
-3
lines changed

3 files changed

+67
-3
lines changed

plugins/dso/skills/debug-everything/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ Sub-agent prompt: Read `$PLUGIN_ROOT/skills/debug-everything/prompts/auto-fix.md
436436
### Orchestrator Actions After Sub-Agent Returns
437437
438438
1. Verify the sub-agent's report
439-
2. Close any issues resolved by auto-fix: `.claude/scripts/dso ticket comment <id> "Resolved by auto-fix (format/lint)"` then `.claude/scripts/dso ticket transition <id> open closed`
439+
2. Close any issues resolved by auto-fix: `.claude/scripts/dso ticket transition <id> open closed --reason="Fixed: resolved by auto-fix (format/lint)"`
440440
3. Update the failure inventory with remaining errors
441441
4. **CONTEXT ANCHOR**: After the commit workflow completes, continue immediately at Step 5 below (Phase 4). Do NOT stop or wait for user input after committing.
442442
@@ -676,7 +676,7 @@ Sub-agent prompt: Read `$PLUGIN_ROOT/skills/debug-everything/prompts/post-batch-
676676

677677
| Sub-agent outcome | Action |
678678
|------------------|--------|
679-
| Success + tests pass | `.claude/scripts/dso ticket comment <id> "Fixed: <summary>"` then `.claude/scripts/dso ticket transition <id> open closed` |
679+
| Success + tests pass | `.claude/scripts/dso ticket transition <id> open closed --reason="Fixed: <summary>"` |
680680
| Partial success | `.claude/scripts/dso ticket comment <id> "Partial: <details>."` |
681681
| Failure | `.claude/scripts/dso ticket transition <id> open` then `.claude/scripts/dso ticket comment <id> "Failed: <error>."` |
682682
| Regression | Revert changes (`git checkout -- <files>`), reopen, note regression |

plugins/dso/skills/sprint/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ This ensures `issue-quality-check.sh` passes and sub-agents can self-serve their
161161
1. Run `.claude/scripts/dso ticket list` and filter for in-progress tasks under `<epic-id>` for interrupted tasks
162162
2. For each in-progress task, run `.claude/scripts/dso ticket show <id>` and parse its notes for CHECKPOINT lines
163163
3. Apply checkpoint resume rules:
164-
- **CHECKPOINT 6/6 ✓** — task is fully done; fast-close: verify files exist, then `.claude/scripts/dso ticket comment <id> "Fixed: <summary>"` + `.claude/scripts/dso ticket transition <id> open closed`
164+
- **CHECKPOINT 6/6 ✓** — task is fully done; fast-close: verify files exist, then `.claude/scripts/dso ticket transition <id> open closed --reason="Fixed: <summary>"`
165165
- **CHECKPOINT 5/6 ✓** — near-complete; fast-close: spot-check files and close without re-execution
166166
- **CHECKPOINT 3/6 ✓ or 4/6 ✓** — partial progress; re-dispatch with resume context: include the highest checkpoint note in the sub-agent prompt so it can continue from that substep
167167
- **CHECKPOINT 1/6 ✓ or 2/6 ✓** — early progress only; revert to open with `.claude/scripts/dso ticket transition <id> open` for full re-execution
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/usr/bin/env bash
2+
# tests/skills/test-no-chained-ticket-close.sh
3+
# Validates that agent-facing docs do NOT chain ticket comment + ticket
4+
# transition in a way that suggests a single Bash tool call.
5+
#
6+
# Bug: b53d-00b0 — chained commands exceed ~73s timeout, silently dropping
7+
# the transition.
8+
#
9+
# Usage: bash tests/skills/test-no-chained-ticket-close.sh
10+
11+
set -uo pipefail
12+
13+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
14+
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
15+
16+
source "$REPO_ROOT/tests/lib/assert.sh"
17+
18+
# =============================================================================
19+
# Test 1: sprint SKILL.md does not chain comment + transition
20+
# =============================================================================
21+
echo ""
22+
echo "--- test_sprint_no_chained_comment_transition ---"
23+
_snapshot_fail
24+
25+
_SPRINT_CHAIN="not_found"
26+
grep -q 'ticket comment.*+.*ticket transition\|ticket comment.*then.*ticket transition' \
27+
"$REPO_ROOT/plugins/dso/skills/sprint/SKILL.md" 2>/dev/null && _SPRINT_CHAIN="found"
28+
assert_eq "test_sprint_no_chained_comment_transition" "not_found" "$_SPRINT_CHAIN"
29+
30+
assert_pass_if_clean "test_sprint_no_chained_comment_transition"
31+
32+
# =============================================================================
33+
# Test 2: debug-everything SKILL.md does not chain comment + transition
34+
# =============================================================================
35+
echo ""
36+
echo "--- test_debug_everything_no_chained_comment_transition ---"
37+
_snapshot_fail
38+
39+
_DEBUG_CHAIN="not_found"
40+
grep -q 'ticket comment.*then.*ticket transition\|ticket comment.*+.*ticket transition' \
41+
"$REPO_ROOT/plugins/dso/skills/debug-everything/SKILL.md" 2>/dev/null && _DEBUG_CHAIN="found"
42+
assert_eq "test_debug_everything_no_chained_comment_transition" "not_found" "$_DEBUG_CHAIN"
43+
44+
assert_pass_if_clean "test_debug_everything_no_chained_comment_transition"
45+
46+
# =============================================================================
47+
# Test 3: bug-type close commands use --reason (not separate comment)
48+
# Sprint and debug-everything should use --reason for bug close, not a
49+
# separate ticket comment call.
50+
# =============================================================================
51+
echo ""
52+
echo "--- test_bug_close_uses_reason_flag_in_sprint ---"
53+
_snapshot_fail
54+
55+
# Sprint SKILL.md line ~164 (CHECKPOINT 6/6) should use --reason
56+
_SPRINT_REASON="not_found"
57+
grep -q 'ticket transition.*closed.*--reason\|--reason.*Fixed' \
58+
"$REPO_ROOT/plugins/dso/skills/sprint/SKILL.md" 2>/dev/null && _SPRINT_REASON="found"
59+
assert_eq "test_bug_close_uses_reason_flag_in_sprint" "found" "$_SPRINT_REASON"
60+
61+
assert_pass_if_clean "test_bug_close_uses_reason_flag_in_sprint"
62+
63+
# =============================================================================
64+
print_summary

0 commit comments

Comments
 (0)