fix: address post-merge review concerns from PR #1268
Three non-blocking findings from the adversarial re-review of the workstream namespacing PR, addressed as a follow-up: 1. setActiveWorkstream now validates names with the same regex used at CLI entry and cmdWorkstreamSet — defense-in-depth so future callers can't poison the active-workstream file 2. Replaced tautological test assertion (result.success || !result.success was always true) with actual validation that cmdWorkstreamSet returns invalid_name error for path traversal attempts. Added 8 new tests for setActiveWorkstream's own validation. 3. Updated stale comment in copilot-install.test.cjs (said 31, actual 56) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -617,7 +617,7 @@ describe('copyCommandsAsCopilotSkills', () => {
|
||||
assert.ok(fs.existsSync(path.join(tempDir, 'gsd-help')), 'gsd-help folder exists');
|
||||
assert.ok(fs.existsSync(path.join(tempDir, 'gsd-progress')), 'gsd-progress folder exists');
|
||||
|
||||
// Count gsd-* directories — should be 31
|
||||
// Count gsd-* directories — should be 56
|
||||
const dirs = fs.readdirSync(tempDir, { withFileTypes: true })
|
||||
.filter(e => e.isDirectory() && e.name.startsWith('gsd-'));
|
||||
assert.strictEqual(dirs.length, 56, `expected 56 skill folders, got ${dirs.length}`);
|
||||
|
||||
Reference in New Issue
Block a user