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

@@ -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', () => {
const content = fs.readFileSync(
path.join(process.cwd(), 'commands/gsd/debug.md'),