* test(#2269): regression test for query commit --files scoping Verify secure-phase.md, validate-phase.md, and next.md all pass --files to their query commit calls. * fix(#2269): add --files to three unscoped query commit call sites secure-phase.md, validate-phase.md, and next.md were the only 3 of 65 query commit call sites that omitted --files, causing blanket staging of .planning/ and committing unrelated files. Add --files with the specific artifact path to each. Closes #2269 * docs(#2269): backfill changeset PR number (2549)
This commit is contained in:
@@ -3551,3 +3551,37 @@ describe('feat-488: effort sync command', () => {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
describe('query commit --files scoping (#2269)', () => {
|
||||
const REPO_ROOT = path.join(__dirname, '..');
|
||||
|
||||
test('secure-phase.md passes --files to its query commit call', () => {
|
||||
const content = fs.readFileSync(
|
||||
path.join(REPO_ROOT, 'gsd-core', 'workflows', 'secure-phase.md'), 'utf-8'
|
||||
);
|
||||
const idx = content.indexOf('add/update security threat verification');
|
||||
assert.notEqual(idx, -1, 'must contain the security commit message');
|
||||
assert.match(content.slice(idx, idx + 200), /--files/);
|
||||
assert.match(content.slice(idx, idx + 200), /SECURITY\.md/);
|
||||
});
|
||||
|
||||
test('validate-phase.md passes --files to its query commit call', () => {
|
||||
const content = fs.readFileSync(
|
||||
path.join(REPO_ROOT, 'gsd-core', 'workflows', 'validate-phase.md'), 'utf-8'
|
||||
);
|
||||
const idx = content.indexOf('add/update validation strategy');
|
||||
assert.notEqual(idx, -1, 'must contain the validation commit message');
|
||||
assert.match(content.slice(idx, idx + 200), /--files/);
|
||||
assert.match(content.slice(idx, idx + 200), /VALIDATION\.md/);
|
||||
});
|
||||
|
||||
test('next.md passes --files to its deferral query commit call', () => {
|
||||
const content = fs.readFileSync(
|
||||
path.join(REPO_ROOT, 'gsd-core', 'workflows', 'next.md'), 'utf-8'
|
||||
);
|
||||
const idx = content.indexOf('defer incomplete Phase');
|
||||
assert.notEqual(idx, -1, 'must contain the deferral commit message');
|
||||
assert.match(content.slice(idx, idx + 200), /--files/);
|
||||
assert.match(content.slice(idx, idx + 200), /ROADMAP\.md/);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user