* test(#4462): expose whitespace workstream scope * fix(#4462): normalize the workstream environment scope * docs(#4462): add changeset for #4509 * fix(#4462): normalize sibling planning scope readers * test(#4462): cover workstream normalization properties * fix(#4462): share normalized workstream resolution --------- Co-authored-by: Tom Boucher <trekkie@nomorestars.com>
This commit is contained in:
@@ -494,6 +494,26 @@ describe('loadConfigResolved — provenance', () => {
|
||||
assert.equal(result.degraded, false);
|
||||
});
|
||||
|
||||
test('whitespace-only explicit and environment workstreams resolve and label the root (#4462)', () => {
|
||||
writeConfig(tmpDir, { model_profile: 'quality' });
|
||||
for (const workstream of [' ', '\t', '\n', ' \t\n ']) {
|
||||
const explicit = loadConfigResolved(tmpDir, { workstream });
|
||||
assert.equal(explicit.source, 'root');
|
||||
assert.equal(explicit.degraded, false);
|
||||
|
||||
const original = process.env.GSD_WORKSTREAM;
|
||||
try {
|
||||
process.env.GSD_WORKSTREAM = workstream;
|
||||
const ambient = loadConfigResolved(tmpDir);
|
||||
assert.equal(ambient.source, 'root');
|
||||
assert.equal(ambient.degraded, false);
|
||||
} finally {
|
||||
if (original === undefined) delete process.env.GSD_WORKSTREAM;
|
||||
else process.env.GSD_WORKSTREAM = original;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
test('Fix 2a: GSD_WORKSTREAM set to nonexistent workstream (dir absent) → source:"root", degraded:true', () => {
|
||||
writeConfig(tmpDir, { model_profile: 'root-value' });
|
||||
const origWs = process.env['GSD_WORKSTREAM'];
|
||||
|
||||
Reference in New Issue
Block a user