fix(#464): make phase completion planning writes transactional (#465)

* 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:
Colin Johnson
2026-05-30 17:44:36 -04:00
committed by GitHub
parent 79002a00cb
commit 2bc295b32d
9 changed files with 495 additions and 255 deletions

View File

@@ -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', () => {