fix(prompt-gate): pin duplicate prompt dispatches
Keep prompt reservations briefly after successful dispatch so rapid idle/message/error transitions cannot inject the same follow-up twice. Route all production session prompt calls through the shared gate, restore skipped background resume state, release holds after abort/recovery paths, and preserve Ralph/ULW loop state when a dispatch is deferred. Add regression coverage for session routing, static prompt route auditing, team-mode live messaging, model suggestion retries, call-omo-agent reuse, background parent wakes, runtime fallback, compaction recovery, Atlas, and Ralph/ULW loops.
This commit is contained in:
@@ -6,6 +6,7 @@ import { _resetTaskToastManagerForTesting as resetTaskToastManager } from "./src
|
||||
import { _resetForTesting as resetModelFallbackState } from "./src/hooks/model-fallback/hook"
|
||||
import { _resetMemCacheForTesting as resetConnectedProvidersCache } from "./src/shared/connected-providers-cache"
|
||||
import { getOmoOpenCodeCacheDir } from "./src/shared/data-path"
|
||||
import { releaseAllPromptAsyncReservationsForTesting } from "./src/shared/prompt-async-gate"
|
||||
import { installModuleMockLifecycle } from "./src/testing/module-mock-lifecycle"
|
||||
|
||||
const { restoreModuleMocks } = installModuleMockLifecycle(mock)
|
||||
@@ -25,6 +26,7 @@ beforeEach(() => {
|
||||
resetTaskToastManager()
|
||||
resetModelFallbackState()
|
||||
resetConnectedProvidersCache()
|
||||
releaseAllPromptAsyncReservationsForTesting()
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
@@ -53,6 +55,7 @@ afterEach(() => {
|
||||
cleanupOmoCacheDir(getOmoOpenCodeCacheDir())
|
||||
resetTaskToastManager()
|
||||
resetConnectedProvidersCache()
|
||||
releaseAllPromptAsyncReservationsForTesting()
|
||||
mock.restore()
|
||||
restoreModuleMocks()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user