Recover rejected history traversals with atomic stack replanning

This commit is contained in:
2026-11-08 03:12:59 +08:00
parent 78194e9f95
commit 343bfdecff
8 changed files with 162 additions and 11 deletions
+2 -2
View File
@@ -78,9 +78,9 @@ test('recovery publication failure keeps one plan and blocks sends until the exa
f.broken=false;await session.resolve(plan);await engine.settle();assert.equal(f.calls.length,2);assert.ok(engine.getDurability().durableRootRevision>revision);assert.equal(engine.getSnapshot().runtime.recoveries.size,1);await engine.close();
});
test('incomplete choices and pending history traversal require explicit handling',async()=>{
test('incomplete choices and mixed user/traversal recovery require explicit handling',async()=>{
const f=fixture(),engine=await f.open();title(engine,'local');await engine.settle();const session=await engine.prepareRecovery();assert.throws(()=>session.plan(new Map()),/recovery_choices_incomplete/);await session.cancel();
assert.equal(engine.editor.history.undo().status,'applied');await engine.settle();const undoSession=await engine.prepareRecovery();assert.throws(()=>undoSession.plan(choices(engine)),/recovery_history_traversal_not_supported/);await undoSession.cancel();await engine.close();
assert.equal(engine.editor.history.undo().status,'applied');await engine.settle();const undoSession=await engine.prepareRecovery();assert.throws(()=>undoSession.plan(choices(engine)),/recovery_history_mixed_traversal_not_supported/);await undoSession.cancel();await engine.close();
});
test('retirement rejects unknown work and incomplete dependency closures without mutation',()=>{