v2.2.313~319: 보고 품질·조사 신뢰성 수술 + 네이버 쇼핑인사이트/검색어트렌드 연동

- 파트별 완성, 웹 실접속 증빙, 턴 의도 브리핑, 본문 불일치 검증, 하위 질문
  체크리스트, 사이트 심층 수집 (PATCHNOTES.md v2.2.313~318 참조)
- /naver-shopping, /naver-trend: 네이버 데이터랩 API 연동. compare/discover
  자동 판별, API 배치 상한 캡슐화, 카테고리 트리 fuzzy 매칭, 자격증명은
  Astra 설정 패널 SecretStorage 로 관리
This commit is contained in:
2026-08-05 18:20:32 +09:00
parent 7d6b8b509f
commit c79eda1862
51 changed files with 37435 additions and 89 deletions
+24
View File
@@ -191,3 +191,27 @@ describe('detectUngroundedAnalysis — 일반론 분석 감지', () => {
expect(formatUngroundedAnalysisFooter(3)).toContain('3회');
});
});
// [v2.2.313] 액션 0회 사각지대 — 파일을 아예 안 읽고 낸 장문 분석.
import { detectUnreadAnalysis, formatUnreadAnalysisFooter } from '../src/intelligence/investigationPipeline';
describe('detectUnreadAnalysis — 파일 미확인 분석 감지', () => {
const long = '이 프로젝트는 다층 메모리 구조를 갖춘 고도화된 시스템입니다. '.repeat(10);
test('로컬 경로 컨텍스트 + 액션 0회 + 장문 = 감지', () => {
expect(detectUnreadAnalysis(long, { reads: 0, lists: 0, investigates: 0 }, true)).toBe(true);
});
test('액션을 1회라도 썼으면 대상 아님 (hollow/ungrounded 영역)', () => {
expect(detectUnreadAnalysis(long, { reads: 1, lists: 0, investigates: 0 }, true)).toBe(false);
expect(detectUnreadAnalysis(long, { reads: 0, lists: 1, investigates: 0 }, true)).toBe(false);
});
test('로컬 경로 컨텍스트가 없으면 대상 아님', () => {
expect(detectUnreadAnalysis(long, { reads: 0, lists: 0, investigates: 0 }, false)).toBe(false);
});
test('짧은 답변은 오탐 방지로 제외', () => {
expect(detectUnreadAnalysis('짧은 확인 답변.', { reads: 0, lists: 0, investigates: 0 }, true)).toBe(false);
});
test('footer 에 재요청 안내 포함', () => {
expect(formatUnreadAnalysisFooter()).toContain('파일 미확인 분석');
});
});