mirror of
https://github.com/stablyai/orca.git
synced 2026-10-04 08:02:09 +00:00
* perf(codex): skip migration scans for nonshared reattaches * fix(codex): require provenance to skip migration scans and bound ignored launches Drops the exit-match escape hatch that skipped a scan without route provenance, and ages out ignored reattach launches on the existing 60s/256 lease policy so a lost exit can no longer pin an active launch (and its completion marker) for the process lifetime. Co-authored-by: Orca <help@stably.ai> --------- Co-authored-by: Orca <help@stably.ai>
18 lines
615 B
TypeScript
18 lines
615 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { CodexSessionMigrationRecentExits } from './codex-session-migration-recent-exits'
|
|
|
|
describe('CodexSessionMigrationRecentExits', () => {
|
|
it('refreshes a rerecorded ID before evicting the oldest entry', () => {
|
|
const exits = new CodexSessionMigrationRecentExits()
|
|
for (let index = 0; index < 256; index += 1) {
|
|
exits.record(`pty-${index}`, index + 1)
|
|
}
|
|
|
|
exits.record('pty-0', 500)
|
|
exits.record('pty-overflow', 501)
|
|
|
|
expect(exits.matchesAfter('pty-0', 499)).toBe(true)
|
|
expect(exits.matchesAfter('pty-1', 0)).toBe(false)
|
|
})
|
|
})
|