Skip to content

Commit 97a07f6

Browse files
committed
test: hold orphan race at active publication
1 parent b440c83 commit 97a07f6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/identity.test.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ test('cleanup terminalizes a legal orphan pending lifecycle and fences old sessi
11291129
assert.equal((await identity.consumeCallerContext(newer, { workspace: workspaceA, now: '2026-08-21T12:02:00.000Z' })).turnId, 'new-session-turn');
11301130
});
11311131

1132-
test('orphan replacement holds the session lock until publication before cleanup terminalizes it', async () => {
1132+
test('orphan replacement active publication excludes cleanup under the same session lock', async () => {
11331133
const { dataRoot, workspaceA } = await fixture();
11341134
const initial = {
11351135
sessionId: 'session-orphan-race', turnId: 'turn-initial', workspace: workspaceA, permissionMode: 'default',
@@ -1140,7 +1140,7 @@ test('orphan replacement holds the session lock until publication before cleanup
11401140
const replacement = createIdentityStore({
11411141
dataRoot,
11421142
publicationSeam: async (point) => {
1143-
if (point === 'before-pending') { events.push('replacement-locked'); entered.resolve(); await release.promise; }
1143+
if (point === 'before-active-publish') { events.push('replacement-locked'); entered.resolve(); await release.promise; }
11441144
if (point === 'after-active-publish') events.push('replacement-active');
11451145
},
11461146
}).beginCallerTurn({ ...initial, turnId: 'turn-replacement', prompt: 'replacement', now: '2026-08-21T12:01:00.000Z' });

0 commit comments

Comments
 (0)