코드 탭 컨텍스트 격차를 해소하고 대화 영속 작업 세트를 도입함

- ChatConversation에 CodeWorkingSetSnapshot/진단/시맨틱 요약 상태를 추가하고 AgentLoop가 실행 중 갱신한 작업 세트를 대화에 다시 저장하도록 연결함
- CodeTaskWorkingSetService를 스냅샷 복원/시맨틱 연속성 요약/활성 진단 보호 구조로 확장하고 query assembly에서 working set·semantic summary·workspace bootstrap을 protected evidence로 주입하도록 보강함
- ContextCondenser가 compact 중 MsgId, preview, 토큰 메타데이터를 유지하도록 수정하고 신규 compact marker와 요약 문자열을 영어 안정형으로 정리함
- ChatSessionStateService의 분기 대화가 MsgId와 CodeWorkingSet을 유지하도록 보강하고 관련 회귀 테스트(ChatStorage/ContextCondenser/PreLlmStage/QueryAssembly/WorkingSet)를 추가 및 갱신함
- 검증: dotnet build 경고 0 오류 0, CodeTaskWorkingSetServiceTests|AgentLoopQueryAssemblyServiceTests|AgentQueryContextBuilderTests|ContextCondenserTests|AxAgentExecutionEngineTests|AgentLoopLlmDispatchStageServiceTests|ChatStorageServiceTests 26개 통과, AgentLoopE2ETests 포함 관련 컨텍스트 회귀 56개 통과
This commit is contained in:
2026-04-16 09:01:00 +09:00
parent d5dbaa6e4a
commit 998f0c9fd5
20 changed files with 725 additions and 74 deletions

View File

@@ -1,5 +1,31 @@
# Code Context Reliability Plan
Update: 2026-04-16 09:12 (KST)
- Implemented the remaining continuity gap-closure items that were still open after the earlier staged loop refactor:
- durable conversation-owned `CodeWorkingSetSnapshot`
- semantic Code tool-batch continuity summaries
- compact-safe `MsgId` and preview metadata preservation
- query-context diagnostics for working-set injection, semantic-summary injection, protected diagnostics, compact-boundary use, and legacy-boundary fallback detection
- workspace-context bootstrap injection for Code requests when `.ax-context.md` is already available
- The active implementation now spans:
- `src/AxCopilot/Models/ChatModels.cs`
- `src/AxCopilot/Services/Agent/CodeTaskWorkingSetService.cs`
- `src/AxCopilot/Services/Agent/AgentLoopService.cs`
- `src/AxCopilot/Services/Agent/AgentLoopCodeWorkingSetPersistence.cs`
- `src/AxCopilot/Services/Agent/AgentLoopQueryAssemblyService.cs`
- `src/AxCopilot/Services/Agent/AgentLoopLlmRequestPreparationService.cs`
- `src/AxCopilot/Services/Agent/AgentQueryContextBuilder.cs`
- `src/AxCopilot/Services/Agent/AgentLoopContextReliability.cs`
- `src/AxCopilot/Services/Agent/ContextCondenser.cs`
- `src/AxCopilot/Services/ChatSessionStateService.cs`
- `src/AxCopilot/Views/ChatWindow.xaml.cs`
- Remaining follow-up after this wave is now smaller and mainly optional:
- broaden the workspace bootstrap path from `LoadContext(...)` reuse into a fuller stale-check refresh only if Code runs show it is still needed
- continue cleaning low-traffic legacy mojibake comments and dormant compatibility strings as those files are touched again
- evaluate whether the durable Code working set should surface in future debug tooling or exports
- keep measuring tool-trace repair frequency in longer real Code sessions to confirm the new durable snapshot and semantic summary blocks reduce repair churn
Update: 2026-04-16 07:40 (KST)
- Closed the main gaps that were still open versus the comparison checklist: