test(#3149): correct stale tdd_mode assertion and drop a marker-token collision
Two failures from the remote runner on 654b2cc10, both introduced here.
1. tests/mcp-catalog-parity.install.test.cjs greps emitted workflow files
for the bare substring 'gsd:section' and treats its presence in a
composed file as an un-stripped marker. debug.md's new Step 0 prose
documented the field by writing that token literally, so the emitted
file tripped the gate even though the parser correctly ignored it as
prose. Reworded to 'applicability-section markers'. Same class as
DEFECT.PROMPT-INJECTION-SCAN-COLLISION.
2. tests/debug-session-management.test.cjs asserted debug.md contains the
literal 'config-get workflow.tdd_mode'. That call is gone. The
invariant it protected -- tdd_mode comes from the workflow.tdd_mode
key, never a bare top-level one -- is unchanged, and now has a
stronger behavioral home: init-debug.test.cjs row A9 asserts a bare
key is ignored and the canonical key is honored, whatever the read
mechanism.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -157,6 +157,26 @@ describe('init.debug resolves identically to the three calls it replaces (matrix
|
||||
assert.equal(viaInit.tdd_mode, true, 'the root value must be inherited, not lost');
|
||||
assert.equal(String(viaInit.tdd_mode), viaConfigGet.output.trim());
|
||||
});
|
||||
|
||||
test('honors workflow.tdd_mode, ignores a bare top-level tdd_mode (row A9)', () => {
|
||||
// The invariant tests/debug-session-management.test.cjs used to guard by
|
||||
// grepping debug.md for `config-get workflow.tdd_mode`. Asserted here
|
||||
// behaviorally instead, which is strictly stronger: a bare top-level key
|
||||
// must NOT be honored, whatever the read mechanism.
|
||||
writeConfig(tmpDir, { tdd_mode: true });
|
||||
assert.equal(
|
||||
runJson(['init', 'debug'], tmpDir).tdd_mode,
|
||||
false,
|
||||
'a bare top-level tdd_mode key must be ignored — the canonical key is workflow.tdd_mode'
|
||||
);
|
||||
|
||||
writeConfig(tmpDir, { workflow: { tdd_mode: true } });
|
||||
assert.equal(
|
||||
runJson(['init', 'debug'], tmpDir).tdd_mode,
|
||||
true,
|
||||
'the canonical workflow.tdd_mode key must be honored'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
// ─── Group B: bundle shape ─────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user