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:
KorenKrita
2026-08-02 21:15:52 +08:00
committed by GitHub
parent fb6f697555
commit abf9cb02a5
26 changed files with 1546 additions and 137 deletions
+4 -2
View File
@@ -159,7 +159,9 @@ describe.skipIf(!await isServerHealthy())('Runner Integration Tests', { timeout:
// Clean up - stop the spawned session
expect(spawnedSession.happySessionId).toBeDefined();
await stopRunnerSession(spawnedSession.happySessionId);
expect(await stopRunnerSession(spawnedSession.happySessionId)).toBe('stopped');
expect(await stopRunnerSession(spawnedSession.happySessionId)).toBe('already_gone');
expect(await stopRunnerSession('unknown-session-id')).toBe('still_alive');
});
it('stress test: spawn / stop', { timeout: 60_000 }, async () => {
@@ -178,7 +180,7 @@ describe.skipIf(!await isServerHealthy())('Runner Integration Tests', { timeout:
// Stop all sessions
const stopResults = await Promise.all(sessionIds.map(sessionId => stopRunnerSession(sessionId)));
expect(stopResults.every(r => r), 'Not all sessions reported stopped').toBe(true);
expect(stopResults.every(r => r === 'stopped' || r === 'already_gone'), 'Not all sessions reported stopped').toBe(true);
// Verify all sessions are stopped
const emptySessions = await listRunnerSessions();