fix(debug): read tdd_mode via workflow.tdd_mode key (closes #2398) (#2454)

debug.md was calling `config-get tdd_mode` (top-level key) while every
other consumer (execute-phase, verify-phase, audit-fix) uses
`config-get workflow.tdd_mode`. This caused /gsd-debug to silently
ignore the tdd_mode setting even when explicitly set in config.json.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-04-19 23:12:23 -04:00
committed by GitHub
parent 39623fd5b8
commit 2bb1f1ebaf
2 changed files with 16 additions and 1 deletions

View File

@@ -63,7 +63,7 @@ debugger_model=$(gsd-sdk query resolve-model gsd-debugger 2>/dev/null | jq -r '.
Read TDD mode from config: Read TDD mode from config:
```bash ```bash
TDD_MODE=$(gsd-sdk query config-get tdd_mode 2>/dev/null | jq -r 'if type == "boolean" then tostring else . end' 2>/dev/null || echo "false") TDD_MODE=$(gsd-sdk query config-get workflow.tdd_mode 2>/dev/null | jq -r 'if type == "boolean" then tostring else . end' 2>/dev/null || echo "false")
``` ```
## 1a. LIST subcommand ## 1a. LIST subcommand

View File

@@ -66,6 +66,21 @@ describe('debug session management implementation', () => {
); );
}); });
test('debug.md reads tdd_mode via workflow.tdd_mode key (not bare tdd_mode)', () => {
const content = fs.readFileSync(
path.join(process.cwd(), 'commands/gsd/debug.md'),
'utf8'
);
assert.ok(
!content.includes('config-get tdd_mode'),
'debug.md must not use bare "tdd_mode" key — use "workflow.tdd_mode" to match every other consumer'
);
assert.ok(
content.includes('config-get workflow.tdd_mode'),
'debug.md must read tdd_mode via the "workflow.tdd_mode" key'
);
});
test('debug command contains security hardening', () => { test('debug command contains security hardening', () => {
const content = fs.readFileSync( const content = fs.readFileSync(
path.join(process.cwd(), 'commands/gsd/debug.md'), path.join(process.cwd(), 'commands/gsd/debug.md'),