chore: prepare GoodBuddy 0.8.2
Cross-platform packages / Validate source (push) Waiting to run
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (arm64, macos, macos-15) (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (arm64, windows, windows-2025) (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (x64, linux, ubuntu-24.04) (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (x64, macos, macos-15-intel) (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (x64, windows, windows-2025) (push) Blocked by required conditions
Cross-platform packages / Publish GitHub Release (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (arm64, linux, ubuntu-24.04-arm) (push) Blocked by required conditions
Cross-platform packages / Validate source (push) Waiting to run
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (arm64, macos, macos-15) (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (arm64, windows, windows-2025) (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (x64, linux, ubuntu-24.04) (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (x64, macos, macos-15-intel) (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (x64, windows, windows-2025) (push) Blocked by required conditions
Cross-platform packages / Publish GitHub Release (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (arm64, linux, ubuntu-24.04-arm) (push) Blocked by required conditions
This commit is contained in:
@@ -104,6 +104,37 @@ describe('AgentRuntimeController', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('keeps a retiring runtime alive until its status probe finishes', async () => {
|
||||
let finishProbe!: () => void
|
||||
const probe = new Promise<void>((resolve) => {
|
||||
finishProbe = resolve
|
||||
})
|
||||
const previous = new TestRuntime()
|
||||
previous.getStatus = vi.fn(async () => {
|
||||
await probe
|
||||
return {
|
||||
id: 'opencode' as const,
|
||||
label: 'OpenCode',
|
||||
available: true,
|
||||
supportsToolExecution: true,
|
||||
detail: 'Ready'
|
||||
}
|
||||
})
|
||||
const next = new TestRuntime()
|
||||
const controller = new AgentRuntimeController(previous)
|
||||
|
||||
const status = controller.getStatus()
|
||||
const replacement = controller.replace(next)
|
||||
await Promise.resolve()
|
||||
expect(previous.dispose).not.toHaveBeenCalled()
|
||||
|
||||
finishProbe()
|
||||
await expect(status).rejects.toThrow('Runtime 已切换')
|
||||
await replacement
|
||||
expect(previous.dispose).toHaveBeenCalledOnce()
|
||||
await controller.dispose()
|
||||
})
|
||||
|
||||
it.each(['ask', 'plan'] as const)(
|
||||
'denies tool authorization in %s mode without prompting the user',
|
||||
async (workMode) => {
|
||||
|
||||
Reference in New Issue
Block a user