mirror of
https://github.com/stablyai/orca.git
synced 2026-11-17 03:15:01 +00:00
Keep fork boundary tests aligned with inherited actions
This commit is contained in:
+1
-1
@@ -743,7 +743,7 @@ it('refuses an imported ACP tip with assistant prose but no native terminal evid
|
||||
role,
|
||||
blocks: [{ type: 'text', text: role === 'user' ? 'Remember 57319' : 'Remembered' }]
|
||||
},
|
||||
{ fence: 1 }
|
||||
{ fence: 1, turnScope: { kind: 'thread' } }
|
||||
)
|
||||
}
|
||||
const record = agentSessionRecordFixture({
|
||||
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
import { expect, it } from 'vitest'
|
||||
import { agentJournalItemKey } from '../../../../../../shared/agent-session/journal/agent-session-journal-item-key'
|
||||
import type { ForkMarker } from '../agent-session-fork-marker'
|
||||
import { remapForkChildBoundary } from '../../../rewind/agent-session-fork-boundary-remap'
|
||||
import { fixture, appendItems, item, body } from './agent-session-history-contract-test-fixture'
|
||||
|
||||
function marker(): ForkMarker {
|
||||
return {
|
||||
forkedFrom: {
|
||||
sessionId: 'source-session',
|
||||
itemId: 'source-reply',
|
||||
childBoundary: { kind: 'item', itemId: agentJournalItemKey(item(2)) }
|
||||
},
|
||||
sourceName: 'Original chat'
|
||||
}
|
||||
}
|
||||
|
||||
it('does not move a pre-clear inherited boundary when only later context is rewound', async () => {
|
||||
await appendItems(4)
|
||||
const old = fixture.journal.currentRead().items
|
||||
const boundary = marker().forkedFrom.childBoundary
|
||||
const kept = [{ identity: item(3), body: body('item-3'), ownerFence: 0 }]
|
||||
expect(remapForkChildBoundary(boundary, old, kept, old[1].sequence)).toEqual({
|
||||
kind: 'item',
|
||||
itemId: 'codex:thread-1:turn-1:2'
|
||||
})
|
||||
expect(
|
||||
remapForkChildBoundary(boundary, old, [
|
||||
{ identity: item(1), body: body('item-1'), ownerFence: 0 }
|
||||
])
|
||||
).toEqual({ kind: 'item', itemId: 'codex:thread-1:turn-1:1' })
|
||||
})
|
||||
Reference in New Issue
Block a user