fix: preserve Pi projection continuity
This commit is contained in:
@@ -130,6 +130,19 @@ describe('Pi session projector', () => {
|
||||
expect(JSON.stringify(snapshot)).not.toContain('Abandoned answer');
|
||||
});
|
||||
|
||||
it('preserves seq for same-generation checkpoint hydration', async () => {
|
||||
const live = baseSnapshot();
|
||||
live.cursor.seq = 7;
|
||||
const snapshot = await projectPiSessionSnapshot({
|
||||
snapshot: live,
|
||||
workerGeneration: 1,
|
||||
state: { sessionId: 'pi-session-a', isStreaming: false, isCompacting: false },
|
||||
entries: { entries: [], leafId: null },
|
||||
});
|
||||
|
||||
expect(snapshot.cursor).toEqual({ workerGeneration: 1, seq: 7 });
|
||||
});
|
||||
|
||||
it('applies retained-tail compaction and reconciles durable entries without replacing live IDs', async () => {
|
||||
const live: ConversationSnapshot = {
|
||||
...baseSnapshot(),
|
||||
|
||||
Reference in New Issue
Block a user