* fix(#464): make phase completion planning writes transactional * fix(#464): add phase completion changeset * test(#464): avoid source-grep rollback assertion * fix(#464): address phase completion rollback review * fix(#191): remove retired sdk tsconfig reference
This commit is contained in:
@@ -125,6 +125,25 @@ describe('planning-workspace: lock seam', () => {
|
||||
fs.rmSync(tmpDir, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
test('does not retry errors thrown by locked work', () => {
|
||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-planning-lock-work-error-'));
|
||||
let attempts = 0;
|
||||
try {
|
||||
assert.throws(() => {
|
||||
withPlanningLock(tmpDir, () => {
|
||||
attempts += 1;
|
||||
const err = new Error('write failed inside critical section');
|
||||
err.code = 'EIO';
|
||||
throw err;
|
||||
});
|
||||
}, /write failed inside critical section/);
|
||||
assert.strictEqual(attempts, 1);
|
||||
assert.ok(!fs.existsSync(path.join(tmpDir, '.planning', '.lock')));
|
||||
} finally {
|
||||
fs.rmSync(tmpDir, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('core compatibility adapter: planning workspace functions', () => {
|
||||
|
||||
Reference in New Issue
Block a user