Format files touched by reviewer runtime cleanup
This commit is contained in:
@@ -105,10 +105,7 @@ vi.mock('child_process', async () => {
|
||||
};
|
||||
});
|
||||
|
||||
import {
|
||||
runAgentProcess,
|
||||
AgentOutput,
|
||||
} from './agent-runner.js';
|
||||
import { runAgentProcess, AgentOutput } from './agent-runner.js';
|
||||
import * as agentRunnerEnvironment from './agent-runner-environment.js';
|
||||
import type { RegisteredGroup } from './types.js';
|
||||
|
||||
@@ -681,5 +678,4 @@ OUROBOROS_LLM_BACKEND = "codex"
|
||||
expect.objectContaining({ newSessionId: 'stale-session' }),
|
||||
);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -71,7 +71,10 @@ import { Channel, NewMessage, RegisteredGroup } from './types.js';
|
||||
import { logger } from './logger.js';
|
||||
import { normalizeStoredSeqCursor } from './message-cursor.js';
|
||||
import { initCodexTokenRotation } from './codex-token-rotation.js';
|
||||
import { hasAvailableClaudeToken, initTokenRotation } from './token-rotation.js';
|
||||
import {
|
||||
hasAvailableClaudeToken,
|
||||
initTokenRotation,
|
||||
} from './token-rotation.js';
|
||||
|
||||
function isTerminalStatusMessage(text: string): boolean {
|
||||
const trimmed = text.trimStart();
|
||||
|
||||
@@ -1697,7 +1697,9 @@ describe('runAgentForGroup Claude rotation', () => {
|
||||
vi.mocked(agentRunner.runAgentProcess)
|
||||
.mockImplementationOnce(async (_group, input) => {
|
||||
expect(input.sessionId).toBe('stale-session-id');
|
||||
throw new Error('No conversation found with session ID: stale-session-id');
|
||||
throw new Error(
|
||||
'No conversation found with session ID: stale-session-id',
|
||||
);
|
||||
})
|
||||
.mockImplementationOnce(async (_group, input, _onProcess, onOutput) => {
|
||||
expect(input.sessionId).toBeUndefined();
|
||||
|
||||
@@ -480,7 +480,8 @@ export async function runAgentForGroup(
|
||||
sawVisibleOutput: false,
|
||||
sawSuccessNullResultWithoutOutput: false,
|
||||
};
|
||||
const attemptSessionId = provider === 'claude' ? currentSessionId : undefined;
|
||||
const attemptSessionId =
|
||||
provider === 'claude' ? currentSessionId : undefined;
|
||||
|
||||
const wrappedOnOutput = onOutput
|
||||
? async (output: AgentOutput) => {
|
||||
|
||||
@@ -1880,7 +1880,9 @@ describe('createMessageRuntime', () => {
|
||||
]);
|
||||
vi.mocked(agentRunner.runAgentProcess).mockImplementation(
|
||||
async (_group, input, _onProcess, onOutput) => {
|
||||
expect(input.prompt).toContain('paired_turn_outputs 에 저장된 reviewer 요약');
|
||||
expect(input.prompt).toContain(
|
||||
'paired_turn_outputs 에 저장된 reviewer 요약',
|
||||
);
|
||||
expect(input.prompt).not.toContain('리뷰어 디스코드 출력 원문');
|
||||
await onOutput?.({
|
||||
status: 'success',
|
||||
@@ -1925,7 +1927,10 @@ describe('createMessageRuntime', () => {
|
||||
|
||||
expect(result).toBe(true);
|
||||
expect(agentRunner.runAgentProcess).toHaveBeenCalledTimes(1);
|
||||
expect(channel.sendMessage).toHaveBeenCalledWith(chatJid, 'owner follow-up ok');
|
||||
expect(channel.sendMessage).toHaveBeenCalledWith(
|
||||
chatJid,
|
||||
'owner follow-up ok',
|
||||
);
|
||||
});
|
||||
|
||||
it('reuses the shared arbiter prompt builder for pending arbiter turns', async () => {
|
||||
|
||||
Reference in New Issue
Block a user