mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
fix(pi): resume archived sessions safely (#1308)
* fix(pi): resume archived sessions safely * fix(pi): harden native resume startup * fix(pi): harden resume termination evidence * fix(runner): persist resume process evidence * fix(runner): track resume process generations * fix(runner): verify full session tree shutdown * fix(pi): block pre-mapping resume dedup
This commit is contained in:
@@ -147,6 +147,12 @@ describe('bootstrapExistingSession', () => {
|
||||
grokSessionId: 'grok-thread-1',
|
||||
cursorSessionId: 'cursor-thread-1',
|
||||
cursorSessionProtocol: 'acp',
|
||||
piSessionId: 'pi-thread-1',
|
||||
piResumeAttempt: {
|
||||
state: 'resuming',
|
||||
machineId: 'machine-1',
|
||||
startedAt: 123,
|
||||
},
|
||||
summary: {
|
||||
text: 'resume me',
|
||||
updatedAt: 100
|
||||
@@ -176,6 +182,12 @@ describe('bootstrapExistingSession', () => {
|
||||
grokSessionId: 'grok-thread-1',
|
||||
cursorSessionId: 'cursor-thread-1',
|
||||
cursorSessionProtocol: 'acp',
|
||||
piSessionId: 'pi-thread-1',
|
||||
piResumeAttempt: {
|
||||
state: 'resuming',
|
||||
machineId: 'machine-1',
|
||||
startedAt: 123,
|
||||
},
|
||||
summary: {
|
||||
text: 'resume me',
|
||||
updatedAt: 100
|
||||
|
||||
@@ -106,6 +106,7 @@ function pickExistingSessionMetadata(metadata: Metadata | null | undefined): Par
|
||||
if (metadata.cursorSessionProtocol !== undefined) preserved.cursorSessionProtocol = metadata.cursorSessionProtocol
|
||||
if (metadata.kimiSessionId !== undefined) preserved.kimiSessionId = metadata.kimiSessionId
|
||||
if (metadata.piSessionId !== undefined) preserved.piSessionId = metadata.piSessionId
|
||||
if (metadata.piResumeAttempt !== undefined) preserved.piResumeAttempt = metadata.piResumeAttempt
|
||||
if (metadata.preferredPermissionMode !== undefined) preserved.preferredPermissionMode = metadata.preferredPermissionMode
|
||||
if (metadata.tools !== undefined) preserved.tools = metadata.tools
|
||||
if (metadata.slashCommands !== undefined) preserved.slashCommands = metadata.slashCommands
|
||||
|
||||
Reference in New Issue
Block a user