[ai-assisted] fix(vector): projection 조회 SQL 오류 수정#383
Merged
Conversation
Issue: - #382 Why: - PostgreSQL JSON key literal이 따옴표 없이 생성되어 completed projection의 points/search-visualization 조회 SQL이 500 오류를 유발할 수 있었다. - Vector Map 클라이언트가 필터와 범례를 구성하려면 targetTypes가 UI 문서 분류가 아니라 RAG index objectType 기준임이 명확해야 한다. What: - PostgreSQL JSON literal key는 metadata ->> 'key' 형태로 생성하고, named parameter key는 metadata ->> :param 형태로 유지했다. - PostgreSQL/MySQL JSON path SQL 생성 회귀 테스트를 추가했다. - projection 완료 시 실제 좌표에 포함된 VectorItem targetType 목록을 저장하고, projection 목록 응답에도 targetTypes를 포함했다. - README에 targetTypes가 tb_ai_document_chunk.object_type 기준이라는 API 계약을 문서화했다. Validation: - ./gradlew :starter:studio-platform-starter-ai:test --tests '*JdbcVectorProjectionSqlTest' --tests '*DefaultVectorSearchVisualizationServiceTest' --tests '*DefaultVectorProjectionServiceTest' : PASS - ./gradlew :starter:studio-platform-starter-ai:test :starter:studio-platform-starter-ai-web:test && git diff --check : PASS - ./gradlew :studio-platform-ai:test :starter:studio-platform-starter-ai:test :starter:studio-platform-starter-ai-web:test && git diff --check : PASS - 로컬 PostgreSQL smoke: 최신 COMPLETED projection proj-20260430044829-105b3fa0의 point join 122건 확인
6e82048 to
3654e94
Compare
19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
GET /api/mgmt/ai/vectors/projections/{projectionId}/points와POST /api/mgmt/ai/vectors/search-visualization호출 시 PostgreSQL JSON key literal이 따옴표 없이 생성되어 런타임 SQL 오류와 500 응답이 발생할 수 있습니다.tb_ai_document_chunkjoin 결과가 일치해야 관리자 산점도 화면이 렌더링됩니다.targetTypes가 UI 문서 분류가 아니라 RAG index objectType 기준임이 API 계약으로 명확해야 합니다.What
metadata ->> 'key'형태로 생성하도록JdbcVectorProjectionSql을 수정했습니다.metadata ->> :param형태를 유지했습니다.VectorItem.targetType, 즉tb_ai_document_chunk.object_type목록을 저장합니다.targetTypes를 포함해 클라이언트가 목록 단계에서 필터/범례 후보를 구성할 수 있게 했습니다.targetTypes/targetType/ search-visualizationtargetTypes가 모두 RAG index objectType 기준이라는 계약을 문서화했습니다.Related Issues
Validation
./gradlew :starter:studio-platform-starter-ai:test --tests '*JdbcVectorProjectionSqlTest' --tests '*DefaultVectorSearchVisualizationServiceTest' --tests '*DefaultVectorProjectionServiceTest'./gradlew :starter:studio-platform-starter-ai:test :starter:studio-platform-starter-ai-web:test && git diff --check./gradlew :studio-platform-ai:test :starter:studio-platform-starter-ai:test :starter:studio-platform-starter-ai-web:test && git diff --checkCOMPLETEDprojectionproj-20260430044829-105b3fa0의 point join122건 확인Risk / Rollback
target_types가 요청값이 아니라 실제 포함된 objectType 목록으로 갱신됩니다. 클라이언트 계약에는 더 적합하지만, 기존에 요청값 자체를 감사 용도로 사용했다면 의미가 달라질 수 있습니다.AI / Subagent Usage
git diff --check, 로컬 PostgreSQL join smoke를 수행했습니다.Checklist
AI-Assistedvalue is correct