코드 탭 첫 LLM 응답 대기 진단을 강화하고 heartbeat 상태를 노출한다
설치형 환경에서 Code 탭 작업이 오래 걸릴 때 첫 도구 호출 전에 정체되는 구간을 추적할 수 있도록 StreamingToolExecutionCoordinator에 대기 heartbeat와 첫 응답 수신 로그를 추가했다. 첫 응답 전에는 모델 요청 시작, 응답 대기 시간, 첫 응답 수신 시점을 AgentLoopWait 로그와 Thinking 이벤트로 남기고, 이후 응답 지연도 heartbeat로 표시하도록 조정했다. 함께 StreamingToolExecutionCoordinatorTests를 추가해 첫 응답 지연 시 heartbeat가 노출되는 경로와 빠른 응답 시 불필요한 heartbeat가 생기지 않는 경로를 고정했다. README.md와 docs/DEVELOPMENT.md에 2026-04-15 14:55 (KST) 기준 이력을 반영했고, dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_llm_wait_diag\\ -p:IntermediateOutputPath=obj\\verify_llm_wait_diag\\ 경고 0/오류 0, dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "StreamingToolExecutionCoordinatorTests|AgentLoopLlmRequestPreparationServiceTests|AgentLoopIterationPreparationServiceTests" -p:OutputPath=bin\\verify_llm_wait_diag_tests\\ -p:IntermediateOutputPath=obj\\verify_llm_wait_diag_tests\\ 통과 6을 확인했다.
This commit is contained in:
@@ -1372,3 +1372,21 @@ UI ?붿옄???洹쒕え 由ы뙥?좊쭅 ???꾪뿕 ?묒뾽 ??湲곕줉???덉쟾
|
||||
- 테스트: `src/AxCopilot.Tests/Services/SettingsServiceTests.cs`에 `LlmSettings_DefaultMaxContextTokens_IsThirtyTwoK` 추가
|
||||
- 검증: `dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_context32k\\ -p:IntermediateOutputPath=obj\\verify_context32k\\` 경고 0 / 오류 0
|
||||
- 검증: `dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "SettingsServiceTests" -p:OutputPath=bin\\verify_context32k_tests\\ -p:IntermediateOutputPath=obj\\verify_context32k_tests\\` 통과 32
|
||||
|
||||
업데이트: 2026-04-15 14:55 (KST)
|
||||
|
||||
### Code 탭 LLM 대기 heartbeat 진단 보강
|
||||
- `src/AxCopilot/Services/Agent/StreamingToolExecutionCoordinator.cs`
|
||||
- 첫 응답 전 `LLM 요청 시작`, 첫 응답 수신 시점, 이후 장시간 대기 구간을 `[AgentLoopWait]` 로그로 남기도록 보강했습니다.
|
||||
- `onStreamEventAsync`가 있는 스트리밍 경로에서 첫 이벤트가 늦게 오면 `메인 루프 N: 모델 첫 응답을 기다리는 중입니다... (n초)` heartbeat를 주기적으로 `Thinking` 이벤트로 발행합니다.
|
||||
- 첫 이벤트가 늦게 도착한 경우 `메인 루프 N: 모델 첫 응답을 받아 계속 진행합니다.`를 한 번 더 기록해, 설치본 로그와 UI 진행 이력만으로도 “아예 멈춤”과 “응답 대기”를 구분할 수 있게 했습니다.
|
||||
- 빠른 응답에서는 waiting heartbeat를 남기지 않도록 기본 heartbeat 지연값을 두고, 테스트에서는 짧은 지연값으로만 동작을 검증합니다.
|
||||
|
||||
### 테스트
|
||||
- 새 `src/AxCopilot.Tests/Services/StreamingToolExecutionCoordinatorTests.cs`
|
||||
- 느린 첫 응답일 때 waiting heartbeat와 first-response recovery 메시지가 나오는지 검증
|
||||
- 빠른 첫 응답에서는 대기 heartbeat가 발생하지 않는지 검증
|
||||
|
||||
### 검증
|
||||
- `dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_llm_wait_diag\\ -p:IntermediateOutputPath=obj\\verify_llm_wait_diag\\` 경고 0 / 오류 0
|
||||
- `dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "StreamingToolExecutionCoordinatorTests|AgentLoopLlmRequestPreparationServiceTests|AgentLoopIterationPreparationServiceTests" -p:OutputPath=bin\\verify_llm_wait_diag_tests\\ -p:IntermediateOutputPath=obj\\verify_llm_wait_diag_tests\\` 통과 6
|
||||
|
||||
Reference in New Issue
Block a user