[ai-assisted] fix(vector): item 상세 조회 SQL 조립 수정#387
Merged
Conversation
Issue: - #386 Why: - Vector Map에서 Top-K 결과나 산점도 점 선택 시 item 상세 조회 SQL이 WHEREmetadata, chunkIdIN, OR'row-' 형태로 조립되어 PostgreSQL 문법 오류가 발생했다. What: - vector item id 매칭 WHERE 절을 일반 문자열 helper로 생성해 WHERE, IN, OR 주변 공백을 보장했다. - chunkId, row-{id}, documentId 매칭 clause 회귀 테스트를 추가했다. Validation: - ./gradlew :starter:studio-platform-starter-ai:test --tests '*JdbcVectorProjectionSqlTest' : PASS - ./gradlew :starter:studio-platform-starter-ai:test :starter:studio-platform-starter-ai-web:test && git diff --check : PASS - 로컬 PostgreSQL smoke: vectorItemId 6-18 상세 조회 조건이 1건 조회됨
donghyuck
commented
Apr 30, 2026
Owner
Author
donghyuck
left a comment
There was a problem hiding this comment.
CODE REVIEW REPORT
Files reviewed: 3
Result: APPROVE-equivalent comment, no blocking findings.
Reviewed scope:
JdbcExistingVectorItemRepository.findByVectorItemIds()SQL assemblyJdbcVectorProjectionSql.vectorItemIdMatchClause(...)JdbcVectorProjectionSqlTestregression coverage
Findings:
- CRITICAL: none
- HIGH: none
- MEDIUM: none
- LOW: none
Validation evidence:
./gradlew :starter:studio-platform-starter-ai:test --tests '*JdbcVectorProjectionSqlTest'PASS./gradlew :starter:studio-platform-starter-ai:test :starter:studio-platform-starter-ai-web:test && git diff --checkPASS./gradlew :starter:studio-platform-starter-ai:test --tests '*JdbcVectorProjectionSqlTest' :starter:studio-platform-starter-ai-web:test && git diff --checkPASS- Local PostgreSQL smoke verified
vectorItemId=6-18condition returns 1 row.
Notes:
- The change is narrowly scoped to SQL token spacing in item detail lookup.
- No auth, permission, or data exposure behavior changed.
- No additional code changes were required after review.
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/items/{vectorItemId}가 500을 반환했습니다.JdbcExistingVectorItemRepository.findByVectorItemIds()에서 Java text block과 문자열 concat 경계의 공백이 제거되어WHEREmetadata,chunkId'IN,OR'row-'형태의 잘못된 SQL이 만들어지는 문제입니다.What
JdbcVectorProjectionSql.vectorItemIdMatchClause(...)를 추가해WHERE,IN,OR주변 공백을 일반 문자열에서 보장했습니다.JdbcExistingVectorItemRepository.findByVectorItemIds()가 새 helper를 사용하도록 수정했습니다.chunkId,row-{id},documentId매칭 clause 조립 회귀 테스트를 추가했습니다.Related Issues
Validation
./gradlew :starter:studio-platform-starter-ai:test --tests '*JdbcVectorProjectionSqlTest'./gradlew :starter:studio-platform-starter-ai:test :starter:studio-platform-starter-ai-web:test && git diff --checkvectorItemId=6-18상세 조회 조건이 1건 조회됨scripts/run-dev.shvia detachedscreensessionTomcat started on port 8080확인curl -i 'http://localhost:8080/api/mgmt/ai/vectors/items/6-18'401 Unauthorized로 라우팅 확인Risk / Rollback
GET /api/mgmt/ai/vectors/items/{vectorItemId}와 동일 repository를 쓰는 상세 조회 경로에 한정됩니다.AI / Subagent Usage
git diff --check, 로컬 PostgreSQL smoke query, 서버 재시작 및 라우팅 확인을 수행했습니다.Checklist
AI-Assistedvalue is correct